* [RFC PATCH 1/4] mm/damon/reclaim: enable monitoring intervals auto-tune by default
2026-11-20 6:07 [RFC PATCH 0/4] mm/damon/reclaim: enable auto-tuning features by default SJ Park
@ 2026-11-20 6:07 ` SJ Park
2026-11-20 6:07 ` [RFC PATCH 2/4] mm/damon/reclaim: set memory PSI 0.05% as default quota goal SJ Park
` (2 subsequent siblings)
3 siblings, 0 replies; 5+ messages in thread
From: SJ Park @ 2026-11-20 6:07 UTC (permalink / raw)
Cc: SJ Park, Andrew Morton, damon, linux-mm
DAMON_RECLAIM provides monitoring intervals auto-tuning feature. It is
turned off by default, though. It is expected to be only better than
the default values of static intervals in real use cases. Enable the
auto-tuning.
Signed-off-by: SJ Park <sj@kernel.org>
---
mm/damon/reclaim.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/mm/damon/reclaim.c b/mm/damon/reclaim.c
index a84cea070ec76..2241b3e9145ef 100644
--- a/mm/damon/reclaim.c
+++ b/mm/damon/reclaim.c
@@ -98,9 +98,9 @@ module_param(quota_autotune_feedback, ulong, 0600);
* sampling intervals 5 milliseconds in minimum, and 10 seconds in maximum.
* Setting this to ``N`` disables the auto-tuning.
*
- * Disabled by default.
+ * Enabled by default.
*/
-static bool autotune_monitoring_intervals __read_mostly;
+static bool autotune_monitoring_intervals __read_mostly = true;
module_param(autotune_monitoring_intervals, bool, 0600);
static struct damos_watermarks damon_reclaim_wmarks = {
--
2.47.3
^ permalink raw reply related [flat|nested] 5+ messages in thread* [RFC PATCH 2/4] mm/damon/reclaim: set memory PSI 0.05% as default quota goal
2026-11-20 6:07 [RFC PATCH 0/4] mm/damon/reclaim: enable auto-tuning features by default SJ Park
2026-11-20 6:07 ` [RFC PATCH 1/4] mm/damon/reclaim: enable monitoring intervals auto-tune " SJ Park
@ 2026-11-20 6:07 ` SJ Park
2026-11-20 6:07 ` [RFC PATCH 3/4] mm/damon/reclaim: disable watermarks by default SJ Park
2026-11-20 6:07 ` [RFC PATCH 4/4] Docs/admin-guide/mm/damon/reclaim: update for changed default parameters SJ Park
3 siblings, 0 replies; 5+ messages in thread
From: SJ Park @ 2026-11-20 6:07 UTC (permalink / raw)
Cc: SJ Park, Andrew Morton, damon, linux-mm
DAMON_RECLAIM provides a PSI-driven quota auto-tuning feature. Because
of the DAMOS quota internal access pattern based region prioritization,
it means the coldness threshold (min_age) is also auto-tuned. It is
tuned off by default, though. The feature is expected to be only better
to be enabled. Enable it by default. Set 0.5 milliseconds per second
(0.5%) as the default auto-tuning target memory pressure ratio.
Signed-off-by: SJ Park <sj@kernel.org>
---
mm/damon/reclaim.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/mm/damon/reclaim.c b/mm/damon/reclaim.c
index 2241b3e9145ef..d297b1596704b 100644
--- a/mm/damon/reclaim.c
+++ b/mm/damon/reclaim.c
@@ -69,9 +69,9 @@ DEFINE_DAMON_MODULES_DAMOS_QUOTAS(damon_reclaim_quota);
* compared to this value to see if the aim is satisfied. Value zero means
* disabling this auto-tuning feature.
*
- * Disabled by default.
+ * 500 microseconds (0.05% of default quota reset interval) by default.
*/
-static unsigned long quota_mem_pressure_us __read_mostly;
+static unsigned long quota_mem_pressure_us __read_mostly = 500;
module_param(quota_mem_pressure_us, ulong, 0600);
/*
--
2.47.3
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [RFC PATCH 3/4] mm/damon/reclaim: disable watermarks by default
2026-11-20 6:07 [RFC PATCH 0/4] mm/damon/reclaim: enable auto-tuning features by default SJ Park
2026-11-20 6:07 ` [RFC PATCH 1/4] mm/damon/reclaim: enable monitoring intervals auto-tune " SJ Park
2026-11-20 6:07 ` [RFC PATCH 2/4] mm/damon/reclaim: set memory PSI 0.05% as default quota goal SJ Park
@ 2026-11-20 6:07 ` SJ Park
2026-11-20 6:07 ` [RFC PATCH 4/4] Docs/admin-guide/mm/damon/reclaim: update for changed default parameters SJ Park
3 siblings, 0 replies; 5+ messages in thread
From: SJ Park @ 2026-11-20 6:07 UTC (permalink / raw)
Cc: SJ Park, Andrew Morton, damon, linux-mm
DAMON_RECLAIM's free memory based watermarks features were introduced as
a safe guard for wrongly-tuned coldness threshold (min_age). The
default watermark values were chosen to let users easily understand how
those can be set and tuned. The default values are never meant to be
used as are. DAMON_RECLAIM is later updated to enable PSI-driven
coldness threshold auto-tuning by default. When the auto-tuning is
enabled, having the watermarks with the default values makes no sense.
Disable the watermarks by default.
Signed-off-by: SJ Park <sj@kernel.org>
---
mm/damon/reclaim.c | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/mm/damon/reclaim.c b/mm/damon/reclaim.c
index d297b1596704b..a8b18f51e99d5 100644
--- a/mm/damon/reclaim.c
+++ b/mm/damon/reclaim.c
@@ -103,12 +103,13 @@ module_param(quota_autotune_feedback, ulong, 0600);
static bool autotune_monitoring_intervals __read_mostly = true;
module_param(autotune_monitoring_intervals, bool, 0600);
+/* Watermarks are effectively disabled by default. */
static struct damos_watermarks damon_reclaim_wmarks = {
.metric = DAMOS_WMARK_FREE_MEM_RATE,
.interval = 5000000, /* 5 seconds */
- .high = 500, /* 50 percent */
- .mid = 400, /* 40 percent */
- .low = 200, /* 20 percent */
+ .high = 1000, /* 100 percent */
+ .mid = 1000, /* 100 percent */
+ .low = 0, /* 0 percent */
};
DEFINE_DAMON_MODULES_WMARKS_PARAMS(damon_reclaim_wmarks);
--
2.47.3
^ permalink raw reply related [flat|nested] 5+ messages in thread* [RFC PATCH 4/4] Docs/admin-guide/mm/damon/reclaim: update for changed default parameters
2026-11-20 6:07 [RFC PATCH 0/4] mm/damon/reclaim: enable auto-tuning features by default SJ Park
` (2 preceding siblings ...)
2026-11-20 6:07 ` [RFC PATCH 3/4] mm/damon/reclaim: disable watermarks by default SJ Park
@ 2026-11-20 6:07 ` SJ Park
3 siblings, 0 replies; 5+ messages in thread
From: SJ Park @ 2026-11-20 6:07 UTC (permalink / raw)
Cc: SJ Park, Jonathan Corbet, Randy Dunlap, Shuah Khan, damon,
linux-doc, linux-mm
Update DAMON_RECLAIM user documentation to reflect the changed default
parameter values. Intervals and PSI-driven coldness threshold
auto-tuning features are enabled by default. The free memory ratio
based watermarks feature is disabled by default.
Signed-off-by: SJ Park <sj@kernel.org>
---
Documentation/admin-guide/mm/damon/reclaim.rst | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/Documentation/admin-guide/mm/damon/reclaim.rst b/Documentation/admin-guide/mm/damon/reclaim.rst
index 0ef784df98680..79d24e3819cea 100644
--- a/Documentation/admin-guide/mm/damon/reclaim.rst
+++ b/Documentation/admin-guide/mm/damon/reclaim.rst
@@ -95,7 +95,7 @@ amount of access events in each DAMON-snapshot, while keeping the sampling
interval 5 milliseconds in minimum, and 10 seconds in maximum. Setting this to
``N`` disables the auto-tuning.
-Disabled by default.
+Enabled by default.
quota_ms
--------
@@ -145,7 +145,7 @@ per quota reset interval (``quota_reset_interval_ms``) is collected and
compared to this value to see if the aim is satisfied. Value zero means
disabling this auto-tuning feature.
-Disabled by default.
+500 microseconds (0.05 percent of default quota reset interval) by default.
quota_autotune_feedback
-----------------------
@@ -196,7 +196,8 @@ granularity reclamation logic.
To keep DAMON_RECLAIM always active regardless of the free memory rate, set
``wmarks_high``, ``wmarks_mid`` and ``wmarks_low`` to ``1000``, ``1000`` and
-``0``, respectively.
+``0``, respectively. Use of watermarks is not recommended and therefore
+disabled by default.
sample_interval
---------------
--
2.47.3
^ permalink raw reply related [flat|nested] 5+ messages in thread