linux-scsi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Tejun Heo <htejun@gmail.com>
To: James Bottomley <James.Bottomley@SteelEye.com>,
	SCSI Mailing List <linux-scsi@vger.kernel.org>
Subject: Regarding ordered-tag support.
Date: Wed, 08 Feb 2006 15:40:08 +0900	[thread overview]
Message-ID: <43E99248.7090505@gmail.com> (raw)

Hello, James.

Now that new ordered implementation is in the mainline, we can properly 
use ordered-tag during barrier sequence.  As noted in the barrier doc, 
the problem with the current SCSI midlayer is that scsi_request_fn() is 
not atomic w.r.t. q->queuelock, so even if ordered-tag requests leave 
request queue in the correct order, they can be reordered while they are 
being issued by SCSI midlayer.

There can be two solutions to this problem.

1. Rewrite scsi_request_fn() and scsi_dispatch_cmd() such that 
q->queuelock is not released during command issue.  This implies 
grabbing shost->host_lock while holding q->queuelock.

2. Don't allow concurrent command issuing by marking SCSI device during 
command issuing (e.g. sdev->issue_in_progress)

I prefer #1 as it's more straight-forward.  To implement #1, 
scsi_request_fn() should be reorganized quite a bit, but, if you 
remember, the scsi_reqfn reimplementation patch I wrote quite a while 
ago suites this pretty well.  What do you think?

-- 
tejun

             reply	other threads:[~2006-02-08  6:40 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-02-08  6:40 Tejun Heo [this message]
2006-02-08 15:49 ` Regarding ordered-tag support James Bottomley
2006-02-08 16:10   ` Tejun
2006-02-08 16:25     ` James Smart
2006-02-08 16:57       ` Tejun
2006-02-08 17:07         ` James Bottomley
2006-02-08 17:18           ` Tejun
2006-02-08 17:27             ` James Bottomley
2006-02-08 18:04               ` Jeff Garzik
2006-02-09  4:12                 ` Tejun Heo
2006-02-09 17:20                   ` James Bottomley
2006-02-10  0:45                     ` Tejun Heo
2006-02-08 16:26     ` James Bottomley
2006-02-08 16:22   ` James Smart
2006-02-08 20:50     ` James Bottomley
2006-02-08 20:59       ` James Bottomley

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=43E99248.7090505@gmail.com \
    --to=htejun@gmail.com \
    --cc=James.Bottomley@SteelEye.com \
    --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;
as well as URLs for NNTP newsgroup(s).