mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [RFC PATCH 0/7] mm/damon: introduce damos quota goal target metric complement flag
@ 2026-09-18 14:28 SJ Park
  2026-09-18 14:28 ` [RFC PATCH 1/7] mm/damon/core: introduce damos_quota_goal->complement SJ Park
                   ` (6 more replies)
  0 siblings, 7 replies; 8+ messages in thread
From: SJ Park @ 2026-09-18 14:28 UTC (permalink / raw)
  Cc: SJ Park, Liam R. Howlett, Andrew Morton, Brendan Higgins,
	David Gow, David Hildenbrand, Jonathan Corbet, Lorenzo Stoakes,
	Michal Hocko, Mike Rapoport, Randy Dunlap, Shuah Khan,
	Suren Baghdasaryan, Vlastimil Babka, damon, kunit-dev, linux-doc,
	linux-kernel, linux-kselftest, linux-mm

Aim-oriented DAMOS quota auto-tuning assumes the aggressiveness of the
scheme (quota) and the quota goal metric are directly proportional.
Depending on the scheme setup and usage, keeping the relationship can be
challenging.

For example, let's suppose a memory tiering approach for higher upper
tier utilization.  One common idea for that (TPP) is utilizing two
schemes, one for promotion and the other one for demotion.  The
promotion scheme migrates hot pages from lower tier to upper tier,
aiming for high utilization of the upper tier.  The demotion scheme
migrates cold pages from upper tier to lower tier, aiming for head room
free memory of the upper tier.  Both schemes and their goals are in
direct proportion.  However, for this kind of use case, we need to
implement two different goal metrics (per-node memory utilization and
free memory ratio) while essentially the free memory ratio is just a
complemented value of the utilization.

To avoid adding too many new metrics, we are adding metrics that turn
out to be really needed for each found use case.  For example,
some_mem_psi_us, node_eligible_mem_bp and hugepage_mem_bp don't have
their complemented value version.  But it is not really difficult to
expect use cases that their complemented version can be useful.  For
example, hugepage_mem_bp use case may need a way to reduce the hugepage
ratio.  That would require a complemented version of hugepage_mem_bp.
Adding a new metric for each of such use cases could make the number of
metrics unnecessarily high, and discourage flexible usages of DAMOS.

Add a new flag, quota goal complement, to allow flexible tuning goal
setup without unnecessarily increasing the number of metrics.  The flag
specifies whether to use the complemented value of the given goal metric
for the tuning.  For example, if the complement flag is set, the upper
tier memory utilization ratio metric works the same as the free memory
ratio metric for the tier.

SJ Park (7):
  mm/damon/core: introduce damos_quota_goal->complement
  mm/damon: add complement argument to damos_new_quota_goal()
  mm/damon/sysfs-schemes: support quota goal complement flag
  mm/damon/tests/core-kunit: test quota_goal->complement commit
  Docs/mm/damon/design: document damos quota goal complement flag
  Docs/admin-guide/mm/damon/usage: update for quota goal complement file
  Docs/ABI/damon: update for quota goal metric complement sysfs file

 .../ABI/testing/sysfs-kernel-mm-damon         |  6 ++++
 Documentation/admin-guide/mm/damon/usage.rst  | 13 ++++----
 Documentation/mm/damon/design.rst             | 13 +++++---
 include/linux/damon.h                         |  4 ++-
 mm/damon/core.c                               | 21 +++++++++++--
 mm/damon/lru_sort.c                           |  5 ++--
 mm/damon/reclaim.c                            |  5 ++--
 mm/damon/sysfs-schemes.c                      | 30 +++++++++++++++++++
 mm/damon/tests/core-kunit.h                   |  4 ++-
 samples/damon/mtier.c                         |  2 +-
 10 files changed, 83 insertions(+), 20 deletions(-)


base-commit: 93d2baf86ca2a321306c5ea2f07e3d936cc4e6fa
-- 
2.47.3

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2026-09-18 14:28 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-09-18 14:28 [RFC PATCH 0/7] mm/damon: introduce damos quota goal target metric complement flag SJ Park
2026-09-18 14:28 ` [RFC PATCH 1/7] mm/damon/core: introduce damos_quota_goal->complement SJ Park
2026-09-18 14:28 ` [RFC PATCH 2/7] mm/damon: add complement argument to damos_new_quota_goal() SJ Park
2026-09-18 14:28 ` [RFC PATCH 3/7] mm/damon/sysfs-schemes: support quota goal complement flag SJ Park
2026-09-18 14:28 ` [RFC PATCH 4/7] mm/damon/tests/core-kunit: test quota_goal->complement commit SJ Park
2026-09-18 14:28 ` [RFC PATCH 5/7] Docs/mm/damon/design: document damos quota goal complement flag SJ Park
2026-09-18 14:28 ` [RFC PATCH 6/7] Docs/admin-guide/mm/damon/usage: update for quota goal complement file SJ Park
2026-09-18 14:28 ` [RFC PATCH 7/7] Docs/ABI/damon: update for quota goal metric complement sysfs file SJ Park

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®