lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20240923120339.11809-1-parag.lkml@gmail.com>
Date: Mon, 23 Sep 2024 08:03:39 -0400
From: Parag W <parag.lkml@...il.com>
To: hannes@...xchg.org
Cc: anna-maria@...utronix.de,
	frederic@...nel.org,
	linux-kernel@...r.kernel.org,
	peterz@...radead.org,
	pmenzel@...gen.mpg.de,
	regressions@...ts.linux.dev,
	surenb@...gle.com,
	tglx@...utronix.de
Subject: Re: Error: psi: inconsistent task state! task=1:swapper/0 cpu=0 psi_flags=4 clear=0 set=4

FWIW, moving psi_enqueue to be after ->enqueue_task() in sched/core.c made no difference - I still get the inconsistent task state error. psi_dequeue() is already before ->dequeue_task() in line with uclamp.


diff --git a/kernel/sched/core.c b/kernel/sched/core.c
index b6cc1cf499d6..748143d2c218 100644
--- a/kernel/sched/core.c
+++ b/kernel/sched/core.c
@@ -2012,16 +2012,16 @@ void enqueue_task(struct rq *rq, struct task_struct *p, int flags)
 	if (!(flags & ENQUEUE_NOCLOCK))
 		update_rq_clock(rq);
 
-	if (!(flags & ENQUEUE_RESTORE)) {
-		sched_info_enqueue(rq, p);
-		psi_enqueue(p, (flags & ENQUEUE_WAKEUP) && !(flags & ENQUEUE_MIGRATED));
-	}
 
 	p->sched_class->enqueue_task(rq, p, flags);
 	/*
 	 * Must be after ->enqueue_task() because ENQUEUE_DELAYED can clear
 	 * ->sched_delayed.
 	 */
+	if (!(flags & ENQUEUE_RESTORE)) {
+		sched_info_enqueue(rq, p);
+		psi_enqueue(p, (flags & ENQUEUE_WAKEUP) && !(flags & ENQUEUE_MIGRATED));
+	}
 	uclamp_rq_inc(rq, p);
 
 	if (sched_core_enabled(rq))

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ