mm: Add missing mmu_notifier_clear_young for !MMU_NOTIFIER
Subsystems (3)
PATCH 1/1 mm: Add missing mmu_notifier_clear_young for !MMU_NOTIFIER
Remove the now unnecessary ifdef in mm/damon/vaddr.c as well.
---
Notes:
This patch is originally from this series[1]. I've split up the MM and KVM bits of the series, and I have already sent the MGLRU changes here[2]. That leaves this small cleanup for DAMON.
[1]: https://lore.kernel.org/kvm/[email protected]/
[2]: https://lore.kernel.org/kvm/[email protected]/
include/linux/mmu_notifier.h | 7 +++++++ mm/damon/vaddr.c | 2 -- 2 files changed, 7 insertions(+), 2 deletions(-)
include/linux/mmu_notifier.h +7 -0
@@ -606,6 +606,13 @@ static inline int mmu_notifier_clear_flush_young(struct mm_struct *mm,return 0 ; } +static inline int mmu_notifier_clear_young (struct mm_struct *mm, +unsigned long start, +unsigned long end) +{ +return 0 ; +} +static inline int mmu_notifier_test_young (struct mm_struct *mm,unsigned long address) {
mm/damon/vaddr.c +0 -2
@@ -353,11 +353,9 @@ static void damon_hugetlb_mkold(pte_t *pte, struct mm_struct *mm,set_huge_pte_at (mm, addr, pte, entry, psize); } -#ifdef CONFIG_MMU_NOTIFIER if (mmu_notifier_clear_young (mm, addr, addr +huge_page_size (hstate_vma (vma)))) referenced = true; -#endif /* CONFIG_MMU_NOTIFIER */ if (referenced)folio_set_young (folio);
base-commit: b5d43fad926a3f542cd06f3c9d286f6f489f7129
Signature · 1 line
2.47.0.105.g07ac214952-goog
Quoted 11 lines · On Mon, 21 Oct 2024 16:02:12 +0000 James Houghton <[email protected]> wrote:
Remove the now unnecessary ifdef in
mm/damon/vaddr.cas well.Signed-off-by James Houghton <[email protected]>Reviewed-by Jason Gunthorpe <[email protected]>---
Notes:
This patch is originally from this series[1]. I've split up the MM and KVM bits of the series, and I have already sent the MGLRU changes here[2]. That leaves this small cleanup for DAMON.
Thank you James!
Quoted 6 lines
[1]: https://lore.kernel.org/kvm/[email protected]/ [2]: https://lore.kernel.org/kvm/[email protected]/include/linux/mmu_notifier.h | 7 +++++++ mm/damon/vaddr.c | 2 --
For mm/damon/vaddr.c part,
Thanks,
SJ
[...]
Quoted 5 lines · James Houghton
Remove the now unnecessary ifdef in
mm/damon/vaddr.cas well.Signed-off-by James Houghton <[email protected]>Reviewed-by Jason Gunthorpe <[email protected]>
Signature · 2 lines
Oscar Salvador SUSE Labs