public inbox for linux-scsi@vger.kernel.org
 help / color / mirror / Atom feed
From: "Nicholas A. Bellinger" <nab@linux-iscsi.org>
To: Christoph Hellwig <hch@lst.de>
Cc: linux-scsi <linux-scsi@vger.kernel.org>,
	Hannes Reinecke <hare@suse.de>, Bo Yang <Bo.Yang@lsi.com>,
	James Bottomley <James.Bottomley@suse.de>
Subject: Re: [PATCH 3/3] megaraid_sas: Convert SHT->queuecommand() to run host_lock-less
Date: Mon, 29 Nov 2010 12:54:35 -0800	[thread overview]
Message-ID: <1291064075.17194.3.camel@haakon2.linux-iscsi.org> (raw)
In-Reply-To: <20101129164100.GA22820@lst.de>

On Mon, 2010-11-29 at 17:41 +0100, Christoph Hellwig wrote:
> On Sat, Nov 27, 2010 at 11:17:36PM -0800, Nicholas A. Bellinger wrote:
> >  /**
> > - * megasas_get_cmd -	Get a command from the free pool
> > + * __megasas_get_cmd -	Get a command from the free pool
> >   * @instance:		Adapter soft state
> >   *
> >   * Returns a free command from the pool
> > + * Locking: Called with instance->cmd_pool_lock w/ spin_lock_irqsave
> >   */
> > -static struct megasas_cmd *megasas_get_cmd(struct megasas_instance
> > -						  *instance)
> > +static struct megasas_cmd *
> > +__megasas_get_cmd(struct megasas_instance *instance)
> >  {
> > +	struct megasas_cmd *cmd;
> >  	unsigned long flags;
> > -	struct megasas_cmd *cmd = NULL;
> >  
> >  	spin_lock_irqsave(&instance->cmd_pool_lock, flags);
> 
> --- snip ---
> 
> > +static struct megasas_cmd *
> > +megasas_get_cmd(struct megasas_instance *instance)
> > +{
> > +	struct megasas_cmd *cmd;
> > +	unsigned long flags;
> > +
> > +	spin_lock_irqsave(&instance->cmd_pool_lock, flags);
> 
> I can't see how this works.
> 

Ugh, I had to recode patch #3 after accidently git resetting on the
wrong branch..

Thanks alot for spotting this, fixed with:

[lock_less-LLDs-for-38-v2 13a4cd2] megaraid_sas: Remove bogus hba_lock __megasas_get_cmd()
 1 files changed, 0 insertions(+), 3 deletions(-)

Thanks!

--nab


  reply	other threads:[~2010-11-29 21:00 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-11-28  7:17 [PATCH 0/3] megaraid_sas: Convert to host_lock less w/ interrupts disabled internally Nicholas A. Bellinger
2010-11-28  7:17 ` [PATCH 1/3] megaraid_sas: Add smp_mb__after_atomic_*() for instance->fw_outstanding Nicholas A. Bellinger
2010-11-28  7:17 ` [PATCH 2/3] megaraid_sas: Convert instance->issuepend_done to atomic_t Nicholas A. Bellinger
2010-11-28  7:17 ` [PATCH 3/3] megaraid_sas: Convert SHT->queuecommand() to run host_lock-less Nicholas A. Bellinger
2010-11-29 16:41   ` Christoph Hellwig
2010-11-29 20:54     ` Nicholas A. Bellinger [this message]
2010-11-28  7:28 ` [PATCH 0/3] megaraid_sas: Convert to host_lock less w/ interrupts disabled internally Nicholas A. Bellinger
2010-11-29 15:56   ` Hannes Reinecke
2010-11-29 21:07     ` Nicholas A. Bellinger
2010-11-30  6:26 ` Yang, Bo
2010-11-30 21:21   ` Nicholas A. Bellinger
2010-11-30 22:05     ` Nicholas A. Bellinger
2010-11-30 22:30       ` Yang, Bo
2010-12-01  0:24         ` Nicholas A. Bellinger

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=1291064075.17194.3.camel@haakon2.linux-iscsi.org \
    --to=nab@linux-iscsi.org \
    --cc=Bo.Yang@lsi.com \
    --cc=James.Bottomley@suse.de \
    --cc=hare@suse.de \
    --cc=hch@lst.de \
    --cc=linux-scsi@vger.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