Re: [PATCH v2 1/7] sched/fair: Fix zero_vruntime tracking
From: Dietmar Eggemann
Date: Mon Feb 23 2026 - 08:10:05 EST
On 19.02.26 08:58, Peter Zijlstra wrote:
> It turns out that zero_vruntime tracking is broken when there is but a single
> task running. Current update paths are through __{en,de}queue_entity(), and
> when there is but a single task, pick_next_task() will always return that one
> task, and put_prev_set_next_task() will end up in neither function.
Tried hard but I don't get the last clause.
[...]
> While there, optimize avg_vruntime() by noting that the average of one value is
> rather trivial to compute.
>
nitpick:
> Test case:
> # taskset -c -p 1 $$
> # taskset -c 2 bash -c 'while :; do :; done&'
> # cat /sys/kernel/debug/sched/debug | awk '/^cpu#/ {P=0} /^cpu#2,/ {P=1} {if (P) print $0}' | grep -e zero_vruntime -e "^>"
^
|
Works
only w/o this comma for me.
[...]