2021-09-01 07:21:35

by Li RongQing

[permalink] [raw]
Subject: 答复: [Resend][PATCH] sched/fair: micro-optim ize pick_next_entity()



> -----?ʼ?ԭ??-----
> ??????: Peter Zijlstra <[email protected]>
> ????ʱ??: 2021??8??31?? 22:10
> ?ռ???: Li,Rongqing <[email protected]>
> ????: [email protected]; [email protected]; [email protected];
> [email protected]; [email protected]; [email protected];
> [email protected]; [email protected]; [email protected]
> ????: Re: [Resend][PATCH] sched/fair: micro-optimize pick_next_entity()
>
> On Wed, Aug 25, 2021 at 02:27:49PM +0800, Li RongQing wrote:
> > Only check the skip buddy when next buddy and last buddy are not
> > picked up, this can save the cycles of checking the skip buddy and
> > computation of the second buddy, when next and last buddy will be
> > picked up for example, yield_to_task_fair() set both next and skip
> > buddy
>
> Is that actually measurable?
>
No measurable


> But looking at it, should we not, instead, move the whole ->skip thing to the
> bottom, so we unconditionally check it vs the result of
> ->next/->last ?
>
> Imagine ->next == ->skip, then we want to avoid running it and not have
> ->next win.

True, next/last may be equal to skip

-Li