Files
lkl_linux/kernel
Peter Zijlstra 650cad561c sched/eevdf: Fix avg_vruntime()
The expectation is that placing a task at avg_vruntime() makes it
eligible. Turns out there is a corner case where this is not the case.

Specifically, avg_vruntime() relies on the fact that integer division
is a flooring function (eg. it discards the remainder). By this
property the value returned is slightly left of the true average.

However! when the average is a negative (relative to min_vruntime) the
effect is flipped and it becomes a ceil, with the result that the
returned value is just right of the average and thus not eligible.

Fixes: af4cf40470 ("sched/fair: Add cfs_rq::avg_vruntime")
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
2023-10-03 12:32:29 +02:00
..
2023-10-03 12:32:29 +02:00
2022-09-26 10:13:13 -07:00
2023-08-18 10:18:49 -07:00
2023-03-24 11:01:29 +01:00
2023-08-23 09:38:17 +09:00
2023-09-19 13:21:33 -07:00
2023-08-15 15:26:17 -07:00