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: Christoph Hellwig <hch@lst.de>,
	SCSI Mailing List <linux-scsi@vger.kernel.org>
Subject: Re: [PATCH] allow drivers to hook into watchdog timeout
Date: 10 Feb 2004 11:42:42 -0500	[thread overview]
Message-ID: <1076431366.1804.24.camel@mulgrave> (raw)
In-Reply-To: <2432440000.1076430858@aslan.btc.adaptec.com>

On Tue, 2004-02-10 at 11:34, Justin T. Gibbs wrote:
> o When should the timer start?  If the HBA controls the timer, the timer
>   can be started only once the command is actually issued to the end device.
>   The watchdog is supposed to ensure that the transport/device doesn't
>   lockup, so the timer should only cover this period.  The mid-layer
>   can't have this precision.  This is even more crucial for drivers that
>   must temporarily hold back I/O to handle a topology change, LIP, or
>   other transport specific event that the mid-layer is unaware of.

There was a change between 2.4 and 2.6 to address this.  It was the
concept of eliminating driver queues entirely and using the block layer
queueing facilities.  Thus, a 2.6 queuecommand should either issue the
command or return it to the mid-layer for requeueing.

I know that "issue the command" means queue in the device internal issue
queue for quite a few devices.  However, the time to traverse this queue
should be as short as possible.  The driver is free to watchdog the HW
issue queue to make sure it operates.

If you're spending seconds in the HW issue queue, there's something
wrong in the way the queue is working.

The bottom line is that the elimination of software queueing in drivers
should have dispensed with the need to modify the mid-layer timers.

> o When should the timer be stopped?  On command completion, of course,
>   but there are other, transport specific, times when the timer may need
>   to be stopped prematurely or given a completely different value than
>   what was originally given.  For example, on transports that do not
>   provide error/sense data with every completion, the HBA may have to
>   issue another command, without the knowledge of the mid-layer, to
>   retrieve this data.  Since the original command has already completed,
>   the original timer should not be running.  A new timer, tailored to
>   the characteristics of retrieving sense data should be running instead.
>   If the old timer is left running and expires, which command timed out?
>   The original command or the request sense command?  The HBA knows,
>   but the mid-layer does not.

commands are stopped as soon as the device acks.  scsi_done() is
designed to be called from interrupt level.  This can be done with or
without the lock since it uses a per cpu queue.

scsi_done stops the timer immediately.  Command processing is deferred
until the scsi softirq.

As far as ACA emulation goes, perhaps you're right, it is time to remove
that from the drivers as well and place it up in the mid-layer.  That
way we'd have better knowledge of the request sense timings.

James 



  reply	other threads:[~2004-02-10 16:42 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-01-20 13:20 [PATCH] allow drivers to hook into watchdog timeout Christoph Hellwig
2004-01-20 15:53 ` Mike Anderson
2004-01-20 16:00   ` Christoph Hellwig
2004-01-20 16:47     ` Mike Anderson
2004-01-22 13:59       ` Christoph Hellwig
2004-01-22 14:27         ` Justin T. Gibbs
2004-01-20 17:00 ` Brian King
2004-01-20 18:06   ` Christoph Hellwig
2004-02-10 16:34 ` Justin T. Gibbs
2004-02-10 16:42   ` James Bottomley [this message]
2004-02-10 17:47     ` Justin T. Gibbs
2004-02-10 18:41       ` James Bottomley
2004-02-10 19:44         ` Justin T. Gibbs
2004-02-10 20:05           ` James Bottomley
2004-02-10 20:26             ` Justin T. Gibbs
2004-02-10 22:47               ` Clay Haapala
2004-02-11 20:05               ` James Bottomley
2004-02-12  0:15                 ` Justin T. Gibbs
2004-02-12 14:42                   ` 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=1076431366.1804.24.camel@mulgrave \
    --to=james.bottomley@steeleye.com \
    --cc=gibbs@scsiguy.com \
    --cc=hch@lst.de \
    --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