Re: [PATCH v2 01/12] sched/psi: Optimize psi_group_change() cpu_clock() usage
From: K Prateek Nayak
Date: Fri Jul 25 2025 - 01:13:26 EST
Hello Ingo, Peter,
On 7/16/2025 4:10 PM, Peter Zijlstra wrote:
> On Wed, Jul 16, 2025 at 08:53:01AM +0200, Beata Michalska wrote:
>> Wouldn't it be enough to use SEQCNT_ZERO? Those are static per-cpu ones.
>
> Yeah, I suppose that should work. The below builds, but I've not yet
> observed the issue myself.
>
> ---
> Subject: sched/psi: Fix psi_seq initialization
> From: Peter Zijlstra <peterz@xxxxxxxxxxxxx>
> Date: Tue, 15 Jul 2025 15:11:14 -0400
>
> With the seqcount moved out of the group into a global psi_seq,
> re-initializing the seqcount on group creation is causing seqcount
> corruption.
>
> Fixes: 570c8efd5eb7 ("sched/psi: Optimize psi_group_change() cpu_clock() usage")
> Reported-by: Chris Mason <clm@xxxxxxxx>
> Suggested-by: Beata Michalska <beata.michalska@xxxxxxx>
> Signed-off-by: Peter Zijlstra (Intel) <peterz@xxxxxxxxxxxxx>
I've been running with this fix for a bunch of my testing and when I forget
about it (as was the case when testing John's Proxy Exec branch), I usually
run into the softlockup in psi_avgs_work().
Is it too late to include this in tip:sched/core for v6.17?
Also feel free to include:
Tested-by: K Prateek Nayak <kprateek.nayak@xxxxxxx>
--
Thanks and Regards,
Prateek