Hi Dmitry, Lee, Rumen, all,
> > Should unlikely() be used for cases where the conditional will be
> > true iff a specific piece of hardware is present? Seems like we'd
> > always lose.
>
> I would say that we should definitely not use [un]likely for code that
> is executed once during boot.
I think that the point of using unlikely in pci/quirks is more political
than technical. PCI quirks are only needed because some manufacturers
don't play fair on purpose or are simply too bad to write a proper BIOS
init sequence. This shouldn't slow down the boot process for owners of
decent hardware that do not need such quirks, or at least should it slow
it down as little as possible. So it's only fair that the worst slowdown
happens when the quirks-needing hardware is actually found.
This consideration left apart, each test looking for a specific piece of
hardware, considered individually, is more likely to fail than succeed
on a random machine, so anyway the use of unlikely makes sense. Whether
or not we think it is worth the additional code is a different matter (I
do, but I know not everybody does.)
Thanks,
--
Jean Delvare
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[Index of Archives]
[Kernel Newbies]
[Netfilter]
[Bugtraq]
[Photo]
[Gimp]
[Yosemite News]
[MIPS Linux]
[ARM Linux]
[Linux Security]
[Linux RAID]
[Video 4 Linux]
[Linux for the blind]
|
|