Skip to content

mm/damon: make allow filters after reject filters useful and intuitive

SeongJae Park damon linux-doc linux-mm lkml 1 version Applied

Status from this message: [merged mm-stable] docs-mm-damon-design-update-for-changed-filter-default-behavior.patch removed from -mm tree

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest9 patches 0 repliesApplied 9/9

Changes from RFC v2 from the cover letter

(https://lore.kernel.org/[email protected])
- Wordsmith commit messages
- Rebase on latest mm-unstable

Patches in v1 All 9 applied

#Subject and filesSizeRepliesApplied
1/9mm/damon/core: introduce damos->ops_filtersinclude/linux/damon.h mm/damon/core.c+9 -00 repliesApplied
2/9mm/damon/paddr: support ops_filtersmm/damon/paddr.c+12 -00 repliesApplied
3/9mm/damon/core: support committing ops_filtersmm/damon/core.c+39 -10 repliesApplied
4/9mm/damon/core: put ops-handled filters to damos->ops_filtersmm/damon/core.c+16 -10 repliesApplied
5/9mm/damon/paddr: support only damos->ops_filtersmm/damon/paddr.c+0 -120 repliesApplied
6/9mm/damon: add default allow/reject behavior fields to struct damosinclude/linux/damon.h+3 -00 repliesApplied
7/9mm/damon/core: set damos_filter default allowance behavior based on installed filtersmm/damon/core.c+32 -20 repliesApplied
8/9mm/damon/paddr: respect ops_filters_default_rejectmm/damon/paddr.c+1 -10 repliesApplied
9/9Docs/mm/damon/design: update for changed filter-default behaviorDocumentation/mm/damon/design.rst+3 -70 repliesApplied

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH 0/9] mm/damon: make allow filters after reject filters useful and intuitive

DAMOS filters do allow or reject elements of memory for given DAMOS scheme only if those match the filter criterias. For elements that don't match any DAMOS filter, 'allowing' is the default behavior. This makes allow-filters that don't have any reject-filter after them meaningless sources of overhead. The decision was made to keep the behavior consistent with that before the introduction of allow-filters. This, however, makes usage of DAMOS filters confusing and inefficient. It is more intuitive and still consistent behavior to reject by default unless there is no filter at all or the last filter is a reject filter. Update the filtering logic in the way and update documents to clarify the behavior.

Note that this is changing the old behavior. But the old behavior for the problematic filter combination was definitely confusing, inefficient and anyway useless. Also, the behavior has relatively recently introduced. It is difficult to anticipate any user that depends on the behavior. Hence this is not a user-breaking behavior change but an obvious improvement.

Changes from RFC v2
(https://lore.kernel.org/[email protected])
- Wordsmith commit messages
- Rebase on latest mm-unstable

Changes from RFC v1
(https://lore.kernel.org/[email protected])
- Set default behavior on core layer filtering stage as allow if any ops layer filter exists.
- Wordsmith commit messages
- Rebase on latest mm-unstable

SeongJae Park (9):
mm/damon/core: introduce damos->ops_filters mm/damon/paddr: support ops_filters
mm/damon/core: support committing ops_filters mm/damon/core: put ops-handled filters to damos->ops_filters mm/damon/paddr: support only damos->ops_filters mm/damon: add default allow/reject behavior fields to struct damos mm/damon/core: set damos_filter default allowance behavior based on
installed filters
mm/damon/paddr: respect ops_filters_default_reject Docs/mm/damon/design: update for changed filter-default behavior

 Documentation/mm/damon/design.rst | 10 ++--
 include/linux/damon.h             | 11 ++++
 mm/damon/core.c                   | 90 +++++++++++++++++++++++++++++--
 mm/damon/paddr.c                  |  8 +--
 4 files changed, 105 insertions(+), 14 deletions(-)

base-commit: 2f0a33016d6d4f184f2d3341af17a360b83e2ee2

Signature · 1 line
2.39.5