From: Christoph Hellwig <hch@lst.de>
To: "Nicholas A. Bellinger" <nab@linux-iscsi.org>
Cc: linux-scsi <linux-scsi@vger.kernel.org>,
Hannes Reinecke <hare@suse.de>, Bo Yang <Bo.Yang@lsi.com>,
Christoph Hellwig <hch@lst.de>,
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 17:41:00 +0100 [thread overview]
Message-ID: <20101129164100.GA22820@lst.de> (raw)
In-Reply-To: <1290928656-31116-4-git-send-email-nab@linux-iscsi.org>
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.
next prev parent reply other threads:[~2010-11-29 16:41 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 [this message]
2010-11-29 20:54 ` Nicholas A. Bellinger
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=20101129164100.GA22820@lst.de \
--to=hch@lst.de \
--cc=Bo.Yang@lsi.com \
--cc=James.Bottomley@suse.de \
--cc=hare@suse.de \
--cc=linux-scsi@vger.kernel.org \
--cc=nab@linux-iscsi.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