[PATCH 2/6] mm/damon/vaddr: support folio of neither HPAGE_PMD_SIZE nor PAGE_SIZE
From: SeongJae Park
Date: Mon Jan 09 2023 - 16:34:00 EST
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.
Signed-off-by: SeongJae Park <sj@xxxxxxxxxx>
---
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 d6cb1fca1769..c7b192006fe6 100644
--- a/mm/damon/vaddr.c
+++ b/mm/damon/vaddr.c
@@ -475,7 +475,7 @@ static int damon_young_pmd_entry(pmd_t *pmd, unsigned long addr,
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.25.1