* [RFC PATCH v2.1 0/7] mm/damon: introduce probe_hits_wsum DAMOS core filter
@ 2026-09-10 4:03 SJ Park
2026-09-10 4:03 ` [RFC PATCH v2.1 6/7] Docs/mm/damon/design: update for " SJ Park
2026-09-10 4:03 ` [RFC PATCH v2.1 7/7] Docs/admin-guide/mm/damon/usage: update for probe_hits_wsum DAMOS filter SJ Park
0 siblings, 2 replies; 3+ messages in thread
From: SJ Park @ 2026-09-10 4:03 UTC (permalink / raw)
Cc: SJ Park, Liam R. Howlett, Andrew Morton, David Hildenbrand,
Jonathan Corbet, Lorenzo Stoakes, Michal Hocko, Mike Rapoport,
Randy Dunlap, Shuah Khan, Suren Baghdasaryan, Vlastimil Babka,
damon, linux-doc, linux-kernel, linux-mm
DAMON can do flexible data attributes monitoring. The classical data
access monitoring can also be done using the attributes monitoring. The
access event is just one of the data attributes that DAMON supports.
Users do monitoring to make some actions based on it. DAMOS is a
feature for automating that. However, DAMOS cannot utilize the data
attributes monitoring results. It is still Data "Access"
Monitoring-based Operation Schemes. It requires users to set the target
"access" pattern.
DAMOS core filter is effectively the same as the target access pattern.
It is just a more generalized and flexible way of describing the
operation action target region. Introduce a new DAMOS core filter type,
probe_hits_wsum. It specifies the filter target based on a range of the
probe hits weighted sum. Using this, users can apply DAMOS actions to
regions of specific data attributes pattern.
Note that the classic target access pattern still works. Hence the
target nr_accesses range should still be properly configured. The new
filter would be used in only data attributes-only mode. In the mode,
classic access monitoring is just turned off, and therefore nr_accesses
of regions are always zero. Users could simply set the target
nr_accesses range to include the zero nr_Accesses regions.
Patches Sequence
================
Patch 1 updates the DAMON kernel API for the new filter type. Patch 2
extends damon_probe_hits_wsum() to do the calculation based on moving
sum. Patch 3 implements the filter type in the core layer. Patch 4
refactors DAMON sysfs interface internal data structure for efficient
reuse of data structure for the probe hits weighted sum range user
inputs. Patch 5 updates DAMON sysfs interface to support the new filter
type. Patches 6 and 7 update design and usage documents for the new
filter type, respectively.
Changelog
=========
Changes from RFC v2
- RFC v2: https://lore.kernel.org/20260907171218.101430-1-sj@kernel.org
- Rebase to latest mm-new.
Changes from RFC
- RFC: https://lore.kernel.org/20260906210513.106895-1-sj@kernel.org
- Fix kernel-doc typo.
- Use moving sum based weighted sum.
- Fix wrong range saving field names in sysfs.
SJ Park (7):
mm/damon/api: introduce DAMOS_FILTER_TYPE_PROBE_HITS_WSUM
mm/damon/core: extend probe_hits_wsum() for moving sum based
calculation
mm/damon/core: support probe_hits_wsum damos core filter
mm/damon/sysfs-schemes: rename sysfs_filter->sz_range to
range_{min,max}
mm/damon/sysfs-schemes: support probe_hits_wsum damos core filter
Docs/mm/damon/design: update for probe_hits_wsum DAMOS core filter
Docs/admin-guide/mm/damon/usage: update for probe_hits_wsum DAMOS
filter
Documentation/admin-guide/mm/damon/usage.rst | 4 +++
Documentation/mm/damon/design.rst | 3 ++
include/linux/damon.h | 10 ++++++-
mm/damon/core.c | 20 +++++++++++--
mm/damon/paddr.c | 2 +-
mm/damon/sysfs-schemes.c | 30 ++++++++++++++------
mm/damon/vaddr.c | 2 +-
7 files changed, 57 insertions(+), 14 deletions(-)
base-commit: 569e5184af6e299ec0e1f44cde89c2c2bb309a9e
--
2.47.3
^ permalink raw reply [flat|nested] 3+ messages in thread
* [RFC PATCH v2.1 6/7] Docs/mm/damon/design: update for probe_hits_wsum DAMOS core filter
2026-09-10 4:03 [RFC PATCH v2.1 0/7] mm/damon: introduce probe_hits_wsum DAMOS core filter SJ Park
@ 2026-09-10 4:03 ` SJ Park
2026-09-10 4:03 ` [RFC PATCH v2.1 7/7] Docs/admin-guide/mm/damon/usage: update for probe_hits_wsum DAMOS filter SJ Park
1 sibling, 0 replies; 3+ messages in thread
From: SJ Park @ 2026-09-10 4:03 UTC (permalink / raw)
Cc: SJ Park, Liam R. Howlett, Andrew Morton, David Hildenbrand,
Jonathan Corbet, Lorenzo Stoakes, Michal Hocko, Mike Rapoport,
Randy Dunlap, Shuah Khan, Suren Baghdasaryan, Vlastimil Babka,
damon, linux-doc, linux-kernel, linux-mm
Update DAMON design document for the newly added probe hits weighted sum
based DAMOS core filter type.
Signed-off-by: SJ Park <sj@kernel.org>
---
Documentation/mm/damon/design.rst | 3 +++
1 file changed, 3 insertions(+)
diff --git a/Documentation/mm/damon/design.rst b/Documentation/mm/damon/design.rst
index aac84de261aa8..8e980dde362de 100644
--- a/Documentation/mm/damon/design.rst
+++ b/Documentation/mm/damon/design.rst
@@ -822,6 +822,9 @@ Below ``type`` of filters are currently supported.
- Applied to pages that belonging to a given address range.
- target
- Applied to pages that belonging to a given DAMON monitoring target.
+ - probe_hits_wsum
+ - Matches to monitoring regions having a given range of :ref:`probe
+ hits weighted sum <damon_design_attrs_only_monitoring>` value.
- Operations layer handled, supported by only ``paddr`` operations set.
- anon
- Applied to pages that containing data that not stored in files.
--
2.47.3
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [RFC PATCH v2.1 7/7] Docs/admin-guide/mm/damon/usage: update for probe_hits_wsum DAMOS filter
2026-09-10 4:03 [RFC PATCH v2.1 0/7] mm/damon: introduce probe_hits_wsum DAMOS core filter SJ Park
2026-09-10 4:03 ` [RFC PATCH v2.1 6/7] Docs/mm/damon/design: update for " SJ Park
@ 2026-09-10 4:03 ` SJ Park
1 sibling, 0 replies; 3+ messages in thread
From: SJ Park @ 2026-09-10 4:03 UTC (permalink / raw)
Cc: SJ Park, Liam R. Howlett, Andrew Morton, David Hildenbrand,
Jonathan Corbet, Lorenzo Stoakes, Michal Hocko, Mike Rapoport,
Randy Dunlap, Shuah Khan, Suren Baghdasaryan, Vlastimil Babka,
damon, linux-doc, linux-kernel, linux-mm
Update DAMON usage document for the newly added probe hits weighted sum
based DAMOS core filter type.
Signed-off-by: SJ Park <sj@kernel.org>
---
Documentation/admin-guide/mm/damon/usage.rst | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/Documentation/admin-guide/mm/damon/usage.rst b/Documentation/admin-guide/mm/damon/usage.rst
index 023c6334024f8..d3e37400367bd 100644
--- a/Documentation/admin-guide/mm/damon/usage.rst
+++ b/Documentation/admin-guide/mm/damon/usage.rst
@@ -551,6 +551,10 @@ and ``damon_target_idx``. To ``type`` file, you can write the type of the
filter. Refer to :ref:`the design doc <damon_design_damos_filters>` for
available type names, their meaning and on what layer those are handled.
+For ``probe_hits_wsum`` type, you can specify the minimum and maximum probe
+hits weighted sum value for the filter to ``min`` and ``max`` files,
+respectively.
+
For ``memcg`` type, you can specify the memory cgroup of the interest by
writing the path of the memory cgroup from the cgroups mount point to
``memcg_path`` file. For ``addr`` type, you can specify the start and end
--
2.47.3
^ permalink raw reply related [flat|nested] 3+ messages in thread
end of thread, other threads:[~2026-09-10 4:03 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-09-10 4:03 [RFC PATCH v2.1 0/7] mm/damon: introduce probe_hits_wsum DAMOS core filter SJ Park
2026-09-10 4:03 ` [RFC PATCH v2.1 6/7] Docs/mm/damon/design: update for " SJ Park
2026-09-10 4:03 ` [RFC PATCH v2.1 7/7] Docs/admin-guide/mm/damon/usage: update for probe_hits_wsum DAMOS filter SJ Park
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox