summaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python/bin
diff options
context:
space:
mode:
authorK Prateek Nayak <kprateek.nayak@amd.com>2026-11-12 08:34:47 +0000
committerPeter Zijlstra <peterz@infradead.org>2026-11-18 14:32:17 +0100
commit486c3d06b90240860e99686d29ed9f15637dc314 (patch)
treef6499de75c560d7b800cd00077ca40df80d89dae /tools/perf/scripts/python/bin
parent75545668ae0fd80c08fe8fd0c6799b2ba9284557 (diff)
sched/fair: Avoid transient double accounting for delayed tasks
When a task is delayed, h_nr_runnable is adjusted via set_delayed(). A dequeue of delayed task with DEQUEUE_DELAYED would decrement cfs_rq->h_nr_runnable again in dequeue_hierarchy() and then correct it immediately in __dequeue_task() via clear_delayed(). Adding: WARN_ON_ONCE(((int)cfs_rq->h_nr_runnable) < 0); in dequeue_hierarchy() after h_nr_runnable accounting is tripped reliably during early boot. Although the cfs_rq->h_nr_runnable accounting is transient, this incorrect value gets cached in se->runnable_weight and can affect PELT calculation until the next enqueue / dequeue adjusts the runnable weight. Similarly, a task enqueue should never reach enqueue_hierarchy() for just ENQUEUE_WAKEUP && se->sched_delayed. Wakeup of delayed tasks must couple ENQUEUE_DELAYED which gets correctly handled in enqueue_task_fair(). Avoid incorrect accounting in __dequeue_task() and warn for incorrect wakeup flags if delayed tasks reaches enqueue with just ENQUEUE_WAKEUP. Fixes: 85570f10a4c6 ("sched/eevdf: Move to a single runqueue") Signed-off-by: K Prateek Nayak <kprateek.nayak@amd.com> Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org> Reviewed-by: Vincent Guittot <vincent.guittot@linaro.org> Link: https://patch.msgid.link/20261112083447.25603-1-kprateek.nayak@amd.com
Diffstat (limited to 'tools/perf/scripts/python/bin')
0 files changed, 0 insertions, 0 deletions