public inbox for linux-scsi@vger.kernel.org
 help / color / mirror / Atom feed
From: Boaz Harrosh <bharrosh@panasas.com>
To: "Nicholas A. Bellinger" <nab@linux-iscsi.org>
Cc: scameron@beardog.cce.hp.com, Jeff Garzik <jeff@garzik.org>,
	James Bottomley <James.Bottomley@suse.de>,
	"J.H." <warthog9@kernel.org>,
	linux-scsi <linux-scsi@vger.kernel.org>
Subject: Re: hpsa: Convert SCSI LLD ->queuecommand() for host_lock less	operation
Date: Tue, 01 Feb 2011 11:13:54 +0200	[thread overview]
Message-ID: <4D47CED2.4040303@panasas.com> (raw)
In-Reply-To: <1296505560.14831.389.camel@haakon2.linux-iscsi.org>

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

  reply	other threads:[~2011-02-01  9:13 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-01-29 22:38 hpsa: Convert SCSI LLD ->queuecommand() for host_lock less operation Nicholas A. Bellinger
2011-01-30  3:26 ` Jeff Garzik
2011-01-30 21:18   ` Nicholas A. Bellinger
2011-01-31 14:42     ` scameron
2011-01-31 20:26       ` Nicholas A. Bellinger
2011-02-01  9:13         ` Boaz Harrosh [this message]
2011-01-31 14:24 ` scameron

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4D47CED2.4040303@panasas.com \
    --to=bharrosh@panasas.com \
    --cc=James.Bottomley@suse.de \
    --cc=jeff@garzik.org \
    --cc=linux-scsi@vger.kernel.org \
    --cc=nab@linux-iscsi.org \
    --cc=scameron@beardog.cce.hp.com \
    --cc=warthog9@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox