[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CAAPL-u_bzGmB3DkTKZqeCbtiPkuZVsmLFMbN+zCojWsYtkBUNg@mail.gmail.com>
Date: Thu, 17 Oct 2024 11:21:43 -0700
From: Wei Xu <weixugc@...gle.com>
To: Andrew Morton <akpm@...ux-foundation.org>
Cc: Yu Zhao <yuzhao@...gle.com>, Brian Geffon <bgeffon@...gle.com>,
Jan Alexander Steffens <heftig@...hlinux.org>, Suleiman Souhlal <suleiman@...gle.com>,
Axel Rasmussen <axelrasmussen@...gle.com>, linux-mm@...ck.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 2/2] mm/mglru: reset page lru tier bits when activating
On Wed, Oct 16, 2024 at 3:55 PM Andrew Morton <akpm@...ux-foundation.org> wrote:
>
> On Tue, 15 Oct 2024 22:55:23 -0600 Yu Zhao <yuzhao@...gle.com> wrote:
>
> > > @@ -257,7 +258,9 @@ static inline bool lru_gen_add_folio(struct lruvec *lruvec, struct folio *folio,
> > > gen = lru_gen_from_seq(seq);
> > > flags = (gen + 1UL) << LRU_GEN_PGOFF;
> > > /* see the comment on MIN_NR_GENS about PG_active */
> > > - set_mask_bits(&folio->flags, LRU_GEN_MASK | BIT(PG_active), flags);
> > > + mask = LRU_GEN_MASK | BIT(PG_active);
> > > + mask |= folio_test_active(folio) ? (LRU_REFS_MASK | LRU_REFS_FLAGS) : 0;
> >
> > We shouldn't clear PG_workingset here because it can affect PSI
> > accounting, if the activation is due to workingset refault.
> >
Good point. I have addressed this in the v2 patch.
> > Also, nit:
> > mask = LRU_GEN_MASK;
> > if (folio_test_active(folio))
> > mask |= LRU_REFS_MASK | BIT(PG_active) | BIT(PG_referenced);
> >
>
> Thanks, I'll drop this version of this patch.
>
> When resending, please include a full description of the userspace-visible
> effects of the original flaw, thanks.
I have sent out a v2 patch, which includes a description as suggested.
Powered by blists - more mailing lists