Messages in this thread | | | Date | Wed, 22 Feb 2012 16:47:33 +0100 | From | Ingo Molnar <> | Subject | Re: [PATCH 00/10] jump label: introduce very_[un]likely + cleanups + docs |
| |
* Peter Zijlstra <a.p.zijlstra@chello.nl> wrote:
> On Wed, 2012-02-22 at 15:56 +0100, Ingo Molnar wrote: > > > Again, maybe we need a "very_unlikely()" for the tracing case, > > > > ... and that's the usecase for the scheduler, for events and for > > networking. I.e. all current usecases in the kernel > > The scheduler also really wants the very_likely() variant. We > have less use for the unbiased one though.
Yeah, it wants a fastpath and a slowpath and whether it's likely or unlikely is situational. So thus it uses both variants in my tree:
kernel/sched/core.c: if (very_unlikely((¶virt_steal_rq_enabled))) { kernel/sched/core.c: if (very_unlikely(¶virt_steal_enabled)) { kernel/sched/fair.c: return very_unlikely(&__cfs_bandwidth_used); kernel/sched/sched.h: return very_likely(key); /* Not out of line branch. */ kernel/sched/sched.h: return very_unlikely(key); /* Out of line branch. */
With no need for an 'unbiased' method.
Let me push out what I have in tip:perf/jump-labels (just finished testing it) so that we are all looking at the same code.
Thanks,
Ingo
| |