linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: SeongJae Park <sj@kernel.org>
To: "David Hildenbrand (arm)" <david@kernel.org>
Cc: SeongJae Park <sj@kernel.org>, qinyu <qin.yuA@h3c.com>,
	akpm@linux-foundation.org, linux-mm@kvack.org
Subject: Re: [PATCH] mm/page_idle.c: remove redundant mmu notifier in aging code
Date: Wed,  4 Feb 2026 17:27:28 -0800	[thread overview]
Message-ID: <20260205012728.68407-1-sj@kernel.org> (raw)
In-Reply-To: <61dec3ce-f421-4148-8191-dcc98bbed310@kernel.org>

On Wed, 4 Feb 2026 18:04:34 +0100 "David Hildenbrand (arm)" <david@kernel.org> wrote:

> On 2/3/26 11:26, qinyu wrote:
> > now we have mmu_notifier_clear_young immediately follows
> > pmdp_clear_young_notify which internally call mmu_notifier_clear_young,
> > this is redundant. change it with non-notify variant and keep consistent
> > with ptep aging code.
> > 
> > Signed-off-by: qinyu <qin.yuA@h3c.com>
> > ---
> >   mm/page_idle.c | 2 +-
> >   1 file changed, 1 insertion(+), 1 deletion(-)
> > 
> > diff --git a/mm/page_idle.c b/mm/page_idle.c
> > index 96bb94c7b..9c67cbac2 100644
> > --- a/mm/page_idle.c
> > +++ b/mm/page_idle.c
> > @@ -74,7 +74,7 @@ static bool page_idle_clear_pte_refs_one(struct folio *folio,
> >   			pmd_t pmdval = pmdp_get(pvmw.pmd);
> >   
> >   			if (likely(pmd_present(pmdval)))
> > -				referenced |= pmdp_clear_young_notify(vma, addr, pvmw.pmd);
> > +				referenced |= pmdp_test_and_clear_young(vma, addr, pvmw.pmd);
> >   			referenced |= mmu_notifier_clear_young(vma->vm_mm, addr, addr + PMD_SIZE);
> >   		} else {
> >   			/* unexpected pmd-mapped page? */
> 
> 
> ... and it's now consistent with the pte case.
> 
> Will you also take care of mm/damon/ops-common.c:damon_pmdp_mkold() that 
> does the same thing?

Thank you for suggesting that, David.  And thankfully qinyu did:

https://lore.kernel.org/20260203095400.2465255-1-qin.yuA@h3c.com


Thanks,
SJ

[...]


      reply	other threads:[~2026-02-05  1:27 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-02-03 10:26 qinyu
2026-02-04  1:27 ` Baolin Wang
2026-02-04  6:10 ` SeongJae Park
2026-02-04 17:04 ` David Hildenbrand (arm)
2026-02-05  1:27   ` SeongJae Park [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=20260205012728.68407-1-sj@kernel.org \
    --to=sj@kernel.org \
    --cc=akpm@linux-foundation.org \
    --cc=david@kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=qin.yuA@h3c.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