aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/mm/damon/core.c
diff options
context:
space:
mode:
authorSeongJae Park <sj@kernel.org>2025-01-09 09:51:18 -0800
committerAndrew Morton <akpm@linux-foundation.org>2025-01-25 20:22:31 -0800
commitfe6d7fdd62491524d11433b9ff8d3db5dde32700 (patch)
tree02b6e1aa5a5af56dbda16d9ebbcff3c5f6802754 /mm/damon/core.c
parentmm/damon: fixup damos_filter kernel-doc (diff)
downloadwireguard-linux-fe6d7fdd62491524d11433b9ff8d3db5dde32700.tar.xz
wireguard-linux-fe6d7fdd62491524d11433b9ff8d3db5dde32700.zip
mm/damon/core: add damos_filter->allow field
DAMOS filters work as only exclusive (reject) filters. This makes it easy to be confused, and restrictive at combining multiple filters for covering various types of memory. Add a field named 'allow' to damos_filter. The field will be used to indicate whether the filter should work for inclusion or exclusion. To keep the old behavior, set it as 'false' (work as exclusive filter) by default, from damos_new_filter(). Following two commits will make the core and operations set layers, which handles damos_filter objects, respect the field, respectively. Link: https://lkml.kernel.org/r/20250109175126.57878-3-sj@kernel.org Signed-off-by: SeongJae Park <sj@kernel.org> Cc: Jonathan Corbet <corbet@lwn.net> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Diffstat (limited to '')
-rw-r--r--mm/damon/core.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/mm/damon/core.c b/mm/damon/core.c
index 52e50f183ffe..bdde532ebbc8 100644
--- a/mm/damon/core.c
+++ b/mm/damon/core.c
@@ -275,6 +275,7 @@ struct damos_filter *damos_new_filter(enum damos_filter_type type,
return NULL;
filter->type = type;
filter->matching = matching;
+ filter->allow = false;
INIT_LIST_HEAD(&filter->list);
return filter;
}