From: Wei Xu <weixugc@google.com>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: Yu Zhao <yuzhao@google.com>, Brian Geffon <bgeffon@google.com>,
Jan Alexander Steffens <heftig@archlinux.org>,
Suleiman Souhlal <suleiman@google.com>,
Axel Rasmussen <axelrasmussen@google.com>,
linux-mm@kvack.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 2/2] mm/mglru: reset page lru tier bits when activating
Date: Thu, 17 Oct 2024 11:21:43 -0700 [thread overview]
Message-ID: <CAAPL-u_bzGmB3DkTKZqeCbtiPkuZVsmLFMbN+zCojWsYtkBUNg@mail.gmail.com> (raw)
In-Reply-To: <20241016155550.9ff2ab4625c7f19b6be8b7e1@linux-foundation.org>
On Wed, Oct 16, 2024 at 3:55 PM Andrew Morton <akpm@linux-foundation.org> wrote:
>
> On Tue, 15 Oct 2024 22:55:23 -0600 Yu Zhao <yuzhao@google.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.
prev parent reply other threads:[~2024-10-17 18:22 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-10-14 22:12 Wei Xu
2024-10-14 23:27 ` Andrew Morton
2024-10-14 23:47 ` Wei Xu
2024-10-16 4:55 ` Yu Zhao
2024-10-16 22:55 ` Andrew Morton
2024-10-17 18:21 ` Wei Xu [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CAAPL-u_bzGmB3DkTKZqeCbtiPkuZVsmLFMbN+zCojWsYtkBUNg@mail.gmail.com \
--to=weixugc@google.com \
--cc=akpm@linux-foundation.org \
--cc=axelrasmussen@google.com \
--cc=bgeffon@google.com \
--cc=heftig@archlinux.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=suleiman@google.com \
--cc=yuzhao@google.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox