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

From: Karl Mehltretter

Date: Sat Sep 19 2026 - 01:47:23 EST


On Tue, Sep 15, 2026 at 05:21:36PM +0100, SJ Park wrote:
> So, this test depends on the memory pressure level of the testing system? I
> concern if that could make the test result not very reliable. Maybe we could
> split out the corner case handling logic to explicitly receive the current
> memory PSI total time. For example, like what I suggested in the reply to the
> first patch of this series. With it, we could build a kunit test for only the
> target logic, without depending on the test system's status.
>

Yes, the second round reads the real PSI total. I used ULONG_MAX as
the target to make it unreachable, but I agree that a test which
does not read system state is better.

For v2 I can test only the helper from your reply to patch 1,
with explicit PSI totals. It would cover both tuners, zero and
non-zero esz for the temporal one, and the last_psi_total value after
each call as Kunwu asked.

Thanks,
Karl