RE: [PATCH] aacraid: Add likely() and unlikely()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, 2007-03-22 at 2007 2:24 AM, Arjan van de Ven wrote:
(I assume you're aware that likely/unlikely should only be
used for 99:1 or higher ratios, this one looks correct for sure)
Could you share details of reasons why those macros should be used in the way?
I thought those macros simply tell compiler to layout code in such a
way that minimizes unnecessary jumps.

Thank you,

Allexio

On Wed, 2007-03-21 at 15:43 -0400, Salyzyn, Mark wrote:
> Add some likely() and unlikely() compiler hints in some of
the aacraid
> hardware interface layers. There should be no operational
side effects
> resulting from this patch and the changes should be mostly
benign on
> x86 platforms.
>
> ObligatoryDisclaimer: Please accept my condolences
regarding Outlook's
> handling of patches attachments.
>
> This attached patch is against current scsi-misc-2.6

-               if((fibptr->flags & FIB_CONTEXT_FLAG_TIMED_OUT)){
+               if(unlikely(fibptr->flags &
+ FIB_CONTEXT_FLAG_TIMED_OUT)){
                        return -ETIMEDOUT;
                } else {
                        return 0;

while you're at it, please remove the extra {}'s as well

(I assume you're aware that likely/unlikely should only be
used for 99:1 or higher ratios, this one looks correct for sure)
-
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Device Mapper]
  Powered by Linux