mm/damon/core: support damos_filter->allow
authorSeongJae Park <sj@kernel.org>
Thu, 9 Jan 2025 17:51:19 +0000 (09:51 -0800)
committerAndrew Morton <akpm@linux-foundation.org>
Sun, 26 Jan 2025 04:22:32 +0000 (20:22 -0800)
commit491fee286e566e5e8af7f4c0330e179e47af2d00
treef40e2d1296c8e79f088a9e93e7d0f8e3bdfe34f4
parentfe6d7fdd62491524d11433b9ff8d3db5dde32700
mm/damon/core: support damos_filter->allow

DAMOS filters supports allowing behavior, but the core layer's DAMOS
filters handling logic still assumes only rejecting (filtering-out)
behavior.  Update the logic to aware of and respect the behavioral
decision by reading damos_filter->allow when making the decision to
exclude a region or not.

Link: https://lkml.kernel.org/r/20250109175126.57878-4-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>
mm/damon/core.c
mm/damon/tests/core-kunit.h