sched/eevdf: Sort the rbtree by virtual deadline
authorAbel Wu <wuyun.abel@bytedance.com>
Wed, 15 Nov 2023 03:36:45 +0000 (11:36 +0800)
committerPeter Zijlstra <peterz@infradead.org>
Wed, 15 Nov 2023 08:57:47 +0000 (09:57 +0100)
commit2227a957e1d5b1941be4e4207879ec74f4bb37f8
tree18eb90d421aaed3b3ec423387504eaccc56d44d4
parent84db47ca7146d7bd00eb5cf2b93989a971c84650
sched/eevdf: Sort the rbtree by virtual deadline

Sort the task timeline by virtual deadline and keep the min_vruntime
in the augmented tree, so we can avoid doubling the worst case cost
and make full use of the cached leftmost node to enable O(1) fastpath
picking in next patch.

Signed-off-by: Abel Wu <wuyun.abel@bytedance.com>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Link: https://lkml.kernel.org/r/20231115033647.80785-3-wuyun.abel@bytedance.com
include/linux/sched.h
kernel/sched/debug.c
kernel/sched/fair.c
kernel/sched/sched.h