From: qinyu Date: Tue, 3 Feb 2026 09:54:00 +0000 (+0800) Subject: mm/damon/ops-common: remove redudnant mmu notifier call in pmdp mkold X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b8a4b088381875ff1a93c0c2d5a926b30b1bfe31;p=thirdparty%2Fkernel%2Fstable.git mm/damon/ops-common: remove redudnant mmu notifier call in pmdp mkold 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. Link: https://lkml.kernel.org/r/20260203095400.2465255-1-qin.yuA@h3c.com Signed-off-by: qinyu Reviewed-by: SeongJae Park Signed-off-by: Andrew Morton --- diff --git a/mm/damon/ops-common.c b/mm/damon/ops-common.c index a218d99222342..8c6d613425c13 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);