Re: Error: psi: inconsistent task state! task=1:swapper/0 cpu=0 psi_flags=4 clear=0 set=4
From: Johannes Weiner
Date: Sun Sep 22 2024 - 06:21:06 EST
On Sun, Sep 22, 2024 at 08:53:37AM +0200, Paul Menzel wrote:
> [Cc: +PSI maintainers]
>
> Am 22.09.24 um 00:50 schrieb Paul Menzel:
> > #regzbot introduced: 2e0199df252a..54a58a787791
> >
> > Dear Peter,
> >
> >
> > With merge commit 2004cef11ea0 (Merge tag 'sched-core-2024-09-19' of
> > git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip) I see the warning
> > below on the Intel Kaby Lake laptop Dell XPS 13 9360 and with QEMU.
> >
> > Dell XPS 13 9360:
> >
> > psi: inconsistent task state! task=1:swapper/0 cpu=0 psi_flags=4 clear=0 set=4
Oh, double enqueue.
It looks like the psi enqueue/dequeue callbacks need the same
treatment as the uclamp and sched_core ones for ignoring delayed
tasks. [1][2]
Do we need to reorder psi_enqueue() after ->enqueue_task() as well? I
can't quite work out why uclamp needed it, but sched_core didn't.
[1] dfa0a574cbc47bfd5f8985f74c8ea003a37fa078
[2] c662e2b1e8cfc3b6329704dab06051f8c3ec2993