Re: [PATCH 2/2] mm/damon/tests/core-kunit: test PSI goal rounds under the temporal tuner

From: Karl Mehltretter

Date: Tue Sep 15 2026 - 17:34:10 EST


On Tue, Sep 15, 2026 at 03:04:06PM +0100, KunWu Chan wrote:
> Could we also check goal->last_psi_total here?
>
> The first tuning round should consume the U64_MAX sentinel
> and establish the measured state.
>
> Testing this explicitly would lock in that state transition.
>

Thanks for the review, good idea! The test only inferred the state
from the effective quota, a direct check of last_psi_total is clearer
and stricter.

It also fits the v2 fix. I plan to keep last_psi_total across a
commit of an existing PSI goal instead of touching the tuners, so
that value is what the test should assert.

For the v2 test I plan to check last_psi_total at each transition:
not U64_MAX after the first round, still the kept sample after a
commit of the same metric, U64_MAX again after a commit that changes
the metric and back. The quota checks stay to cover the tuners.

Karl