From: "David Hildenbrand (arm)" <david@kernel.org>
To: qinyu <qin.yuA@h3c.com>, akpm@linux-foundation.org
Cc: linux-mm@kvack.org
Subject: Re: [PATCH] mm/page_idle.c: remove redundant mmu notifier in aging code
Date: Wed, 4 Feb 2026 18:04:34 +0100 [thread overview]
Message-ID: <61dec3ce-f421-4148-8191-dcc98bbed310@kernel.org> (raw)
In-Reply-To: <20260203102649.2486836-1-qin.yuA@h3c.com>
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?
Acked-by: David Hildenbrand (arm) <david@kernel.org>
--
Cheers,
David
next prev parent reply other threads:[~2026-02-04 17:04 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) [this message]
2026-02-05 1:27 ` SeongJae Park
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=61dec3ce-f421-4148-8191-dcc98bbed310@kernel.org \
--to=david@kernel.org \
--cc=akpm@linux-foundation.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