]> www.infradead.org Git - users/jedix/linux-maple.git/commit
sched/fair: Fixup wake_up_sync() vs DELAYED_DEQUEUE
authorXuewen Yan <xuewen.yan@unisoc.com>
Mon, 3 Mar 2025 10:52:39 +0000 (18:52 +0800)
committerPeter Zijlstra <peterz@infradead.org>
Wed, 21 May 2025 11:57:37 +0000 (13:57 +0200)
commitaa3ee4f0b7541382c9f6f43f7408d73a5d4f4042
treed299652f5cb375ffacc5aedbf451c8bf3efde80a
parent676e8cf70cb0533e1118e29898c9a9c33ae3a10f
sched/fair: Fixup wake_up_sync() vs DELAYED_DEQUEUE

Delayed dequeued feature keeps a sleeping task enqueued until its
lag has elapsed. As a result, it stays also visible in rq->nr_running.
So when in wake_affine_idle(), we should use the real running-tasks
in rq to check whether we should place the wake-up task to
current cpu.
On the other hand, add a helper function to return the nr-delayed.

Fixes: 152e11f6df29 ("sched/fair: Implement delayed dequeue")
Signed-off-by: Xuewen Yan <xuewen.yan@unisoc.com>
Reviewed-and-tested-by: Tianchen Ding <dtcccc@linux.alibaba.com>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Reviewed-by: Vincent Guittot <vincent.guittot@linaro.org>
Link: https://lore.kernel.org/r/20250303105241.17251-2-xuewen.yan@unisoc.com
kernel/sched/fair.c