Skip to content

mm/damon: preserve temporal quota state for unmeasured PSI goals

Karl Mehltretter damon linux-mm lkml 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v2 Latest2 patches 5 repliesIn review

Patches in v2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2mm/damon/core: keep the temporal tuner quota over an unmeasured PSI roundmm/damon/core.c+23 -71 reply
2/2mm/damon/tests/core-kunit: test PSI goal values with explicit samplesmm/damon/tests/core-kunit.h+43 -01 reply

Reviews trailers per patch

All 2 patches have a Reviewed-by or Acked-by.

PatchSJ Park
1/2R-b
2/2R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v2 thread

Cover letter [PATCH v2 0/2] mm/damon: preserve temporal quota state for unmeasured PSI goals

A PSI quota goal without a previous sample is scored as achieved. This leaves the consist tuner's input unchanged but sets the temporal quota to zero. Preserve the temporal tuner's previous goal-achievement state using its effective quota, as SJ suggested [1], and test the helper with explicit PSI totals.

All 42 DAMON KUnit tests pass on x86-64 and i386. With the original scoring retained in the extracted helper, the new test fails on both. In a live damo test, a goals-only update changes a running 64 KiB quota to zero for an unmeasured round without the fix. With the fix, the effective quota stays at 64 KiB. A full damo tune also needs the separate quota-reset fix [3], so the context update preserves the running quota used for this decision.

DAMON selftests show no new failures (QEMU TCG guest; the wss_estimation test misses its accuracy bounds with and without the fix).

Changes since v1 [2]:
- Use the previous effective quota for the temporal decision, including when it is zero. Keep resetting last_psi_total for new and updated goals.
- Move the current-value calculation and last_psi_total update into a helper. Test both tuners with explicit samples and check last_psi_total after each call.

The series is based on mm-new as of September 20.

[1] https://lore.kernel.org/damon/[email protected]/
[2] https://lore.kernel.org/[email protected]/
[3] https://lore.kernel.org/[email protected]/

Karl Mehltretter (2):
mm/damon/core: keep the temporal tuner quota over an unmeasured PSI
round
mm/damon/tests/core-kunit: test PSI goal values with explicit samples

 mm/damon/core.c             | 30 ++++++++++++++++++++------
 mm/damon/tests/core-kunit.h | 43 +++++++++++++++++++++++++++++++++++++
 2 files changed, 66 insertions(+), 7 deletions(-)

base-commit: 185111f116aabf202d12ce440c0f6e9bae073514

Signature · 1 line
2.53.0