Re: [PATCH] Re: sleeping in scsi EH

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 05/27/05 06:45, Jeff Garzik wrote:
> Christoph Hellwig wrote:
> 
>>On Fri, May 27, 2005 at 04:37:29AM -0400, Jeff Garzik wrote:
>>
>>
>>>Christoph Hellwig wrote:
>>>
>>>
>>>>You can sleep in them.  You must however release the host lock and enable
>>>>irqs first and reverse that before returning.  The error handlers don't
>>>>need the host lock, but we're stuck with the unfortunate calling convention
>>>>for now.
>>>
>>>Why are we stuck with this calling convention, when everyone who cares 
>>>circumvents it?
>>
>>
>>Because no one found the time to do a full transition yet.  If you want to
>>update all scsi drivers feel free.  One patch per method please.
> 
> 
> Something like the attached?

I like it very, _very_ much.

That is, what is the point to have EH in the first place (from a
kernel thread) when a lock is held and irqs are off? (no sleeping)
Might as well go back to abort()... ;-)  The whole point of
EH is so that LLDD can sleep waiting possible for TMFs to return.

In general I don't like to see SCSI Core imposed locking onto the
LLDDs.  LLDDs should take care of their own locking as should SCSI Core.

Next: off with the host_lock. ;-)

>   *      Returns SUCCESS if command aborted else FAILED
>   *
> - *      Locks: struct Scsi_Host::host_lock held (with irqsave) on entry 
> - *      and assumed to be held on return.
> + *      Locks: None held.  EH context.
>   *
>   *      Calling context: kernel thread

Is it possible to mention explicitly that sleeping is allowed
and encouraged while waiting for TMFs to return and
to change "LLD", "Low Level Driver" -- I've seen those
on the streets, either drunks or bad drivers, --
to "LLDD", "Low Level _Device_ Drivers"?

	Luben
-
: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Device Mapper]
  Powered by Linux