From: SJ Park <sj@kernel.org>
To: Karl Mehltretter <kmehltretter@gmail.com>
Cc: SJ Park <sj@kernel.org>,
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: Re: [PATCH v2 1/2] mm/damon/core: keep the temporal tuner quota over an unmeasured PSI round
Date: Mon, 21 Sep 2026 09:36:06 -0700 [thread overview]
Message-ID: <20260921163607.81366-1-sj@kernel.org> (raw)
In-Reply-To: <20260921020013.33105-2-kmehltretter@gmail.com>
On Mon, 21 Sep 2026 04:00:12 +0200 Karl Mehltretter <kmehltretter@gmail.com> wrote:
> Commit b73198a47ffe ("mm/damon/core: handle uninitialized
> damos_quota_goal->last_psi_total") scores a PSI quota goal without a
> previous sample as achieved. This leaves the consist tuner's input
> unchanged, but the temporal tuner sets its quota to zero for an achieved
> goal. A running scheme with a nonzero temporal quota therefore loses a
> charge window after a quota-goal commit.
>
> Use the effective quota to preserve the temporal tuner's previous
> goal-achievement state during an unmeasured round, as SJ suggested [1].
> Score the goal as achieved when the effective quota is zero and as not
> achieved otherwise. A new scheme's initially zero quota stays zero, and
> the consist tuner's behavior is unchanged.
>
> Move the PSI current-value calculation and last_psi_total update into a
> helper that takes the current PSI total. This lets a unit test cover the
> unmeasured and measured rounds without depending on system memory
> pressure.
Looks good to me.
>
> Fixes: b73198a47ffe ("mm/damon/core: handle uninitialized damos_quota_goal->last_psi_total")
> Cc: <stable@vger.kernel.org> # 7.1.x
The broken commit (b73198a47ffe) is not in the mainline but mm-unstable. We
should squash this to the broken commit before it is merged into the mainline.
Or, maybe pointing the original broken fix (2dbb60f789cb) as 'Fixes:' is
another option.
Do you have a preferrence?
> Suggested-by: SJ Park <sj@kernel.org>
> Link: https://lore.kernel.org/damon/20260916001311.101024-1-sj@kernel.org/ [1]
> Assisted-by: LLM
> Signed-off-by: Karl Mehltretter <kmehltretter@gmail.com>
Other than the above,
Reviewed-by: SJ Park <sj@kernel.org>
Thanks,
SJ
[...]
next prev parent reply other threads:[~2026-09-21 16:36 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-21 2:00 [PATCH v2 0/2] mm/damon: preserve temporal quota state for unmeasured PSI goals Karl Mehltretter
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 [this message]
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=20260921163607.81366-1-sj@kernel.org \
--to=sj@kernel.org \
--cc=akpm@linux-foundation.org \
--cc=damon@lists.linux.dev \
--cc=kmehltretter@gmail.com \
--cc=kunwu.chan@gmail.com \
--cc=lianux.mm@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.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
all inboxes | Powered by JetHome®