Re: [PATCH 00/10] jump label: introduce very_[un]likely + cleanups +docs

From: Ingo Molnar
Date: Wed Feb 22 2012 - 10:47:50 EST


* Peter Zijlstra <a.p.zijlstra@xxxxxxxxx> 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((&paravirt_steal_rq_enabled))) {
kernel/sched/core.c: if (very_unlikely(&paravirt_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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/