public inbox for linux-scsi@vger.kernel.org
 help / color / mirror / Atom feed
From: James Bottomley <James.Bottomley@steeleye.com>
To: "Justin T. Gibbs" <gibbs@scsiguy.com>
Cc: SCSI Mailing List <linux-scsi@vger.kernel.org>,
	Andrew Morton <akpm@osdl.org>
Subject: Re: [PATCH] Fix aic7xxx del_timer_sync() deadlock
Date: 28 Feb 2004 09:39:48 -0600	[thread overview]
Message-ID: <1077982791.2020.25.camel@mulgrave> (raw)
In-Reply-To: <3492060000.1077915050@aslan.btc.adaptec.com>

On Fri, 2004-02-27 at 14:50, Justin T. Gibbs wrote:
> Well, experience shows that if you implement a SCSI system based solely

Heh, well, I won't disagree with that.

> There are lots of devices out there that require a delay of at least
> 250ms in order to not deadlock their internal SCSI processor.  The
> I/O load of the system has no bearing on when a device will become
> "unbusy" (we can't even say why it is "busy"), so I fail to see why
> it should have any effect on how long we wait in response to this
> condition.

Could you give the most common example ... I'll see if I can persuade
the OSDL test people to try it out with the current stack?

What we currently do is by design ... on busy or queue full at zero
depth we pause for three unplugs.  The first will be the returning queue
unplug, but the other two depend on the I/O pressure or the unplug
timer.  If you tell me what the inquiry strings of these devices are, I
can blacklist them to have a much larger max_device_blocked count, so if
there is a problem with them, *all* drivers will work rather than just
the Adaptec ones.

> In order to issue a DV command to the end device via the mid-layer, the
> host queue and the device queue must not be blocked.  But, for DV to be
> effective, it must be the only activity occurring on that device.  How do
> you reconcile the two while using the mid-layer to do your I/O?  The
> mid-layer has no concept of allowing a client to freeze the queue,
> wait for the active count to go to zero, effectively pre-empt
> the command stream with a series of special commands, and then unblock
> everyone else only at the end.  The closest the mid-layer comes to this
> is in some of its error recovery handling but those are internal
> interfaces.

But domain validation is a pretty intrusive thing.  It's only really
supposed to be run in two places:

1. At start of day, which you should do from slave_configure, where you
are guaranteed that nothing else is using the device

2. On indication of transport problems.  This you would run for a single
target from the bus or device reset handler after issuing the command
and pausing for the settle time (OK, that's bad because the settle time
is also built into the error handler, but that will improve when error
handling becomes more transport specific and I can build domain
validation directly into the SPI transport error handling).

In both of these cases, you are guaranteed a quiescent device queue, so
I don't see what the problem is.

James


  reply	other threads:[~2004-02-28 15:39 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-02-27 18:26 [PATCH] Fix aic7xxx del_timer_sync() deadlock James Bottomley
2004-02-27 19:23 ` Justin T. Gibbs
2004-02-27 19:34   ` James Bottomley
2004-02-27 20:50     ` Justin T. Gibbs
2004-02-28 15:39       ` James Bottomley [this message]
2004-02-29 19:26         ` Justin T. Gibbs
2004-02-29 21:10           ` James Bottomley
2004-02-29 22:23             ` Justin T. Gibbs
2004-02-29 21:25           ` James Bottomley
2004-02-28  2:40   ` Jeff Garzik
2004-02-28  9:25     ` Jens Axboe
2004-02-28 23:50       ` Jeff Garzik
2004-02-29  9:13         ` Jens Axboe
2004-02-29 16:21           ` Jeff Garzik
2004-02-29 16:39             ` Jens Axboe
2004-02-29 17:28               ` Jeff Garzik
2004-02-29 17:55                 ` Jens Axboe
2004-02-29 18:57           ` Justin T. Gibbs
2004-02-29 19:00             ` Jeff Garzik
2004-02-29 19:28               ` Justin T. Gibbs
2004-02-29 19:37                 ` Jeff Garzik
2004-02-29 19:42                   ` Justin T. Gibbs
2004-02-29 19:44                     ` Jeff Garzik
2004-02-29 20:06                       ` Jens Axboe
2004-02-29 20:20                         ` Jeff Garzik
2004-02-29 20:27                           ` Jens Axboe
2004-02-29 20:28                             ` Jeff Garzik
2004-02-29 19:43                   ` Jeff Garzik
2004-02-29 20:04             ` Jens Axboe

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=1077982791.2020.25.camel@mulgrave \
    --to=james.bottomley@steeleye.com \
    --cc=akpm@osdl.org \
    --cc=gibbs@scsiguy.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