mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH 0/2] mm/damon: fix zero quota for PSI goals under the temporal tuner
@ 2026-09-15  6:09 Karl Mehltretter
  2026-09-15  6:09 ` [PATCH 1/2] mm/damon/core: score an unmeasured PSI goal as not achieved for " Karl Mehltretter
  2026-09-15  6:09 ` [PATCH 2/2] mm/damon/tests/core-kunit: test PSI goal rounds under " Karl Mehltretter
  0 siblings, 2 replies; 9+ messages in thread
From: Karl Mehltretter @ 2026-09-15  6:09 UTC (permalink / raw)
  To: SJ Park
  Cc: Karl Mehltretter, Andrew Morton, Lian Wang, Kunwu Chan, damon,
	linux-mm, linux-kernel

A PSI quota goal without a previous sample is scored as achieved.
With the temporal tuner, this sets the quota to zero for the first
charge window and the window after each goal commit.

The series is based on next-20260911. It fixes commit a68878f83ae6
("mm/damon/core: handle uninitialized damos_quota_goal->last_psi_total"),
which is in mm-new and tagged for stable. Please carry this fix with
it.

Patch 1 keeps the temporal quota active until a PSI delta is
available. Patch 2 adds a regression test for the first round, the
next measured round, the round after a goal commit, a measured round
that reaches the target, and the consist tuner's unmeasured round.

Reproduced with damo 3.4.0 (b41965a) in a QEMU guest running
next-20260911 (x86_64, CONFIG_DAMON_SYSFS=y, CONFIG_PSI=y):

  damo start --damos_action stat --damos_quota_interval 120000 \
      --damos_quota_space 1048576 \
      --damos_quota_goal some_mem_psi_us 100000000000 \
      --damos_quota_goal_tuner temporal

then reading quotas/effective_bytes after update_schemes_effective_quotas
every 18 seconds. Without patch 1 the effective quota is 0 for the whole
first 120 second window and again for the window after "damo tune" with
the same parameters. With patch 1 it is 1048576 throughout.

The KUnit test in patch 2 fails without patch 1 and passes with it on
x86_64 and i386 (CONFIG_DAMON_KUNIT_TEST=y, built-in KUnit run at boot).

Karl Mehltretter (2):
  mm/damon/core: score an unmeasured PSI goal as not achieved for the
    temporal tuner
  mm/damon/tests/core-kunit: test PSI goal rounds under the temporal
    tuner

 mm/damon/core.c             | 14 +++++---
 mm/damon/tests/core-kunit.h | 69 +++++++++++++++++++++++++++++++++++++
 2 files changed, 79 insertions(+), 4 deletions(-)


base-commit: 68142f986ff04b2b70b31db00f719bf690f64a9a
-- 
2.53.0


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

end of thread, other threads:[~2026-09-16  0:21 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-09-15  6:09 [PATCH 0/2] mm/damon: fix zero quota for PSI goals under the temporal tuner Karl Mehltretter
2026-09-15  6:09 ` [PATCH 1/2] mm/damon/core: score an unmeasured PSI goal as not achieved for " Karl Mehltretter
2026-09-15 14:50   ` SJ Park
2026-09-15 21:19     ` Karl Mehltretter
2026-09-16  0:13       ` SJ Park
2026-09-15  6:09 ` [PATCH 2/2] mm/damon/tests/core-kunit: test PSI goal rounds under " Karl Mehltretter
2026-09-15  7:04   ` KunWu Chan
2026-09-15 21:31     ` Karl Mehltretter
2026-09-16  0:21   ` 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®