Andreas Mohr wrote:
Some more explanation:
AFAIK unlikely() should only be used when you're damn sure that this will
NEVER occur (e.g. failure cases), since it will artificially aggravate
penalty of this check in case it does occur.
IRQ sharing is *much* too common to justify using unlikely() here.
*ESPECIALLY* since IRQ sharing is very latency critical!

The magnitude of it's effect is overstated somewhat. Firstly we're talking about a delay in the nanosecond range, and second the cpu will optimise that out if it finds it's a frequently used path. Despite all that, however, I agree it's probably inappropriate. {un}likely() should be used for a path that is always/never traversed except in fault handling, jiffy wrap etc.

Cheers,
Con

Attachment: signature.asc
Description: OpenPGP digital signature



Reply via email to