Re: hpsa: Convert SCSI LLD ->queuecommand() for host_lock less operation

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

 



On 01/31/2011 10:26 PM, Nicholas A. Bellinger wrote:
>>> +static void enqueue_cmd_and_start_io(struct ctlr_info *h,
>>> +       struct CommandList *c)
>>> +{
>>> +       unsigned long flags;
>>> +
>>> +       spin_lock_irqsave(&h->lock, flags);
>>> +       __enqueue_cmd_and_start_io(h, c);
>>>         spin_unlock_irqrestore(&h->lock, flags);
>>>  }
>>
>> Should that be "static inline"?  Or maybe the compiler's smart enough
>> to decide whether to inline that on its own these days?
>>
> 
> Inlining both of these makes sense to me.  I will add this change and
> send out an updated [PATCH] with your Reviewed-by shortly.
> 

Don't do that. Yes in an header but in a .c file never do.

If there is only a single user the compiler will inline it.
if there are lots of users then the compiler will choose by
the compile-for-size or not and the function size. In any way
the compiler will make a better choice then you regarding size
and speed gained.

I never put inline in .c files. Just make sure that functions
are not forward declared. (that will kill the inline) and
the gcc will always makes the better choice.

Thanks
Boaz

> Thanks for your comments!
> 
> --nab
--
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