From: john smith <whalajam@yahoo.com>
To: Matthew Wilcox <matthew@wil.cx>
Cc: linux-scsi@vger.kernel.org
Subject: Re: scsi_host_template.queuecommand() instances
Date: Fri, 4 Mar 2011 12:58:05 -0800 (PST) [thread overview]
Message-ID: <842460.81825.qm@web161919.mail.bf1.yahoo.com> (raw)
In-Reply-To: <20110228132402.GI13726@parisc-linux.org>
--- On Mon, 2/28/11, Matthew Wilcox <matthew@wil.cx> wrote:
> Before 2.6.37, there's a per-host lock acquired in the scsi
> layer that
> prevents queuecommand being called twice for the same host
> simultaneously.
> If your driver is drivign two cards, then it can still be
> executing
> twice ... but it's a rare driver that has global
> instead of per-host
> state to protect.
If precautions are taken (to protect shared data), I assume it is safe to spin_unlock(host->host_lock) - at the entry in queuecommand() and spin_lock(host->host_lock) - at the exit, to make it MT?
(I believe I've seen this done)
thanks,
John
prev parent reply other threads:[~2011-03-04 20:58 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-02-27 19:22 scsi_host_template.queuecommand() instances john smith
2011-02-27 22:21 ` Matthew Wilcox
2011-02-28 7:21 ` john smith
2011-02-28 13:24 ` Matthew Wilcox
2011-02-28 14:14 ` James Bottomley
2011-03-08 18:22 ` john smith
2011-03-04 20:58 ` john smith [this message]
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=842460.81825.qm@web161919.mail.bf1.yahoo.com \
--to=whalajam@yahoo.com \
--cc=linux-scsi@vger.kernel.org \
--cc=matthew@wil.cx \
/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