public inbox for linux-scsi@vger.kernel.org
 help / color / mirror / Atom feed
From: Christoph Hellwig <hch@infradead.org>
To: James Bottomley <James.Bottomley@SteelEye.com>
Cc: Jeff Garzik <jgarzik@pobox.com>,
	Luben Tuikov <luben_tuikov@adaptec.com>,
	Christoph Hellwig <hch@infradead.org>,
	SCSI Mailing List <linux-scsi@vger.kernel.org>
Subject: Re: [RFC][PATCH] allow sleep inside EH hooks
Date: Fri, 27 May 2005 18:22:32 +0100	[thread overview]
Message-ID: <20050527172232.GA5814@infradead.org> (raw)
In-Reply-To: <1117213489.5035.30.camel@mulgrave>

On Fri, May 27, 2005 at 01:04:49PM -0400, James Bottomley wrote:
> On Fri, 2005-05-27 at 12:49 -0400, Jeff Garzik wrote:
> > I'm also curious to see what others think about removing the host_lock 
> > acquisition from ->queuecommand() calls.
> 
> Personally I don't see the need for it for two reasons:
> 
> 1) There are certain atomic ops in the mid layer issue that necessitate
> we acquire it anyway (serial number generation and state model checking)
> 2) All queuecommand routines should move to the model of either issuing
> or rejecting the command ... if they do that, often there's no need for
> the mucking with lock, they remain locked throughout.
> 
> On point 2), look at the changes to the aic7xxx driver.  Once its
> internal issue queueing was pulled out, it no longer needs to muck with
> the host lock in ahc_linux_queue.  If you don't enter this locked, it
> would just have to take it at the top and release it before return, as
> would most other well written drivers.

The only think host_lock in ->queuecommand protects against is the
interrupt handler, which is completely in the driver.  At which point
it makes lots of sense to use a driver-private lock for it.  Even better
we can get the scsi subsystem out of the irq disabling business once
all drivers use their own locks in the interrupt handler.


  reply	other threads:[~2005-05-27 17:22 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-05-27  4:32 [RFC][PATCH] allow sleep inside EH hooks Jeff Garzik
2005-05-27  6:40 ` Arjan van de Ven
2005-05-27  7:11 ` Christoph Hellwig
2005-05-27  7:48   ` Jeff Garzik
2005-05-27  7:59     ` Christoph Hellwig
2005-05-27  8:36       ` Jeff Garzik
2005-05-27 16:43         ` Luben Tuikov
2005-05-27 16:49           ` Jeff Garzik
2005-05-27 17:04             ` James Bottomley
2005-05-27 17:22               ` Christoph Hellwig [this message]
2005-05-27 17:23                 ` Jeff Garzik
2005-05-27 17:16             ` 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=20050527172232.GA5814@infradead.org \
    --to=hch@infradead.org \
    --cc=James.Bottomley@SteelEye.com \
    --cc=jgarzik@pobox.com \
    --cc=linux-scsi@vger.kernel.org \
    --cc=luben_tuikov@adaptec.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