From: "Nicholas A. Bellinger" <nab@linux-iscsi.org>
To: James Bottomley <James.Bottomley@suse.de>
Cc: Mike Anderson <andmike@linux.vnet.ibm.com>,
linux-kernel <linux-kernel@vger.kernel.org>,
linux-scsi <linux-scsi@vger.kernel.org>,
Vasu Dev <vasu.dev@linux.intel.com>,
Tim Chen <tim.c.chen@linux.intel.com>,
Andi Kleen <ak@linux.intel.com>,
Matthew Wilcox <willy@linux.intel.com>,
Mike Christie <michaelc@cs.wisc.edu>,
Jens Axboe <jaxboe@fusionio.com>,
James Smart <james.smart@emulex.com>,
Andrew Vasquez <andrew.vasquez@qlogic.com>,
FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>,
Hannes Reinecke <hare@suse.de>, Joe Eykholt <jeykholt@cisco.com>,
Christoph Hellwig <hch@lst.de>, Jon Hawley <warthog9@kernel.org>,
Brian King <brking@linux.vnet.ibm.com>,
Christof Schmitt <christof.schmitt@de.ibm.com>,
Tejun Heo <tj@kernel.org>,
Andrew Morton <akpm@linux-foundation.org>,
"H. Peter Anvin" <hpa@zytor.com>
Subject: Re: [ANNOUNCE] Status of unlocked_qcmds=1 operation for .37
Date: Tue, 26 Oct 2010 16:00:48 -0700 [thread overview]
Message-ID: <1288134048.5169.132.camel@haakon2.linux-iscsi.org> (raw)
In-Reply-To: <1288133450.8283.723.camel@mulgrave.site>
On Tue, 2010-10-26 at 22:50 +0000, James Bottomley wrote:
> On Tue, 2010-10-26 at 15:34 -0700, Nicholas A. Bellinger wrote:
> > On Tue, 2010-10-26 at 17:27 -0500, James Bottomley wrote:
> > > On Tue, 2010-10-26 at 15:08 -0700, Nicholas A. Bellinger wrote:
> > > > [PATCH] scsi: Add SCSI_EH_SOFTIRQ_DONE usage
> > > >
> > > > This patch introduces a SCSI_EH_SOFTIRQ_DONE flag that is set in scsi_softirq_done()
> > > > from block soft_irq context that is used to signal when scsi_try_to_abort_cmd() should
> > > > be calling __scsi_try_to_abort_cmd() for a timed out struct scsi_cmnd instead of
> > > > returning SUCCESS via checking only blk_test_rq_complete(). This is done because
> > > > blk_rq_timed_out_timer() calls blk_mark_rq_complete() before blk_rq_timed_out() ->
> > > > struct request_queue->rq_timed_out_fn().
> > >
> > > This is getting pretty far off into the weeds. I think the first step
> > > should be queue lock push down into ->queuecommand. This would still
> > > necessitate locking around the serial number.
> >
> > Hmmm, I am not sure I understand what you mean here. My understanding
> > is that the whole point of the series was to remove any locking around
> > the serial number in order to make scsi_dispatch_cmd() lockless,
> > right..?
>
> The point is that several things have to happen for that to be a
> reality. The easiest and most obvious thing is lock push down in
> ->queuecommand.
>
Ok, can you please explain to me what you mean here..? As I really
thought we came to consensus that:
*) running in unlocked_qcmd=1 was to be made the default for LLDs using
the legacy optimization of ->queuecommand() -> unlock() ->
do_some_lld_work() -> lock() -> return to scsi_dispatch_cmd()
*) For the mpt-fusion / mpt2sas drivers which did not use the legacy
optimization, but Tim Chen has tested with the former and I am awaiting
an ACK from LSI on the latter.
*) All other drivers will function with host_lock held (eg: legacy mode)
in scsi_dispatch_cmd().
*) All drivers using cmd->serial_number for anything beyond an
informational purpose converted to use scsi_cmd_get_serial().
> The next is most likely serial number elimination.
>
> But the point is that we don't have to do the whole thing all at once
> (and spend months trying to get the series right).
Not exactly correct, we have the whole thing ready right now with libfc
running unlocked_qcmd=0 legacy mode.
Once I verify START_STOP case in scsi_error.c, I am happy to respin a
mergeable tree from linus HEAD for you to pull ASAP.
>
> > That is what the current patch series already does, in that it makes the
> > use of cmd->serial_number optional and requires LLDs who use this for
> > anything beyond an informational purpose to explictly call
> > scsi_cmd_get_serial().
>
> OK, so this patch is a corner case where the error handler is using the
> serial number value to deduce something the block layer already knows
> (whether the command completed or not). I don't think introducing a
> substitute flag is the right way, the information should just be
> extracted properly.
>
Well, according to andmike this is two corner cases that are a result of
the drop-host_lock-v4 series using only blk_test_rq_complete() in
scsi_try_to_abort_cmd(), which will be true because of:
blk_rq_timed_out_timer() -> blk_mark_rq_complete()
> But arguments about this don't have to impede the lock push down.
>
Sure, but I assume you mean the lock push down only for the legacy LLDs
that are not already internally unlocking host_lock in
SHT->queuecommand() in mainline code right..?
--nab
next prev parent reply other threads:[~2010-10-26 23:05 UTC|newest]
Thread overview: 29+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-10-20 20:49 Nicholas A. Bellinger
2010-10-21 19:26 ` Luben Tuikov
[not found] ` <20101021150840.GA24309@linux.vnet.ibm.com>
2010-10-26 22:08 ` Nicholas A. Bellinger
2010-10-26 22:27 ` James Bottomley
2010-10-26 22:34 ` Nicholas A. Bellinger
2010-10-26 22:50 ` James Bottomley
2010-10-26 23:00 ` Nicholas A. Bellinger [this message]
2010-10-26 23:11 ` James Bottomley
2010-10-26 23:31 ` Nicholas A. Bellinger
2010-10-27 7:53 ` Andi Kleen
2010-10-27 14:27 ` James Bottomley
2010-10-27 18:06 ` Nicholas A. Bellinger
2010-10-27 18:16 ` James Bottomley
2010-10-27 19:20 ` Mike Anderson
2010-10-27 19:55 ` Nicholas A. Bellinger
2010-10-27 23:28 ` Jeff Garzik
2010-10-28 9:10 ` Andi Kleen
2010-10-28 11:18 ` Boaz Harrosh
2010-10-28 18:26 ` Andi Kleen
2010-10-31 12:14 ` Boaz Harrosh
2010-11-01 11:45 ` Andi Kleen
2010-10-28 20:27 ` Nicholas A. Bellinger
2010-10-29 7:50 ` Andi Kleen
2010-10-29 23:50 ` Nicholas A. Bellinger
2010-10-29 23:57 ` Nicholas A. Bellinger
2010-10-27 18:03 ` Nicholas A. Bellinger
[not found] <C8E4BD3D.A1E3%giridhar.malavali@qlogic.com>
2010-10-20 23:19 ` Nicholas A. Bellinger
2010-10-21 0:30 ` Giridhar Malavali
2010-10-21 0:39 ` 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=1288134048.5169.132.camel@haakon2.linux-iscsi.org \
--to=nab@linux-iscsi.org \
--cc=James.Bottomley@suse.de \
--cc=ak@linux.intel.com \
--cc=akpm@linux-foundation.org \
--cc=andmike@linux.vnet.ibm.com \
--cc=andrew.vasquez@qlogic.com \
--cc=brking@linux.vnet.ibm.com \
--cc=christof.schmitt@de.ibm.com \
--cc=fujita.tomonori@lab.ntt.co.jp \
--cc=hare@suse.de \
--cc=hch@lst.de \
--cc=hpa@zytor.com \
--cc=james.smart@emulex.com \
--cc=jaxboe@fusionio.com \
--cc=jeykholt@cisco.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-scsi@vger.kernel.org \
--cc=michaelc@cs.wisc.edu \
--cc=tim.c.chen@linux.intel.com \
--cc=tj@kernel.org \
--cc=vasu.dev@linux.intel.com \
--cc=warthog9@kernel.org \
--cc=willy@linux.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
all inboxes | Powered by JetHome®