[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20120222080659.GA25318@elte.hu>
Date: Wed, 22 Feb 2012 09:06:59 +0100
From: Ingo Molnar <mingo@...e.hu>
To: "H. Peter Anvin" <hpa@...or.com>
Cc: Jason Baron <jbaron@...hat.com>, a.p.zijlstra@...llo.nl,
rostedt@...dmis.org, mathieu.desnoyers@...icios.com,
davem@...emloft.net, ddaney.cavm@...il.com,
akpm@...ux-foundation.org, linux-kernel@...r.kernel.org,
Linus Torvalds <torvalds@...ux-foundation.org>
Subject: Re: [PATCH 00/10] jump label: introduce very_[un]likely + cleanups +
docs
* H. Peter Anvin <hpa@...or.com> 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@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists