From: Karl Mehltretter <kmehltretter@gmail.com>
To: SJ Park <sj@kernel.org>
Cc: Karl Mehltretter <kmehltretter@gmail.com>,
Andrew Morton <akpm@linux-foundation.org>,
Lian Wang <lianux.mm@gmail.com>,
Kunwu Chan <kunwu.chan@gmail.com>,
damon@lists.linux.dev, linux-mm@kvack.org,
linux-kernel@vger.kernel.org
Subject: [PATCH v2 0/2] mm/damon: preserve temporal quota state for unmeasured PSI goals
Date: Mon, 21 Sep 2026 04:00:11 +0200 [thread overview]
Message-ID: <20260921020013.33105-1-kmehltretter@gmail.com> (raw)
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/20260916001311.101024-1-sj@kernel.org/
[2] https://lore.kernel.org/20260915060937.3423-1-kmehltretter@gmail.com/
[3] https://lore.kernel.org/20260921003047.12041-1-kmehltretter@gmail.com/
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
--
2.53.0
next reply other threads:[~2026-09-21 2:00 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-21 2:00 Karl Mehltretter [this message]
2026-09-21 2:00 ` [PATCH v2 1/2] mm/damon/core: keep the temporal tuner quota over an unmeasured PSI round Karl Mehltretter
2026-09-21 16:36 ` SJ Park
2026-09-21 2:00 ` [PATCH v2 2/2] mm/damon/tests/core-kunit: test PSI goal values with explicit samples Karl Mehltretter
2026-09-21 16:40 ` SJ Park
2026-09-21 16:47 ` [PATCH v2 0/2] mm/damon: preserve temporal quota state for unmeasured PSI goals SJ Park
2026-09-21 18:39 ` Karl Mehltretter
2026-09-22 6:28 ` SJ Park
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260921020013.33105-1-kmehltretter@gmail.com \
--to=kmehltretter@gmail.com \
--cc=akpm@linux-foundation.org \
--cc=damon@lists.linux.dev \
--cc=kunwu.chan@gmail.com \
--cc=lianux.mm@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=sj@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox