public inbox for linux-scsi@vger.kernel.org
 help / color / mirror / Atom feed
* RE: [PATCH] - mptfusion - adding back the spin locks in eh handle rs
@ 2005-06-23 20:12 Moore, Eric Dean
  2005-06-23 20:37 ` Luben Tuikov
  0 siblings, 1 reply; 6+ messages in thread
From: Moore, Eric Dean @ 2005-06-23 20:12 UTC (permalink / raw)
  To: Luben Tuikov; +Cc: linux scsi, James Bottomley

On Thursday, June 23, 2005 1:04 PM, Luben Tuikov wrote:
> On 06/23/05 14:20, Moore, Eric Dean wrote:
> > The eh handlers are called with host_lock acquired, and 
> interrupts disabled.
> > However fusion waits for completion of task managment 
> request.  With these spin locks 
> > removed, the driver is going to hang within the sleep 
> calls.   Someone recently posted 
> > a patch to remove them(don´t know who),  and can be found 
> in James Bottomely scsi-misc branch.  
> 
> That was Jeff, and I thought those patches made it in already.
> They are needed and are a good thing.
> 
> 	Luben
> 


Ok, explain that to me why having our driver hang is a good thing.
The task managment requests to our firmware stack are done in interrupt
mode,
thus we have sleep and have interrupts enabled in the eh threads waiting on
the commands to complete.
Christoph H. requested this change about 6 months ago, asking that we remove
our watchdog timers in the eh threads, in favor of this design.

Eric Moore
LSI Logic Corporation

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

^ permalink raw reply	[flat|nested] 6+ messages in thread
* RE: [PATCH] - mptfusion - adding back the spin locks in eh handle rs
@ 2005-06-23 22:06 Moore, Eric Dean
  2005-06-23 23:18 ` Jeff Garzik
  2005-06-23 23:47 ` Luben Tuikov
  0 siblings, 2 replies; 6+ messages in thread
From: Moore, Eric Dean @ 2005-06-23 22:06 UTC (permalink / raw)
  To: Luben Tuikov; +Cc: linux scsi, James Bottomley

Luben

Ok - So you agree that completing Task management request
in the same context as the eh threads is the way to go, right?

Because that is what this LLD is doing.  Have you had
a chance to look at our code?

That previous patch submitted by Jeff(I guess) was removing code which
enabled interrupts.  My patch was restoring it back to previous
working code which doesn't hang the driver.

The reason that the previous patch hangs the driver is we are issuing
the task managment request using interrupt mode, not polling.
Meaning it requires interrupts to be enabled. 
As you probably know, you can't go to sleep when interrupts are disabled.
All eh entry points are called with interrupts disabled. Take a look
at scsi_try_bus_device_reset (scsi_error.c).

Eric

Luben Tuikov wrote:
> 
> 
> On 06/23/05 16:12, Moore, Eric Dean wrote:
> > Ok, explain that to me why having our driver hang is a good thing.
> > The task managment requests to our firmware stack are done 
> in interrupt
> > mode,
> > thus we have sleep and have interrupts enabled in the eh 
> threads waiting on
> > the commands to complete.
> > Christoph H. requested this change about 6 months ago, 
> asking that we remove
> > our watchdog timers in the eh threads, in favor of this design.
> 
> Hi Eric,
> 
> It is up to the LLDD to know how to deliver a TMF to the device.
> Whether this is done purely in process context (iSCSI) or
> in mixed context is up to the LLDD.
> 
> Also, most often than not, you'd want to wait for the TMF to
> return (iSCSI), to know its status (although you can assume 
> it without fault).
> 
> Nevertheless, calling the eh routines in process context is the way
> to go. (in order to allow for "sleeping", on delivery you can 
> disable ints
> as appropriate for the hw)
> 
> 	Luben
> 

^ permalink raw reply	[flat|nested] 6+ messages in thread
* RE: [PATCH] - mptfusion - adding back the spin locks in eh handle rs
@ 2005-06-24 17:24 Moore, Eric Dean
  0 siblings, 0 replies; 6+ messages in thread
From: Moore, Eric Dean @ 2005-06-24 17:24 UTC (permalink / raw)
  To: Jeff Garzik; +Cc: Luben Tuikov, linux scsi, James Bottomley

Jeff - I didn't realize that the host-lock spin locks were removed inside
scsi mid layer scsi_error.c code.  I just applied James
scsi-misc-2.6.diff against the 2.6.12 kerne.  Just built this kernel
and tested the fusion driver, and I'm happy.  No problem, ignore yesterdays
patch.

I will have to repost the other two patch's later today; e.g. 
- change_queue_depth API
- FC transport support.

Eric


On Thursday, June 23, 2005 5:18 PM, Jeff Garzik wrote:
> Moore, Eric Dean wrote:
> > Luben
> > 
> > Ok - So you agree that completing Task management request
> > in the same context as the eh threads is the way to go, right?
> > 
> > Because that is what this LLD is doing.  Have you had
> > a chance to look at our code?
> > 
> > That previous patch submitted by Jeff(I guess) was removing 
> code which
> > enabled interrupts.  My patch was restoring it back to previous
> > working code which doesn't hang the driver.
> 
> What was broken?
> 
> MPT abort handler would release the spinlock at the beginning, and 
> reacquire it at the end, essentially reversing the spinlocks 
> in the old 
> spinlocked EH code.
> 


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2005-06-24 17:24 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-06-23 20:12 [PATCH] - mptfusion - adding back the spin locks in eh handle rs Moore, Eric Dean
2005-06-23 20:37 ` Luben Tuikov
  -- strict thread matches above, loose matches on Subject: below --
2005-06-23 22:06 Moore, Eric Dean
2005-06-23 23:18 ` Jeff Garzik
2005-06-23 23:47 ` Luben Tuikov
2005-06-24 17:24 Moore, Eric Dean

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox