* [PATCH] mm: Add missing mmu_notifier_clear_young for !MMU_NOTIFIER
@ 2024-10-21 16:02 James Houghton
2024-10-21 17:42 ` SeongJae Park
2024-10-22 7:55 ` Oscar Salvador
0 siblings, 2 replies; 3+ messages in thread
From: James Houghton @ 2024-10-21 16:02 UTC (permalink / raw)
To: Andrew Morton
Cc: James Houghton, linux-kernel, linux-mm, Jason Gunthorpe,
David Hildenbrand
Remove the now unnecessary ifdef in mm/damon/vaddr.c as well.
Signed-off-by: James Houghton <jthoughton@google.com>
Reviewed-by: Jason Gunthorpe <jgg@nvidia.com>
Acked-by: David Hildenbrand <david@redhat.com>
---
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/20240926013506.860253-1-jthoughton@google.com/
[2]: https://lore.kernel.org/kvm/20241019012940.3656292-1-jthoughton@google.com/
include/linux/mmu_notifier.h | 7 +++++++
mm/damon/vaddr.c | 2 --
2 files changed, 7 insertions(+), 2 deletions(-)
diff --git a/include/linux/mmu_notifier.h b/include/linux/mmu_notifier.h
index d39ebb10caeb..e2dd57ca368b 100644
--- a/include/linux/mmu_notifier.h
+++ b/include/linux/mmu_notifier.h
@@ -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)
{
diff --git a/mm/damon/vaddr.c b/mm/damon/vaddr.c
index 08cfd22b5249..821990d0141a 100644
--- a/mm/damon/vaddr.c
+++ b/mm/damon/vaddr.c
@@ -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
--
2.47.0.105.g07ac214952-goog
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] mm: Add missing mmu_notifier_clear_young for !MMU_NOTIFIER
2024-10-21 16:02 [PATCH] mm: Add missing mmu_notifier_clear_young for !MMU_NOTIFIER James Houghton
@ 2024-10-21 17:42 ` SeongJae Park
2024-10-22 7:55 ` Oscar Salvador
1 sibling, 0 replies; 3+ messages in thread
From: SeongJae Park @ 2024-10-21 17:42 UTC (permalink / raw)
To: James Houghton
Cc: SeongJae Park, Andrew Morton, linux-kernel, linux-mm,
Jason Gunthorpe, David Hildenbrand
On Mon, 21 Oct 2024 16:02:12 +0000 James Houghton <jthoughton@google.com> wrote:
> Remove the now unnecessary ifdef in mm/damon/vaddr.c as well.
>
> Signed-off-by: James Houghton <jthoughton@google.com>
> Reviewed-by: Jason Gunthorpe <jgg@nvidia.com>
> Acked-by: David Hildenbrand <david@redhat.com>
> ---
>
> 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!
>
> [1]: https://lore.kernel.org/kvm/20240926013506.860253-1-jthoughton@google.com/
> [2]: https://lore.kernel.org/kvm/20241019012940.3656292-1-jthoughton@google.com/
>
> include/linux/mmu_notifier.h | 7 +++++++
> mm/damon/vaddr.c | 2 --
For mm/damon/vaddr.c part,
Reviewed-by: SeongJae Park <sj@kernel.org>
Thanks,
SJ
[...]
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] mm: Add missing mmu_notifier_clear_young for !MMU_NOTIFIER
2024-10-21 16:02 [PATCH] mm: Add missing mmu_notifier_clear_young for !MMU_NOTIFIER James Houghton
2024-10-21 17:42 ` SeongJae Park
@ 2024-10-22 7:55 ` Oscar Salvador
1 sibling, 0 replies; 3+ messages in thread
From: Oscar Salvador @ 2024-10-22 7:55 UTC (permalink / raw)
To: James Houghton
Cc: Andrew Morton, linux-kernel, linux-mm, Jason Gunthorpe,
David Hildenbrand
On Mon, Oct 21, 2024 at 04:02:12PM +0000, James Houghton wrote:
> Remove the now unnecessary ifdef in mm/damon/vaddr.c as well.
>
> Signed-off-by: James Houghton <jthoughton@google.com>
> Reviewed-by: Jason Gunthorpe <jgg@nvidia.com>
> Acked-by: David Hildenbrand <david@redhat.com>
Reviewed-by: Oscar Salvador <osalvador@suse.de>
--
Oscar Salvador
SUSE Labs
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2024-10-22 7:55 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-10-21 16:02 [PATCH] mm: Add missing mmu_notifier_clear_young for !MMU_NOTIFIER James Houghton
2024-10-21 17:42 ` SeongJae Park
2024-10-22 7:55 ` Oscar Salvador
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox