Re: [PATCH 4/7] mac80211: make ieee80211_get_hdrlen_from_skb return unsigned

Johannes Berg
2008-06-09T09:16:09Z

[-- Attachment #1: Type: text/plain, Size: 720 bytes --]

> unlikely() isn't some magic make-me-faster function, it just moves
> code
> to the end of the function to get it out of the icache and jumps to it
> in the unlikely case it is taken. When all there is is a return, I
> don't think it even makes any difference. In both these cases a
> comment
> is probably more appropriate.

That's not true on ppc where you can actually tell the processor about
the jump likelyhood for its branch prediction.

> On X86-32 at least the generated code is exactly the same with or
> without the unlikely()s. I'll put them back in a follow-on if people
> are really attached to them.

Please keep them there, I think they make sense for normal operation.

johannes

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 836 bytes --]