sched/psi: Fix psi_seq initialization
authorPeter Zijlstra <peterz@infradead.org>
Tue, 15 Jul 2025 19:11:14 +0000 (15:11 -0400)
committerLinus Torvalds <torvalds@linux-foundation.org>
Mon, 4 Aug 2025 17:51:22 +0000 (10:51 -0700)
commit99b773d720aeea1ef2170dce5fcfa80649e26b78
treec1fbd6207ee56317e27dd806fcc139735cc91fc9
parentd632ab86aff2cef21f794e337a8e7f2320ac3973
sched/psi: Fix psi_seq initialization

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@meta.com>
Suggested-by: Beata Michalska <beata.michalska@arm.com>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
kernel/sched/psi.c