Re: When should we use likely() / unlikely() / get_unaligned() ?

From: David Woodhouse
Date: Sun Feb 08 2004 - 18:16:05 EST


On Sun, 2004-02-08 at 15:11 -0800, David S. Miller wrote:
> That's right, for the old old ARMs they've always been broken
> with certain types of encapsulations due to this. Even just feed
> them certain kinds of odd TCP/IP option sequences and watch the
> packet handling work on corrupted header data on such older ARMs.

With the merge of uCLinux there are more machines like this too. I've
been playing with one recently where alignment exceptions are imprecise
:)

Adding a probability to get_unaligned() lets _all_ architectures set
their own optimal threshold for when to emit inline load/store code, and
when to take the exception.... and the ones which will set that
threshold at 0% become an arch-specific special case which you really
don't have to care about.

--
dwmw2


-
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/