]> www.infradead.org Git - users/jedix/linux-maple.git/commit
mm/damon/core: add damos_filter->allow field
authorSeongJae Park <sj@kernel.org>
Thu, 9 Jan 2025 17:51:18 +0000 (09:51 -0800)
committerAndrew Morton <akpm@linux-foundation.org>
Sun, 26 Jan 2025 04:22:31 +0000 (20:22 -0800)
commitfe6d7fdd62491524d11433b9ff8d3db5dde32700
tree02b6e1aa5a5af56dbda16d9ebbcff3c5f6802754
parente20f52e8e3b7947e40bd40c6cdc69884c6df716c
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>
include/linux/damon.h
mm/damon/core.c