linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] mm/damon: remove redudnant mmu notifier call in pmdp mkold
@ 2026-02-03  9:54 qinyu
  2026-02-03 16:22 ` SeongJae Park
  0 siblings, 1 reply; 2+ messages in thread
From: qinyu @ 2026-02-03  9:54 UTC (permalink / raw)
  To: sj; +Cc: damon, linux-mm, qinyu

Currently, mmu_notifier_clear_young() is called immediately after
pmdp_clear_young_notify(), which already calls mmu_notifier_clear_young()
internally. This results in a redundant notifier call.

Replace pmdp_clear_young_notify() with the non-notify variant to avoid the
duplicate call and make the pmdp path consistent with the corresponding
ptep_mkold() code.

Signed-off-by: qinyu <qin.yuA@h3c.com>
---
 mm/damon/ops-common.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/mm/damon/ops-common.c b/mm/damon/ops-common.c
index a218d9922..8c6d61342 100644
--- a/mm/damon/ops-common.c
+++ b/mm/damon/ops-common.c
@@ -90,7 +90,7 @@ void damon_pmdp_mkold(pmd_t *pmd, struct vm_area_struct *vma, unsigned long addr
 		return;
 
 	if (likely(pmd_present(pmdval)))
-		young |= pmdp_clear_young_notify(vma, addr, pmd);
+		young |= pmdp_test_and_clear_young(vma, addr, pmd);
 	young |= mmu_notifier_clear_young(vma->vm_mm, addr, addr + HPAGE_PMD_SIZE);
 	if (young)
 		folio_set_young(folio);
-- 
2.33.0



^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2026-02-03 16:22 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-02-03  9:54 [PATCH] mm/damon: remove redudnant mmu notifier call in pmdp mkold qinyu
2026-02-03 16:22 ` SeongJae Park

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox