Re: [PATCH 2/2] mm/mglru: reset page lru tier bits when activating

From: Andrew Morton
Date: Mon Oct 14 2024 - 19:27:37 EST


On Mon, 14 Oct 2024 22:12:31 +0000 Wei Xu <weixugc@xxxxxxxxxx> wrote:

> folio_activate() calls lru_gen_add_folio() to move the folio to the
> youngest generation. But unlike folio_update_gen()/folio_inc_gen(),
> lru_gen_add_folio() doesn't reset the folio lru tier bits
> (LRU_REFS_MASK | LRU_REFS_FLAGS). Fix this inconsistency in
> lru_gen_add_folio() when activating a folio.

What are the runtime effects of this flaw?