From: "Nicholas A. Bellinger" <nab@linux-iscsi.org>
To: Vasu Dev <vasu.dev@linux.intel.com>
Cc: Matthew Wilcox <matthew@wil.cx>, "Zou, Yi" <yi.zou@intel.com>,
Mike Christie <michaelc@cs.wisc.edu>,
linux-scsi <linux-scsi@vger.kernel.org>,
FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>,
James Bottomley <James.Bottomley@suse.de>,
"devel@open-fcoe.org" <devel@open-fcoe.org>,
Christoph Hellwig <hch@lst.de>, Joe Eykholt <jeykholt@cisco.com>,
Hannes Reinecke <hare@suse.de>
Subject: RE: [Open-FCoE] [RFC PATCH] scsi, fcoe, libfc: drop scsi host_lock use from fc_queuecommand
Date: Thu, 02 Sep 2010 12:48:48 -0700 [thread overview]
Message-ID: <1283456928.5598.117.camel@haakon2.linux-iscsi.org> (raw)
In-Reply-To: <1283448262.30431.172.camel@vi2.jf.intel.com>
On Thu, 2010-09-02 at 10:24 -0700, Vasu Dev wrote:
> On Wed, 2010-09-01 at 14:38 -0700, Nicholas A. Bellinger wrote:
> > > Maybe two additional checks here is not so neat but not too bad
> > either
> > > as just two additional checks here, I excluded this unlocked_qcmd
> > checks
> > > from scsi_error queuecommand calling to not clutter its code there
> > with
> > > these additional checks w/o any good case for that code path.
> > >
> >
> > Hmmmm, handing off the locking like this between ML and LLD gets ugly
> > pretty quick, so I am not sure exactly sure if this is the right way
> > to
> > go about it..
> >
> > Mabye in code terms we might need to consider converting some (or
> > all..?) struct Scsi_Host->host_lock accesses to some form of
> > Linux/SCSI
> > Host specific lock and unlock wrapper that is aware of the current
> > ->queuecommand() LLD lock status..? Obviously this would only need to
> > cover the queuecommand path here first, but perhaps would be useful in
> > other areas as well..?
> >
>
> This patch would add only two conditional locking and unlocking of host
> lock in scsi_dispatch_cmd and these are not applicable to all other
> several places host_lock use, therefore any wrapper for just these two
> new places is not worthy as that would hide conditions inside wrapper,
> or may be I'm missing something here.
Hmmm, fair point here.. It is just something about seeing single block
conditional with unlock and locking spins that makes me a little
un-easy.. ;-)
>
>
> > This would at least (I think) allow ML and LLD code to be a tad bit
> > cleaner than something like the example above where
> > host->unlocked_qcmds
> > TRUE/FALSE conditionals exist directly within ML and LLD code.
> >
>
> Yeah but direct use makes things more obvious at first look. However
> neatness is worthy using wrapper(macros) if there are several such
> places. Anycase this is very minor code style thing here and I'm fine
> with wrapper if you want.
Sure, I am thinking about these simple host_lock wrappers as more of a
transitional look for LLDs more than anything..
Btw, I would be happy to include your forthcoming v2 patch into a
lio-core-2.6.git branch, and give it some testing in the next week.
Thanks!
--nab
next prev parent reply other threads:[~2010-09-02 19:52 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20100831225338.25102.59500.stgit@localhost.localdomain>
2010-08-31 23:56 ` [Open-FCoE] [RFC PATCH] scsi, fcoe, libfc: drop scsi host_lock use from fc_queuecommand Nicholas A. Bellinger
2010-09-01 0:16 ` Nicholas A. Bellinger
2010-09-01 4:17 ` Mike Christie
[not found] ` <4C7DD3E8.9050700-hcNo3dDEHLuVc3sceRu5cw@public.gmane.org>
2010-09-01 7:57 ` Zou, Yi
2010-09-01 20:10 ` [Open-FCoE] " Nicholas A. Bellinger
[not found] ` <1283371821.32007.636.camel-Y1+j5t8j3WgjMeEPmliV8E/sVC8ogwMJ@public.gmane.org>
2010-09-01 21:06 ` Vasu Dev
2010-09-01 21:38 ` [Open-FCoE] " Nicholas A. Bellinger
2010-09-02 17:24 ` Vasu Dev
2010-09-02 19:48 ` Nicholas A. Bellinger [this message]
2010-09-03 22:38 ` Vasu Dev
[not found] ` <1283375187.30431.71.camel-B2RhF0yJhE275v1z/vFq2g@public.gmane.org>
2010-09-01 22:45 ` Chris Leech
2010-09-01 23:38 ` [Open-FCoE] " Mike Christie
2010-09-02 1:37 ` Mike Christie
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=1283456928.5598.117.camel@haakon2.linux-iscsi.org \
--to=nab@linux-iscsi.org \
--cc=James.Bottomley@suse.de \
--cc=devel@open-fcoe.org \
--cc=fujita.tomonori@lab.ntt.co.jp \
--cc=hare@suse.de \
--cc=hch@lst.de \
--cc=jeykholt@cisco.com \
--cc=linux-scsi@vger.kernel.org \
--cc=matthew@wil.cx \
--cc=michaelc@cs.wisc.edu \
--cc=vasu.dev@linux.intel.com \
--cc=yi.zou@intel.com \
/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;
as well as URLs for NNTP newsgroup(s).