From 18fd73dbe5c39707b51552d622235e5c41e3d869 Mon Sep 17 00:00:00 2001 From: SeongJae Park Date: Mon, 9 Jan 2023 21:33:31 +0000 Subject: [PATCH] mm/damon/vaddr: support folio of neither HPAGE_PMD_SIZE nor PAGE_SIZE DAMON virtual address space monitoring operations set treats folios having non-HPAGE_PMD_SIZE size as having PAGE_SIZE size. Use the exact size of the folio. Link: https://lkml.kernel.org/r/20230109213335.62525-3-sj@kernel.org Signed-off-by: SeongJae Park Signed-off-by: Andrew Morton --- mm/damon/vaddr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mm/damon/vaddr.c b/mm/damon/vaddr.c index d6cb1fc..c7b1920 100644 --- a/mm/damon/vaddr.c +++ b/mm/damon/vaddr.c @@ -475,7 +475,7 @@ regular_page: goto out; if (pte_young(*pte) || !folio_test_idle(folio) || mmu_notifier_test_young(walk->mm, addr)) { - *priv->folio_sz = PAGE_SIZE; + *priv->folio_sz = folio_size(folio); priv->young = true; } folio_put(folio); -- 2.7.4