All of lore.kernel.org
 help / color / mirror / Atom feed
* RE: [PATCH] aacraid: Add likely() and unlikely()
@ 2007-03-27 16:17 Allexio Ju
  2007-03-28 13:17 ` Arjan van de Ven
  0 siblings, 1 reply; 13+ messages in thread
From: Allexio Ju @ 2007-03-27 16:17 UTC (permalink / raw)
  To: arjan; +Cc: mark_salyzyn, linux-scsi

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)

^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2007-03-28 17:44 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <AE4F746F2AECFC4DA4AADD66A1DFEF01400B18@otce2k301.adaptec.com>
2007-03-21 17:49 ` [PATCH] aacraid: cleanup and version stamp driver Salyzyn, Mark
2007-03-21 18:49   ` Boaz Harrosh
2007-03-21 19:10     ` Salyzyn, Mark
2007-03-21 19:43   ` [PATCH] aacraid: Add likely() and unlikely() Salyzyn, Mark
2007-03-22  9:24     ` Arjan van de Ven
2007-03-26 13:21       ` [PATCH] aacraid: Add likely() and unlikely() Take 2 Salyzyn, Mark
2007-03-27 15:51         ` [PATCH] aacraid: Add SMC and SUN products to README Salyzyn, Mark
2007-03-27 19:07           ` [PATCH] aacraid: resolve compiler warnings using ptrdiff_t Salyzyn, Mark
2007-03-28 13:22             ` [PATCH] aacraid: remove unused or deprecated firmware constants Salyzyn, Mark
2007-03-28 17:44               ` [PATCH] aacraid: fix print of Firmware Build Date and add TSID Salyzyn, Mark
2007-03-27 16:17 [PATCH] aacraid: Add likely() and unlikely() Allexio Ju
2007-03-28 13:17 ` Arjan van de Ven
2007-03-28 15:53   ` Allexio Ju

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.