* [RFC PATCH v2 00/10] mm/damon: support multiple goal-based quota tuning algorithms
@ 2026-03-04 4:41 SeongJae Park
2026-03-04 4:41 ` [RFC PATCH v2 05/10] Docs/mm/damon/design: document the goal-based quota tuner selections SeongJae Park
` (3 more replies)
0 siblings, 4 replies; 6+ messages in thread
From: SeongJae Park @ 2026-03-04 4:41 UTC (permalink / raw)
Cc: SeongJae Park, Liam R. Howlett, Andrew Morton, David Hildenbrand,
Jonathan Corbet, Lorenzo Stoakes, Michal Hocko, Mike Rapoport,
Shuah Khan, Shuah Khan, Suren Baghdasaryan, Vlastimil Babka,
damon, linux-doc, linux-kernel, linux-kselftest, linux-mm
Aim-oriented DAMOS quota auto-tuning uses a single tuning algorithm.
The algorithm is designed to find a quota value that should be
consistently kept for achieving the aimed goal for long term. It is
useful and reliable at automatically operating systems that have dynamic
environments in the long term.
As always, however, no single algorithm fits all. When the environment
has static characteristics or there are control towers in not only the
kernel space but also the user space, the algorithm shows some
limitations. In such environments, users want kernel work in a more
short term deterministic way. Actually there were at least two reports
[1,2] of such cases.
Extend DAMOS quotas goal to support multiple quota tuning algorithms
that users can select. Keep the current algorithm as the default one,
to not break the old users. Also give it a name, "consist", as it is
designed to "consistently" apply the DAMOS action. And introduce a new
tuning algorithm, namely "temporal". It is designed to apply the DAMOS
action only temporally, in a deterministic way. In more detail, as long
as the goal is under-achieved, it uses the maximum quota available.
Once the goal is over-achieved, it sets the quota zero.
Tests
=====
I confirmed the feature is working as expected using the latest version
of DAMON user-space tool, like below.
$ # start DAMOS for reclaiming memory aiming 30% free memory
$ sudo ./damo/damo start --damos_action pageout \
--damos_quota_goal_tuner temporal \
--damos_quota_goal node_mem_free_bp 30% 0 \
--damos_quota_interval 1s \
--damos_quota_space 100M
Note that >=3.1.8 version of DAMON user-space tool supports this feature
(--damos_quota_goal_tuner). As expected, DAMOS stops reclaiming memory
as soon as the goal amount of free memory is made. When 'consist' tuner
is used, the reclamation was continued even after the goal amount of
free memory is made, resulting in more than goal amount of free memory,
as expected.
Patch Sequence
==============
First four patches implement the features. Patch 1 extends core API to
allow multiple tuners and make the current tuner as the default and only
available tuner, namely 'consist'. Patch 2 allows future tuners setting
zero effective quota. Patch 3 introduces the second tuner, namely
'temporal'. Patch 4 further extends DAMON sysfs API to let users use
that.
Three following patches (patches 5-7) update design, usage, and ABI
documents, respectively.
Final three patches (patches 8-10) are for adding selftests. The eighth
and the ninth patches extend the testing-purpose DAMON sysfs control
helper and DAMON status dumping tool to support the newly added feature.
The tenth patch extends the existing online commit test to cover the new
feature.
References
==========
[1] https://lore.kernel.org/CALa+Y17__d=ZsM1yX+MXx0ozVdsXnFqF4p0g+kATEitrWyZFfg@mail.gmail.com
[2] https://lore.kernel.org/20260204022537.814-1-yunjeong.mun@sk.com
Changelog
=========
Changes from RFC v1
(https://lore.kernel.org/20260212062314.69961-1-sj@kernel.org)
- Add selftest for goal_tuner commitment.
- Set goal tuner inside damon_new_scheme().
- Allow zero size effective size quota.
- Update the ABI document.
- Wordsmith change descriptions.
SeongJae Park (10):
mm/damon/core: introduce damos_quota_goal_tuner
mm/damon/core: allow quota goals set zero effective size quota
mm/damon/core: introduce DAMOS_QUOTA_GOAL_TUNER_TEMPORAL
mm/damon/sysfs-schemes: implement quotas->goal_tuner file
Docs/mm/damon/design: document the goal-based quota tuner selections
Docs/admin-guide/mm/damon/usage: document goal_tuner sysfs file
Docs/ABI/damon: update for goal_tuner
selftests/damon/_damon_sysfs: support goal_tuner setup
selftests/damon/drgn_dump_damon_status: support quota goal_tuner
dumping
selftests/damon/sysfs.py: test goal_tuner commit
.../ABI/testing/sysfs-kernel-mm-damon | 6 ++
Documentation/admin-guide/mm/damon/usage.rst | 16 +++--
Documentation/mm/damon/design.rst | 12 ++++
include/linux/damon.h | 11 ++++
mm/damon/core.c | 60 +++++++++++++++----
mm/damon/sysfs-schemes.c | 58 ++++++++++++++++++
tools/testing/selftests/damon/_damon_sysfs.py | 12 +++-
.../selftests/damon/drgn_dump_damon_status.py | 1 +
tools/testing/selftests/damon/sysfs.py | 7 +++
9 files changed, 166 insertions(+), 17 deletions(-)
base-commit: bbba4ca6322dd5c4f66fe31b1b374f77a8d2b2e5
--
2.47.3
^ permalink raw reply [flat|nested] 6+ messages in thread
* [RFC PATCH v2 05/10] Docs/mm/damon/design: document the goal-based quota tuner selections
2026-03-04 4:41 [RFC PATCH v2 00/10] mm/damon: support multiple goal-based quota tuning algorithms SeongJae Park
@ 2026-03-04 4:41 ` SeongJae Park
2026-03-04 4:41 ` [RFC PATCH v2 06/10] Docs/admin-guide/mm/damon/usage: document goal_tuner sysfs file SeongJae Park
` (2 subsequent siblings)
3 siblings, 0 replies; 6+ messages in thread
From: SeongJae Park @ 2026-03-04 4:41 UTC (permalink / raw)
Cc: SeongJae Park, Liam R. Howlett, Andrew Morton, David Hildenbrand,
Jonathan Corbet, Lorenzo Stoakes, Michal Hocko, Mike Rapoport,
Shuah Khan, Suren Baghdasaryan, Vlastimil Babka, damon, linux-doc,
linux-kernel, linux-mm
Update the design document for the newly added goal-based quota tuner
selection feature.
Signed-off-by: SeongJae Park <sj@kernel.org>
---
Documentation/mm/damon/design.rst | 12 ++++++++++++
1 file changed, 12 insertions(+)
diff --git a/Documentation/mm/damon/design.rst b/Documentation/mm/damon/design.rst
index dd64f5d7f3193..28d932ceaf7ed 100644
--- a/Documentation/mm/damon/design.rst
+++ b/Documentation/mm/damon/design.rst
@@ -564,6 +564,18 @@ aggressiveness (the quota) of the corresponding scheme. For example, if DAMOS
is under achieving the goal, DAMOS automatically increases the quota. If DAMOS
is over achieving the goal, it decreases the quota.
+There are two such tuning algorithms that users can select as they need.
+
+- ``consist``: A proportional feedback loop based algorithm. Tries to find an
+ optimum quota that should be consistently kept, to keep achieving the goal.
+ Useful for kernel-only operation on dynamic and long-running environments.
+ This is the default selection. If unsure, use this.
+- ``temporal``: More straightforward algorithm. Tries to achieve the goal as
+ fast as possible, using maximum allowed quota, but only for a temporal short
+ time. When the quota is under-achieved, this algorithm keeps tuning quota to
+ a maximum allowed one. Once the quota is [over]-achieved, this sets the
+ quota zero. Useful for deterministic control required environments.
+
The goal can be specified with five parameters, namely ``target_metric``,
``target_value``, ``current_value``, ``nid`` and ``path``. The auto-tuning
mechanism tries to make ``current_value`` of ``target_metric`` be same to
--
2.47.3
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [RFC PATCH v2 06/10] Docs/admin-guide/mm/damon/usage: document goal_tuner sysfs file
2026-03-04 4:41 [RFC PATCH v2 00/10] mm/damon: support multiple goal-based quota tuning algorithms SeongJae Park
2026-03-04 4:41 ` [RFC PATCH v2 05/10] Docs/mm/damon/design: document the goal-based quota tuner selections SeongJae Park
@ 2026-03-04 4:41 ` SeongJae Park
2026-03-04 10:15 ` [RFC PATCH v2 00/10] mm/damon: support multiple goal-based quota tuning algorithms Gutierrez Asier
2026-03-07 0:33 ` SeongJae Park
3 siblings, 0 replies; 6+ messages in thread
From: SeongJae Park @ 2026-03-04 4:41 UTC (permalink / raw)
Cc: SeongJae Park, Liam R. Howlett, Andrew Morton, David Hildenbrand,
Jonathan Corbet, Lorenzo Stoakes, Michal Hocko, Mike Rapoport,
Shuah Khan, Suren Baghdasaryan, Vlastimil Babka, damon, linux-doc,
linux-kernel, linux-mm
Update the DAMON usage document for the new sysfs file for the goal
based quota auto-tuning algorithm selection.
Signed-off-by: SeongJae Park <sj@kernel.org>
---
Documentation/admin-guide/mm/damon/usage.rst | 16 ++++++++++++----
1 file changed, 12 insertions(+), 4 deletions(-)
diff --git a/Documentation/admin-guide/mm/damon/usage.rst b/Documentation/admin-guide/mm/damon/usage.rst
index b0f3969b6b3b1..534e1199cf091 100644
--- a/Documentation/admin-guide/mm/damon/usage.rst
+++ b/Documentation/admin-guide/mm/damon/usage.rst
@@ -83,7 +83,7 @@ comma (",").
│ │ │ │ │ │ │ │ sz/min,max
│ │ │ │ │ │ │ │ nr_accesses/min,max
│ │ │ │ │ │ │ │ age/min,max
- │ │ │ │ │ │ │ :ref:`quotas <sysfs_quotas>`/ms,bytes,reset_interval_ms,effective_bytes
+ │ │ │ │ │ │ │ :ref:`quotas <sysfs_quotas>`/ms,bytes,reset_interval_ms,effective_bytes,goal_tuner
│ │ │ │ │ │ │ │ weights/sz_permil,nr_accesses_permil,age_permil
│ │ │ │ │ │ │ │ :ref:`goals <sysfs_schemes_quota_goals>`/nr_goals
│ │ │ │ │ │ │ │ │ 0/target_metric,target_value,current_value,nid,path
@@ -377,9 +377,9 @@ schemes/<N>/quotas/
The directory for the :ref:`quotas <damon_design_damos_quotas>` of the given
DAMON-based operation scheme.
-Under ``quotas`` directory, four files (``ms``, ``bytes``,
-``reset_interval_ms``, ``effective_bytes``) and two directories (``weights`` and
-``goals``) exist.
+Under ``quotas`` directory, five files (``ms``, ``bytes``,
+``reset_interval_ms``, ``effective_bytes`` and ``goal_tuner``) and two
+directories (``weights`` and ``goals``) exist.
You can set the ``time quota`` in milliseconds, ``size quota`` in bytes, and
``reset interval`` in milliseconds by writing the values to the three files,
@@ -390,6 +390,14 @@ apply the action to only up to ``bytes`` bytes of memory regions within the
quota limits unless at least one :ref:`goal <sysfs_schemes_quota_goals>` is
set.
+You can set the goal-based effective quota auto-tuning algorithm to use, by
+writing the algorithm name to ``goal_tuner`` file. Reading the file returns
+the currently selected tuner algorithm. Refer to the design documentation of
+:ref:`automatic quota tuning goals <damon_design_damos_quotas_auto_tuning>` for
+the background design of the feature and the name of the selectable algorithms.
+Refer to :ref:`goals directory <sysfs_schemes_quota_goals>` for the goals
+setup.
+
The time quota is internally transformed to a size quota. Between the
transformed size quota and user-specified size quota, smaller one is applied.
Based on the user-specified :ref:`goal <sysfs_schemes_quota_goals>`, the
--
2.47.3
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [RFC PATCH v2 00/10] mm/damon: support multiple goal-based quota tuning algorithms
2026-03-04 4:41 [RFC PATCH v2 00/10] mm/damon: support multiple goal-based quota tuning algorithms SeongJae Park
2026-03-04 4:41 ` [RFC PATCH v2 05/10] Docs/mm/damon/design: document the goal-based quota tuner selections SeongJae Park
2026-03-04 4:41 ` [RFC PATCH v2 06/10] Docs/admin-guide/mm/damon/usage: document goal_tuner sysfs file SeongJae Park
@ 2026-03-04 10:15 ` Gutierrez Asier
2026-03-04 15:03 ` SeongJae Park
2026-03-07 0:33 ` SeongJae Park
3 siblings, 1 reply; 6+ messages in thread
From: Gutierrez Asier @ 2026-03-04 10:15 UTC (permalink / raw)
To: SeongJae Park
Cc: Liam R. Howlett, Andrew Morton, David Hildenbrand,
Jonathan Corbet, Lorenzo Stoakes, Michal Hocko, Mike Rapoport,
Shuah Khan, Shuah Khan, Suren Baghdasaryan, Vlastimil Babka,
damon, linux-doc, linux-kernel, linux-kselftest, linux-mm
Hi SeongJae!
Nice idea for dynamic environments.
On 3/4/2026 7:41 AM, SeongJae Park wrote:
> Aim-oriented DAMOS quota auto-tuning uses a single tuning algorithm.
> The algorithm is designed to find a quota value that should be
> consistently kept for achieving the aimed goal for long term. It is
> useful and reliable at automatically operating systems that have dynamic
> environments in the long term.
>
> As always, however, no single algorithm fits all. When the environment
> has static characteristics or there are control towers in not only the
> kernel space but also the user space, the algorithm shows some
> limitations. In such environments, users want kernel work in a more
> short term deterministic way. Actually there were at least two reports
> [1,2] of such cases.
>
> Extend DAMOS quotas goal to support multiple quota tuning algorithms
> that users can select. Keep the current algorithm as the default one,
> to not break the old users. Also give it a name, "consist", as it is
> designed to "consistently" apply the DAMOS action. And introduce a new
> tuning algorithm, namely "temporal". It is designed to apply the DAMOS
> action only temporally, in a deterministic way. In more detail, as long
> as the goal is under-achieved, it uses the maximum quota available.
> Once the goal is over-achieved, it sets the quota zero.
I'm not sure "temporal" is the best name for this type of behaviour.
How about "by_score?". For example, "damos_goal_tune_esz_bp_by_score" and
DAMOS_QUOTA_GOAL_TUNER_BY_SCORE.
> Tests
> =====
>
> I confirmed the feature is working as expected using the latest version
> of DAMON user-space tool, like below.
>
> $ # start DAMOS for reclaiming memory aiming 30% free memory
> $ sudo ./damo/damo start --damos_action pageout \
> --damos_quota_goal_tuner temporal \
> --damos_quota_goal node_mem_free_bp 30% 0 \
> --damos_quota_interval 1s \
> --damos_quota_space 100M
>
> Note that >=3.1.8 version of DAMON user-space tool supports this feature
> (--damos_quota_goal_tuner). As expected, DAMOS stops reclaiming memory
> as soon as the goal amount of free memory is made. When 'consist' tuner
> is used, the reclamation was continued even after the goal amount of
> free memory is made, resulting in more than goal amount of free memory,
> as expected.
>
> Patch Sequence
> ==============
>
> First four patches implement the features. Patch 1 extends core API to
> allow multiple tuners and make the current tuner as the default and only
> available tuner, namely 'consist'. Patch 2 allows future tuners setting
> zero effective quota. Patch 3 introduces the second tuner, namely
> 'temporal'. Patch 4 further extends DAMON sysfs API to let users use
> that.
>
> Three following patches (patches 5-7) update design, usage, and ABI
> documents, respectively.
>
> Final three patches (patches 8-10) are for adding selftests. The eighth
> and the ninth patches extend the testing-purpose DAMON sysfs control
> helper and DAMON status dumping tool to support the newly added feature.
> The tenth patch extends the existing online commit test to cover the new
> feature.
>
> References
> ==========
>
> [1] https://lore.kernel.org/CALa+Y17__d=ZsM1yX+MXx0ozVdsXnFqF4p0g+kATEitrWyZFfg@mail.gmail.com
> [2] https://lore.kernel.org/20260204022537.814-1-yunjeong.mun@sk.com
>
> Changelog
> =========
>
> Changes from RFC v1
> (https://lore.kernel.org/20260212062314.69961-1-sj@kernel.org)
> - Add selftest for goal_tuner commitment.
> - Set goal tuner inside damon_new_scheme().
> - Allow zero size effective size quota.
> - Update the ABI document.
> - Wordsmith change descriptions.
>
> SeongJae Park (10):
> mm/damon/core: introduce damos_quota_goal_tuner
> mm/damon/core: allow quota goals set zero effective size quota
> mm/damon/core: introduce DAMOS_QUOTA_GOAL_TUNER_TEMPORAL
> mm/damon/sysfs-schemes: implement quotas->goal_tuner file
> Docs/mm/damon/design: document the goal-based quota tuner selections
> Docs/admin-guide/mm/damon/usage: document goal_tuner sysfs file
> Docs/ABI/damon: update for goal_tuner
> selftests/damon/_damon_sysfs: support goal_tuner setup
> selftests/damon/drgn_dump_damon_status: support quota goal_tuner
> dumping
> selftests/damon/sysfs.py: test goal_tuner commit
>
> .../ABI/testing/sysfs-kernel-mm-damon | 6 ++
> Documentation/admin-guide/mm/damon/usage.rst | 16 +++--
> Documentation/mm/damon/design.rst | 12 ++++
> include/linux/damon.h | 11 ++++
> mm/damon/core.c | 60 +++++++++++++++----
> mm/damon/sysfs-schemes.c | 58 ++++++++++++++++++
> tools/testing/selftests/damon/_damon_sysfs.py | 12 +++-
> .../selftests/damon/drgn_dump_damon_status.py | 1 +
> tools/testing/selftests/damon/sysfs.py | 7 +++
> 9 files changed, 166 insertions(+), 17 deletions(-)
>
>
> base-commit: bbba4ca6322dd5c4f66fe31b1b374f77a8d2b2e5
--
Asier Gutierrez
Huawei
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [RFC PATCH v2 00/10] mm/damon: support multiple goal-based quota tuning algorithms
2026-03-04 10:15 ` [RFC PATCH v2 00/10] mm/damon: support multiple goal-based quota tuning algorithms Gutierrez Asier
@ 2026-03-04 15:03 ` SeongJae Park
0 siblings, 0 replies; 6+ messages in thread
From: SeongJae Park @ 2026-03-04 15:03 UTC (permalink / raw)
To: Gutierrez Asier
Cc: SeongJae Park, Liam R. Howlett, Andrew Morton, David Hildenbrand,
Jonathan Corbet, Lorenzo Stoakes, Michal Hocko, Mike Rapoport,
Shuah Khan, Shuah Khan, Suren Baghdasaryan, Vlastimil Babka,
damon, linux-doc, linux-kernel, linux-kselftest, linux-mm
On Wed, 4 Mar 2026 13:15:29 +0300 Gutierrez Asier <gutierrez.asier@huawei-partners.com> wrote:
> Hi SeongJae!
>
> Nice idea for dynamic environments.
Thank you :)
>
> On 3/4/2026 7:41 AM, SeongJae Park wrote:
> > Aim-oriented DAMOS quota auto-tuning uses a single tuning algorithm.
> > The algorithm is designed to find a quota value that should be
> > consistently kept for achieving the aimed goal for long term. It is
> > useful and reliable at automatically operating systems that have dynamic
> > environments in the long term.
> >
> > As always, however, no single algorithm fits all. When the environment
> > has static characteristics or there are control towers in not only the
> > kernel space but also the user space, the algorithm shows some
> > limitations. In such environments, users want kernel work in a more
> > short term deterministic way. Actually there were at least two reports
> > [1,2] of such cases.
> >
> > Extend DAMOS quotas goal to support multiple quota tuning algorithms
> > that users can select. Keep the current algorithm as the default one,
> > to not break the old users. Also give it a name, "consist", as it is
> > designed to "consistently" apply the DAMOS action. And introduce a new
> > tuning algorithm, namely "temporal". It is designed to apply the DAMOS
> > action only temporally, in a deterministic way. In more detail, as long
> > as the goal is under-achieved, it uses the maximum quota available.
> > Once the goal is over-achieved, it sets the quota zero.
>
> I'm not sure "temporal" is the best name for this type of behaviour.
I agree there could be a better name.
>
> How about "by_score?". For example, "damos_goal_tune_esz_bp_by_score" and
> DAMOS_QUOTA_GOAL_TUNER_BY_SCORE.
And thank you for the suggestion!
But... I don't think "by_score" is much better, because all tuners are assumed
to, and actually do the tuning of the quota based on the score. Or, maybe you
mean it makes non-zero quota only until the score becomes the goal? That makes
sense, but again, in a sense, that's same for "consistent" tuner.
Naming is difficult...
I was also thinking about a few more names, but my conclusion after the self
discussion was that some of ambitious names are inevitable here. Otherwise,
the name will be too long. I therefore picked the shortest and simplest ones
on my list, which at least contrasts the current two tuners. I agree that
could still be difficult to understand. But as long as there is a good
documentation, I think difficult-to-understnd names that encourage users to
read the document is ok and might even be better in some cases.
I'm of course open to other suggestions.
Thanks,
SJ
[...]
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [RFC PATCH v2 00/10] mm/damon: support multiple goal-based quota tuning algorithms
2026-03-04 4:41 [RFC PATCH v2 00/10] mm/damon: support multiple goal-based quota tuning algorithms SeongJae Park
` (2 preceding siblings ...)
2026-03-04 10:15 ` [RFC PATCH v2 00/10] mm/damon: support multiple goal-based quota tuning algorithms Gutierrez Asier
@ 2026-03-07 0:33 ` SeongJae Park
3 siblings, 0 replies; 6+ messages in thread
From: SeongJae Park @ 2026-03-07 0:33 UTC (permalink / raw)
To: SeongJae Park
Cc: Liam R. Howlett, Andrew Morton, David Hildenbrand,
Jonathan Corbet, Lorenzo Stoakes, Michal Hocko, Mike Rapoport,
Shuah Khan, Shuah Khan, Suren Baghdasaryan, Vlastimil Babka,
damon, linux-doc, linux-kernel, linux-kselftest, linux-mm
On Tue, 3 Mar 2026 20:41:09 -0800 SeongJae Park <sj@kernel.org> wrote:
> Aim-oriented DAMOS quota auto-tuning uses a single tuning algorithm.
> The algorithm is designed to find a quota value that should be
> consistently kept for achieving the aimed goal for long term. It is
> useful and reliable at automatically operating systems that have dynamic
> environments in the long term.
>
> As always, however, no single algorithm fits all. When the environment
> has static characteristics or there are control towers in not only the
> kernel space but also the user space, the algorithm shows some
> limitations. In such environments, users want kernel work in a more
> short term deterministic way. Actually there were at least two reports
> [1,2] of such cases.
>
> Extend DAMOS quotas goal to support multiple quota tuning algorithms
> that users can select. Keep the current algorithm as the default one,
> to not break the old users. Also give it a name, "consist", as it is
> designed to "consistently" apply the DAMOS action. And introduce a new
> tuning algorithm, namely "temporal". It is designed to apply the DAMOS
> action only temporally, in a deterministic way. In more detail, as long
> as the goal is under-achieved, it uses the maximum quota available.
> Once the goal is over-achieved, it sets the quota zero.
>
> Tests
> =====
>
> I confirmed the feature is working as expected using the latest version
> of DAMON user-space tool, like below.
>
> $ # start DAMOS for reclaiming memory aiming 30% free memory
> $ sudo ./damo/damo start --damos_action pageout \
> --damos_quota_goal_tuner temporal \
> --damos_quota_goal node_mem_free_bp 30% 0 \
> --damos_quota_interval 1s \
> --damos_quota_space 100M
>
> Note that >=3.1.8 version of DAMON user-space tool supports this feature
> (--damos_quota_goal_tuner). As expected, DAMOS stops reclaiming memory
> as soon as the goal amount of free memory is made. When 'consist' tuner
> is used, the reclamation was continued even after the goal amount of
> free memory is made, resulting in more than goal amount of free memory,
> as expected.
>
> Patch Sequence
> ==============
>
> First four patches implement the features. Patch 1 extends core API to
> allow multiple tuners and make the current tuner as the default and only
> available tuner, namely 'consist'. Patch 2 allows future tuners setting
> zero effective quota. Patch 3 introduces the second tuner, namely
> 'temporal'. Patch 4 further extends DAMON sysfs API to let users use
> that.
>
> Three following patches (patches 5-7) update design, usage, and ABI
> documents, respectively.
>
> Final three patches (patches 8-10) are for adding selftests. The eighth
> and the ninth patches extend the testing-purpose DAMON sysfs control
> helper and DAMON status dumping tool to support the newly added feature.
> The tenth patch extends the existing online commit test to cover the new
> feature.
>
> References
> ==========
>
> [1] https://lore.kernel.org/CALa+Y17__d=ZsM1yX+MXx0ozVdsXnFqF4p0g+kATEitrWyZFfg@mail.gmail.com
> [2] https://lore.kernel.org/20260204022537.814-1-yunjeong.mun@sk.com
>
> Changelog
> =========
>
> Changes from RFC v1
> (https://lore.kernel.org/20260212062314.69961-1-sj@kernel.org)
> - Add selftest for goal_tuner commitment.
> - Set goal tuner inside damon_new_scheme().
> - Allow zero size effective size quota.
> - Update the ABI document.
> - Wordsmith change descriptions.
>
> SeongJae Park (10):
> mm/damon/core: introduce damos_quota_goal_tuner
> mm/damon/core: allow quota goals set zero effective size quota
> mm/damon/core: introduce DAMOS_QUOTA_GOAL_TUNER_TEMPORAL
> mm/damon/sysfs-schemes: implement quotas->goal_tuner file
> Docs/mm/damon/design: document the goal-based quota tuner selections
> Docs/admin-guide/mm/damon/usage: document goal_tuner sysfs file
> Docs/ABI/damon: update for goal_tuner
> selftests/damon/_damon_sysfs: support goal_tuner setup
> selftests/damon/drgn_dump_damon_status: support quota goal_tuner
> dumping
> selftests/damon/sysfs.py: test goal_tuner commit
Maybe it is better to add a kunit test for the goal_tuner online commit, like
below. I will add it to the next spin of this series.
Thanks,
SJ
[...]
=== >8 ===
From 15d87f41d0d960e3c337899629cf4e05d09dc042 Mon Sep 17 00:00:00 2001
From: SeongJae Park <sj@kernel.org>
Date: Fri, 6 Mar 2026 16:27:45 -0800
Subject: [PATCH] mm/damon/tests/core-kunit: test goal_tuner commit
Signed-off-by: SeongJae Park <sj@kernel.org>
---
mm/damon/tests/core-kunit.h | 3 +++
1 file changed, 3 insertions(+)
diff --git a/mm/damon/tests/core-kunit.h b/mm/damon/tests/core-kunit.h
index d759314df00d8..28e5de749db04 100644
--- a/mm/damon/tests/core-kunit.h
+++ b/mm/damon/tests/core-kunit.h
@@ -791,6 +791,7 @@ static void damos_test_commit_quota(struct kunit *test)
.reset_interval = 1,
.ms = 2,
.sz = 3,
+ .goal_tuner = DAMOS_QUOTA_GOAL_TUNER_CONSIST,
.weight_sz = 4,
.weight_nr_accesses = 5,
.weight_age = 6,
@@ -799,6 +800,7 @@ static void damos_test_commit_quota(struct kunit *test)
.reset_interval = 7,
.ms = 8,
.sz = 9,
+ .goal_tuner = DAMOS_QUOTA_GOAL_TUNER_TEMPORAL,
.weight_sz = 10,
.weight_nr_accesses = 11,
.weight_age = 12,
@@ -812,6 +814,7 @@ static void damos_test_commit_quota(struct kunit *test)
KUNIT_EXPECT_EQ(test, dst.reset_interval, src.reset_interval);
KUNIT_EXPECT_EQ(test, dst.ms, src.ms);
KUNIT_EXPECT_EQ(test, dst.sz, src.sz);
+ KUNIT_EXPECT_EQ(test, dst.goal_tuner, src.goal_tuner);
KUNIT_EXPECT_EQ(test, dst.weight_sz, src.weight_sz);
KUNIT_EXPECT_EQ(test, dst.weight_nr_accesses, src.weight_nr_accesses);
KUNIT_EXPECT_EQ(test, dst.weight_age, src.weight_age);
--
2.47.3
^ permalink raw reply related [flat|nested] 6+ messages in thread
end of thread, other threads:[~2026-03-07 0:33 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-03-04 4:41 [RFC PATCH v2 00/10] mm/damon: support multiple goal-based quota tuning algorithms SeongJae Park
2026-03-04 4:41 ` [RFC PATCH v2 05/10] Docs/mm/damon/design: document the goal-based quota tuner selections SeongJae Park
2026-03-04 4:41 ` [RFC PATCH v2 06/10] Docs/admin-guide/mm/damon/usage: document goal_tuner sysfs file SeongJae Park
2026-03-04 10:15 ` [RFC PATCH v2 00/10] mm/damon: support multiple goal-based quota tuning algorithms Gutierrez Asier
2026-03-04 15:03 ` SeongJae Park
2026-03-07 0:33 ` SeongJae Park
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox