summaryrefslogtreecommitdiff
path: root/mm/damon
diff options
context:
space:
mode:
authorSeongJae Park <sj@kernel.org>2024-04-26 22:52:43 +0300
committerAndrew Morton <akpm@linux-foundation.org>2024-05-06 03:53:55 +0300
commitade414bdf6aeb039991cb04bbafb42385960db60 (patch)
treef3e392eaf1c145358d77e71f72961a6900c75533 /mm/damon
parent2d8b24654feabc62ed9e132911319f1c48ab0256 (diff)
downloadlinux-ade414bdf6aeb039991cb04bbafb42385960db60.tar.xz
mm/damon/paddr: implement DAMOS filter type YOUNG
DAMOS filter of type YOUNG is defined, but not yet implemented by any DAMON operations set. Add the implementation on 'paddr', the DAMON operations set for the physical address space. Link: https://lkml.kernel.org/r/20240426195247.100306-5-sj@kernel.org Signed-off-by: SeongJae Park <sj@kernel.org> Tested-by: Honggyu Kim <honggyu.kim@sk.com> Cc: Jonathan Corbet <corbet@lwn.net> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Diffstat (limited to 'mm/damon')
-rw-r--r--mm/damon/paddr.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/mm/damon/paddr.c b/mm/damon/paddr.c
index 310b803c6277..5685ba485097 100644
--- a/mm/damon/paddr.c
+++ b/mm/damon/paddr.c
@@ -214,6 +214,11 @@ 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);
+ if (matched)
+ damon_folio_mkold(folio);
+ break;
default:
break;
}