Re: [PATCH 2/4] sched/eevdf: Sort the rbtree by virtual deadline

From: Benjamin Segall
Date: Tue Nov 07 2023 - 18:30:18 EST


Abel Wu <wuyun.abel@xxxxxxxxxxxxx> writes:

> 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.
>
> This patch also cleans up the unused max_vruntime() and adjusts pos
> for some functions.
>
> Signed-off-by: Abel Wu <wuyun.abel@xxxxxxxxxxxxx>
> ---

I've run this through my tester and it agrees that it does fulfil the
EEVDF pick (though this implementation is trivial enough that that's
fairly obvious just by reading the code, which is a nice bonus upgrade).

And it makes sense that this would help for performance, and the
fastpath seems likely to trigger most of the time for even better
results.