include/linux/damon.h | 6 ++ mm/damon/core.c | 188 ++++++++++++++++++++++++++++++++++++--- mm/damon/sysfs-schemes.c | 12 +++ 3 files changed, 192 insertions(+), 14 deletions(-)
Changes since v5:
=================
https://lore.kernel.org/linux-mm/20260404012215.1539-1-ravis.opensrc@gmail.com/
- Rebased onto mm-new instead of damon/next for sashiko review
- Removed Reported-by/Closes tags per maintainer feedback (not needed
for bugs found before merge)
Changes since v4:
=================
https://lore.kernel.org/linux-mm/20260320190453.1430-1-ravis.opensrc@gmail.com/
- Fixed commit message description for DAMOS_QUOTA_NODE_INELIGIBLE_MEM_BP
per review feedback
- Added clarifying comment for ops-common.h include (for damon_get_folio())
- Fixed build error when CONFIG_DAMON_PADDR is disabled by adding
#ifdef CONFIG_DAMON_PADDR guards around functions using damon_get_folio()
- Dropped RFC tag per maintainer feedback
This patch is based on top of mm-new.
Background and Motivation
=========================
In heterogeneous memory systems, controlling memory distribution across
NUMA nodes is essential for performance optimization. This patch enables
system-wide page distribution with target-state goals such as "maintain
30% of scheme-eligible memory on CXL" using PA-mode DAMON schemes.
What These Metrics Measure
==========================
node_eligible_mem_bp:
scheme_eligible_bytes_on_node / total_scheme_eligible_bytes * 10000
node_ineligible_mem_bp:
(total - scheme_eligible_bytes_on_node) / total * 10000
These metrics are complementary: eligible_bp + ineligible_bp = 10000 bp.
Two-Scheme Setup for Hot Page Distribution
==========================================
For maintaining hot memory on DRAM (node 0) and CXL (node 1) in a 7:3
ratio:
PUSH scheme: migrate_hot from node 0 -> node 1
goal: node_ineligible_mem_bp, nid=0, target=3000
"Move hot pages from DRAM to CXL if more than 70% of hot data is
in DRAM"
PULL scheme: migrate_hot from node 1 -> node 0
goal: node_eligible_mem_bp, nid=0, target=7000
"Move hot pages from CXL to DRAM if less than 70% of hot data is
in DRAM"
The complementary goals create a feedback loop that converges to the
target distribution.
Testing Results
===============
Functionally tested on a two-node heterogeneous memory system with DRAM
(node 0) and CXL memory (node 1). A PUSH+PULL scheme configuration using
migrate_hot actions was used to reach a target hot memory ratio between
the two tiers. Testing used the TEMPORAL goal tuner available in
damon/next and mm-unstable.
With the TEMPORAL tuner, the system converges quickly to the target
distribution. The tuner drives esz to maximum when under goal and to
zero once the goal is met, forming a simple on/off feedback loop that
stabilizes at the desired ratio.
With the CONSIST tuner, the scheme still converges but more slowly, as
it migrates and then throttles itself based on quota feedback. The time
to reach the goal varies depending on workload intensity.
Note: These metrics work with both TEMPORAL and CONSIST goal tuners.
Ravi Jonnalagadda (1):
mm/damon: add node_eligible_mem_bp and node_ineligible_mem_bp goal
metrics
include/linux/damon.h | 6 ++
mm/damon/core.c | 188 ++++++++++++++++++++++++++++++++++++---
mm/damon/sysfs-schemes.c | 12 +++
3 files changed, 192 insertions(+), 14 deletions(-)
base-commit: b47b4fa4c232ee36aae58630e9d6520e35d33f3a
--
2.43.0
Hello Ravi, On Sun, 5 Apr 2026 11:42:46 -0700 Ravi Jonnalagadda <ravis.opensrc@gmail.com> wrote: > Changes since v5: > ================= > https://lore.kernel.org/linux-mm/20260404012215.1539-1-ravis.opensrc@gmail.com/ > > - Rebased onto mm-new instead of damon/next for sashiko review Thank you for doing this. sashiko was able to review and find some good points. I shared the full review with my opinions as a reply to the patch 1. Please check and reply. > - Removed Reported-by/Closes tags per maintainer feedback (not needed > for bugs found before merge) > > Changes since v4: > ================= > https://lore.kernel.org/linux-mm/20260320190453.1430-1-ravis.opensrc@gmail.com/ > > - Fixed commit message description for DAMOS_QUOTA_NODE_INELIGIBLE_MEM_BP > per review feedback > - Added clarifying comment for ops-common.h include (for damon_get_folio()) > - Fixed build error when CONFIG_DAMON_PADDR is disabled by adding > #ifdef CONFIG_DAMON_PADDR guards around functions using damon_get_folio() > - Dropped RFC tag per maintainer feedback > > This patch is based on top of mm-new. > > Background and Motivation > ========================= > > In heterogeneous memory systems, controlling memory distribution across > NUMA nodes is essential for performance optimization. This patch enables > system-wide page distribution with target-state goals such as "maintain > 30% of scheme-eligible memory on CXL" using PA-mode DAMON schemes. > > What These Metrics Measure > ========================== > > node_eligible_mem_bp: > scheme_eligible_bytes_on_node / total_scheme_eligible_bytes * 10000 > > node_ineligible_mem_bp: > (total - scheme_eligible_bytes_on_node) / total * 10000 > > These metrics are complementary: eligible_bp + ineligible_bp = 10000 bp. As I mentioned on sashiko review, I now think node_ineligible_mem_bp is a confusing name, and thinking a new name, maybe node_eligible_mem_bp_complement is better. Let's further discuss on sashiko review reply thread. > > Two-Scheme Setup for Hot Page Distribution > ========================================== > > For maintaining hot memory on DRAM (node 0) and CXL (node 1) in a 7:3 > ratio: > > PUSH scheme: migrate_hot from node 0 -> node 1 > goal: node_ineligible_mem_bp, nid=0, target=3000 > "Move hot pages from DRAM to CXL if more than 70% of hot data is > in DRAM" > > PULL scheme: migrate_hot from node 1 -> node 0 > goal: node_eligible_mem_bp, nid=0, target=7000 > "Move hot pages from CXL to DRAM if less than 70% of hot data is > in DRAM" > > The complementary goals create a feedback loop that converges to the > target distribution. > > Testing Results > =============== > > Functionally tested on a two-node heterogeneous memory system with DRAM > (node 0) and CXL memory (node 1). A PUSH+PULL scheme configuration using > migrate_hot actions was used to reach a target hot memory ratio between > the two tiers. Testing used the TEMPORAL goal tuner available in > damon/next and mm-unstable. > > With the TEMPORAL tuner, the system converges quickly to the target > distribution. The tuner drives esz to maximum when under goal and to > zero once the goal is met, forming a simple on/off feedback loop that > stabilizes at the desired ratio. > > With the CONSIST tuner, the scheme still converges but more slowly, as > it migrates and then throttles itself based on quota feedback. The time > to reach the goal varies depending on workload intensity. > > Note: These metrics work with both TEMPORAL and CONSIST goal tuners. > > Ravi Jonnalagadda (1): > mm/damon: add node_eligible_mem_bp and node_ineligible_mem_bp goal > metrics > > include/linux/damon.h | 6 ++ > mm/damon/core.c | 188 ++++++++++++++++++++++++++++++++++++--- > mm/damon/sysfs-schemes.c | 12 +++ > 3 files changed, 192 insertions(+), 14 deletions(-) Btw, having a cover letter for single patch looks odd. Why don't you add this cover letter to the patch's commit message? Thanks, SJ [...]
© 2016 - 2026 Red Hat, Inc.