[RFC PATCH 3/3] mm/damon/paddr: support DAMOS filter type YOUNG

From: SeongJae Park
Date: Wed Mar 06 2024 - 22:00:56 EST


DAMOS filter of type YOUNG is defined, but not yet implemented by any
DAMON operations set. Add the implementation to the DAMON operations
set for the physical address space, paddr.

Signed-off-by: SeongJae Park <sj@xxxxxxxxxx>
---
mm/damon/paddr.c | 3 +++
1 file changed, 3 insertions(+)

diff --git a/mm/damon/paddr.c b/mm/damon/paddr.c
index deee0fdf2e5b..52e4be7351cc 100644
--- a/mm/damon/paddr.c
+++ b/mm/damon/paddr.c
@@ -209,6 +209,9 @@ static bool __damos_pa_filter_out(struct damos_filter *filter,
matched = filter->memcg_id == mem_cgroup_id(memcg);
rcu_read_unlock();
break;
+ case DAMOS_FILTER_TYPE_YOUNG:
+ matched = damon_folio_young(folio);
+ break;
default:
break;
}
--
2.39.2