All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jeff Garzik <jgarzik@pobox.com>
To: Mark Lord <lkml@rtr.ca>
Cc: linux-kernel@vger.kernel.org,
	SCSI Mailing List <linux-scsi@vger.kernel.org>,
	James Bottomley <James.Bottomley@steeleye.com>
Subject: Re: [PATCH] New QStor SATA/RAID Driver for 2.6.9-rc2
Date: Tue, 14 Sep 2004 13:56:41 -0400	[thread overview]
Message-ID: <414730D9.3000003@pobox.com> (raw)
In-Reply-To: <41472FA0.2090108@rtr.ca>

Mark Lord wrote:
>  >In particular, releasing the lock and sleeping would be very wrong
>  >in the ->queuecommand and error handling paths
>  >(alas...  I would love to sleep in the fine-grained eh hooks)
> 
> Mmm.. definitely no sleeps in queuecommand(), but sleeping seems
> necessary in host_reset_handler() -- the alternative is to just
> busywait inline.. which would really not be good.
> 
> Isn't the protocol for the eh host_reset_handler() basically
> just "do the reset, and return whether it worked or not?".
> If so, the driver really has to hang around until the reset
> completes so that correct status can be returned.  This generally
> takes a couple of milliseconds in practice (measured it).
> 
> Is there a better way to do that?
> 
> I really would prefer never to have to reset the drives,
> but when they have a queuing error, many of them simply
> won't talk to us again without a reset.  The driver avoids
> the reset as much as it can for other situations, though.


James and I occasionally talk about this.  This is a _big_ reason why I 
use the ->eh_strategy_handler() rather than the more fine-grained ->eh 
hooks:  you get unlocked, unfettered sleep priveleges inside the scsi EH 
thread.

The SCSI LLD API really needs to -not- spinlock on the EH hooks, and 
instead simply guarantee that ->queuecommand and other hooks will not be 
called while the driver is in EH.

ISTR James didn't disagree, so maybe a patch can be worked out...

Of course, you could always just use ->eh_strategy_handler and do 100% 
of the error handling yourself.  That's the route libata chose.

	Jeff

  reply	other threads:[~2004-09-14 17:56 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-09-14 15:42 [PATCH] New QStor SATA/RAID Driver for 2.6.9-rc2 Mark Lord
2004-09-14 16:00 ` Alan Cox
2004-09-14 17:14   ` Mark Lord
2004-09-14 17:00 ` Jeff Garzik
2004-09-14 17:27   ` Mark Lord
2004-09-14 17:33     ` Jeff Garzik
2004-09-14 17:51   ` Mark Lord
2004-09-14 17:56     ` Jeff Garzik [this message]
2004-09-14 18:03       ` Mark Lord
2004-09-14 18:07         ` Jeff Garzik
2004-09-14 18:08         ` Jeff Garzik
2004-09-14 18:25   ` James Bottomley
2004-09-14 18:35     ` Jeff Garzik
2004-09-14 18:51       ` James Bottomley
2004-09-15  2:39     ` Mark Lord
2004-09-15  2:47       ` Jeff Garzik
2004-09-15 12:35         ` Mark Lord
  -- strict thread matches above, loose matches on Subject: below --
2004-09-14 15:43 Mark Lord
2004-09-14 16:21 ` Jeff Garzik
2004-09-14 16:23   ` Jeff Garzik
2004-09-14 16:39   ` Nathan Bryant
2004-09-14 17:02     ` Jeff Garzik
2004-09-15  4:22   ` Douglas Gilbert
2004-09-15  4:30     ` Jeff Garzik
2004-09-15 12:47     ` Mark Lord
2004-09-15 12:55       ` Jens Axboe
2004-09-15 13:13         ` Matthew Wilcox
2004-09-15 16:14           ` Jeff Garzik
2004-09-15 17:01       ` Jeff Garzik
2004-09-15  7:02 ` Christoph Hellwig

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=414730D9.3000003@pobox.com \
    --to=jgarzik@pobox.com \
    --cc=James.Bottomley@steeleye.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-scsi@vger.kernel.org \
    --cc=lkml@rtr.ca \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.