mm/damon: extend DAMOS filters for inclusion
Status from this message: [merged mm-stable] docs-admin-guide-mm-damon-usage-document-damos-filter-allow-sysfs-file.patch removed from -mm tree
Get series with b4
b4 am [email protected]Versions newest first · linked by author and title
- v2 Latest10 patches 0 repliesApplied 10/10
- v110 patches 3 repliesSuperseded
Changes in v2 from the cover letter
(https://lore.kernel.org/[email protected])
- Correct wrong comments and documents about pass filters without successing block filters
- Rename 'pass/block' to 'allow/reject'
(to avoid confusion with sz_[ops]_filter_pass)
Patches in v2 All 10 applied
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v2 yet.
Cover letter [PATCH v2 00/10] mm/damon: extend DAMOS filters for inclusion
DAMOS fitlers are exclusive filters. It only excludes memory of given criterias from the DAMOS action targets. This has below limitations.
First, the name is not explicitly explaining the behavior. This actually resulted in users' confusions[1]. Secondly, combined uses of multiple filters provide only restriced coverages. For example, building a DAMOS scheme that applies the action to memory that belongs to cgroup A "or" cgroup B is impossible. A workaround would be using two schemes that fitlers out memory that not belong to cgroup A and cgroup B, respectively. It is cumbersome, and difficult to control quota-like per-scheme features in an orchestration. Monitoring of filters-passed memory statistic will also be complicated.
Extend DAMOS filters to support not only exclusion (rejecting), but also inclusion (allowing) behavior. For this, add a new damos_filter struct field called 'allow' for DAMON kernel API users. The filter works as an inclusion or exclusion filter when it is set or unset, respectively. For DAMON user-space ABI users, add a DAMON sysfs file of same name under DAMOS filter sysfs directory. To prevent exposing a behavioral change to old users, set rejecting as the default behavior.
Note that allow-filters work for only inclusion, not exclusion of memory that not satisfying the criteria. And the default behavior of DAMOS for memory that no filter has involved is that the action can be applied to those memory. Also, filters-passed memory statistics are for any memory that passed through the DAMOS filters check stage. These implies installing allow-filters at the endof the filter list is useless. Refer to the design doc change of this series for more details.
[1] https://lore.kernel.org/[email protected]
Revision History
================
Changes from v1
(https://lore.kernel.org/[email protected])
- Correct wrong comments and documents about pass filters without successing block filters
- Rename 'pass/block' to 'allow/reject'
(to avoid confusion with sz_[ops]_filter_pass)
Changes from RFC v2
(https://lore.kernel.org/[email protected])
- Wordsmith messages
- Wordsmith design documentation about monitoring-purpose usage
- Rebase on latest mm-unstable
Changes from RFC v1
(https://lore.kernel.org/[email protected])
- Fix encoding issue on the last patch
SeongJae Park (10):
mm/damon: fixup damos_filter kernel-doc
mm/damon/core: add damos_filter->allow field mm/damon/core: support damos_filter->allow
mm/damon/paddr: support damos_filter->allow
mm/damon: add 'allow' argument to damos_new_filter() mm/damon/sysfs-schemes: add a file for setting damos_filter->allow Docs/mm/damon/design: document allow/reject DAMOS filter behaviors Docs/ABI/damon: document DAMOS filter allow sysfs file Docs/admin-guide/mm/damon/usage: omit DAMOS filter details in favor of
design doc
Docs/admin-guide/mm/damon/usage: document DAMOS filter 'allow' sysfs
file
.../ABI/testing/sysfs-kernel-mm-damon | 13 +++-- Documentation/admin-guide/mm/damon/usage.rst | 54 ++++++++++--------- Documentation/mm/damon/design.rst | 33 ++++++++++-- include/linux/damon.h | 15 +++--- mm/damon/core.c | 12 +++-- mm/damon/paddr.c | 9 ++-- mm/damon/reclaim.c | 2 +- mm/damon/sysfs-schemes.c | 32 ++++++++++- mm/damon/tests/core-kunit.h | 14 ++--- 9 files changed, 127 insertions(+), 57 deletions(-)
Signature · 1 line
2.39.5