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

From: Ingo Molnar
Date: Wed Feb 22 2012 - 03:07:20 EST



* H. Peter Anvin <hpa@xxxxxxxxx> wrote:

> Not arguing that, but the static aspect is still key... or
> people will read it as another version of likely/unlikely.

They can *read* it as such, that as is very much intentional!

People reading such code should indeed treat it as a branch
probability attribute (and ignore it in 99.9% of the cases).

The moment they *write* static_cond_slow_inc() in real code
though they will be warned about the speciality and slowness of
the update path. More so than they are warned by the current
jump_label_inc() name, me thinks.

> I'd be fine with static_likely/unlikely for example; I wish
> "static" wasn't such an overloaded word in C but I
> can't.personally think of a better term.

Yeah, we considered static_likely()/unlikely() but it is indeed
overloaded *way* too much, so we went for
very_likely()/very_unlikely() which also fairly conveys the real
meaning at the usage site ...

I think the naming scheme I suggested in the other mail
sufficienty carries both the attribute, bias and update cost
aspects.

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/