summaryrefslogtreecommitdiff
path: root/mm/damon
diff options
context:
space:
mode:
authorSeongJae Park <sj@kernel.org>2023-01-09 21:33:31 +0000
committerAndrew Morton <akpm@linux-foundation.org>2023-01-18 17:12:58 -0800
commit18fd73dbe5c39707b51552d622235e5c41e3d869 (patch)
tree7efd593568f2d96971e7a9e32724afb81d3f3165 /mm/damon
parentfc8c7d2380ab7d6aa1ddef1f69169ef9a15596eb (diff)
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 <sj@kernel.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Diffstat (limited to 'mm/damon')
-rw-r--r--mm/damon/vaddr.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/mm/damon/vaddr.c b/mm/damon/vaddr.c
index d6cb1fca1769..c7b192006fe6 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);