Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

mm: add missing mmu_notifier_clear_young for !MMU_NOTIFIER

Remove the now unnecessary ifdef in mm/damon/vaddr.c as well.

Link: https://lkml.kernel.org/r/20241021160212.9935-1-jthoughton@google.com
Signed-off-by: James Houghton <jthoughton@google.com>
Reviewed-by: Jason Gunthorpe <jgg@nvidia.com>
Acked-by: David Hildenbrand <david@redhat.com>
Reviewed-by: SeongJae Park <sj@kernel.org>
Reviewed-by: Oscar Salvador <osalvador@suse.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>

authored by

James Houghton and committed by
Andrew Morton
628e1b8c 3f1f947a

+7 -2
+7
include/linux/mmu_notifier.h
··· 606 606 return 0; 607 607 } 608 608 609 + static inline int mmu_notifier_clear_young(struct mm_struct *mm, 610 + unsigned long start, 611 + unsigned long end) 612 + { 613 + return 0; 614 + } 615 + 609 616 static inline int mmu_notifier_test_young(struct mm_struct *mm, 610 617 unsigned long address) 611 618 {
-2
mm/damon/vaddr.c
··· 353 353 set_huge_pte_at(mm, addr, pte, entry, psize); 354 354 } 355 355 356 - #ifdef CONFIG_MMU_NOTIFIER 357 356 if (mmu_notifier_clear_young(mm, addr, 358 357 addr + huge_page_size(hstate_vma(vma)))) 359 358 referenced = true; 360 - #endif /* CONFIG_MMU_NOTIFIER */ 361 359 362 360 if (referenced) 363 361 folio_set_young(folio);