public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] sched/fair: Fix wakeup_preempt_fair for not waking up task
@ 2026-04-29 16:41 Vincent Guittot
  2026-04-30  6:16 ` Furkan Çalışkan
  2026-05-01 14:49 ` Peter Zijlstra
  0 siblings, 2 replies; 5+ messages in thread
From: Vincent Guittot @ 2026-04-29 16:41 UTC (permalink / raw)
  To: mingo, peterz, juri.lelli, dietmar.eggemann, rostedt, bsegall,
	mgorman, vschneid, kprateek.nayak, linux-kernel, qyousef
  Cc: Vincent Guittot

The assumption that p is always enqueued and not delayed, is only true for
wakeup. If p was moved while sched_delayed, pick_next_entity will dequeue
it during the attach and the cfs might become empty.

Fixes: ac8e69e69363 ("sched/fair: Fix wakeup_preempt_fair() vs delayed dequeue")
Signed-off-by: Vincent Guittot <vincent.guittot@linaro.org>
---

I have triggered this while running my latency stress test on a new platform.

 kernel/sched/fair.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c
index 728965851842..99fb524c4922 100644
--- a/kernel/sched/fair.c
+++ b/kernel/sched/fair.c
@@ -9147,7 +9147,7 @@ static void wakeup_preempt_fair(struct rq *rq, struct task_struct *p, int wake_f
 	 * Because p is enqueued, nse being null can only mean that we
 	 * dequeued a delayed task.
 	 */
-	if (!nse)
+	if (!nse && (wake_flags & WF_TTWU))
 		goto pick;
 
 	if (sched_feat(RUN_TO_PARITY))
-- 
2.43.0


^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2026-05-01 14:49 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-04-29 16:41 [PATCH] sched/fair: Fix wakeup_preempt_fair for not waking up task Vincent Guittot
2026-04-30  6:16 ` Furkan Çalışkan
2026-04-30  7:49   ` K Prateek Nayak
2026-04-30  9:21     ` Furkan Çalışkan
2026-05-01 14:49 ` Peter Zijlstra

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox