linux-scsi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* returning scsi I/O to OS from interrupt handler
@ 2007-08-26 16:11 Parav Pandit
  2007-08-30  9:45 ` returning scsi I/O to SCSI mid layer from Fast IRQ context Parav Pandit
  0 siblings, 1 reply; 3+ messages in thread
From: Parav Pandit @ 2007-08-26 16:11 UTC (permalink / raw)
  To: linux-scsi

Hi,

A low level SCSI HBA driver can return the I/O back to
the OS from various paths.

Some of the common possible paths
1, enqueue_command itself
2. Timer handler (at the time of command timeout)
3. Interrupt handler (when a response is received from
the storage)
4. DPC handler thread.

Whenever an I/O is returned from the interrupt handler
by invoking scsi_done callback function, it will
invoke the SCSI mid layer.

1. Is it good practice to return call scsi_done
callback function from Interrupt handler? 
If no, may I know the implications of doing that?
(other then blocking the interrupt context for a
longer time)

2. if multiple I/Os are returned in a single
interrupt, how many  commands should be returned by
calling scsi_done before shifting to dpc thread?

Regards,
Parav Pandit



       
____________________________________________________________________________________
Got a little couch potato? 
Check out fun summer activities for kids.
http://search.yahoo.com/search?fr=oni_on_mail&p=summer+activities+for+kids&cs=bz 

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

* Re: returning scsi I/O to SCSI mid layer from Fast IRQ  context
  2007-08-26 16:11 returning scsi I/O to OS from interrupt handler Parav Pandit
@ 2007-08-30  9:45 ` Parav Pandit
  2007-08-30 12:49   ` James Smart
  0 siblings, 1 reply; 3+ messages in thread
From: Parav Pandit @ 2007-08-30  9:45 UTC (permalink / raw)
  To: linux-scsi

Let me simplify and ask in different way.

1. Can I return a scsi I/O by invoking scsi_done()
from the Fast IRQ context in the Low level SCSI HBA
driver?

2. Is the interrupt handler right place to call
scsi_done() and invoke SCSI mid layer? or should I
defer to the DPC thread context?

Parav



--- Parav Pandit <paravpandit@yahoo.com> wrote:

> Hi,
> 
> A low level SCSI HBA driver can return the I/O back
> to
> the OS from various paths.
> 
> Some of the common possible paths
> 1, enqueue_command itself
> 2. Timer handler (at the time of command timeout)
> 3. Interrupt handler (when a response is received
> from
> the storage)
> 4. DPC handler thread.
> 
> Whenever an I/O is returned from the interrupt
> handler
> by invoking scsi_done callback function, it will
> invoke the SCSI mid layer.
> 
> 1. Is it good practice to return call scsi_done
> callback function from Interrupt handler? 
> If no, may I know the implications of doing that?
> (other then blocking the interrupt context for a
> longer time)
> 
> 2. if multiple I/Os are returned in a single
> interrupt, how many  commands should be returned by
> calling scsi_done before shifting to dpc thread?
> 
> Regards,
> Parav Pandit
> 
> 
> 
>        
>
____________________________________________________________________________________
> Got a little couch potato? 
> Check out fun summer activities for kids.
>
http://search.yahoo.com/search?fr=oni_on_mail&p=summer+activities+for+kids&cs=bz
> 
> -
> 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
> 



       
____________________________________________________________________________________Ready for the edge of your seat? 
Check out tonight's top picks on Yahoo! TV. 
http://tv.yahoo.com/

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

* Re: returning scsi I/O to SCSI mid layer from Fast IRQ  context
  2007-08-30  9:45 ` returning scsi I/O to SCSI mid layer from Fast IRQ context Parav Pandit
@ 2007-08-30 12:49   ` James Smart
  0 siblings, 0 replies; 3+ messages in thread
From: James Smart @ 2007-08-30 12:49 UTC (permalink / raw)
  To: Parav Pandit; +Cc: linux-scsi

The midlayer is written to accept scsi i/o completion (via scsi_done())
from the context of an interrupt handler.  The scsi_done() path actually
just traverses up the stack a little, then queues the request on a done
queue, and scheduls a softirq thread for actual completion processing.

The belief is the best-performing drivers call the command done routine
from the interrupt handler (otherwise, you may have 2 context switches
before completion processing).

-- james s

Parav Pandit wrote:
> Let me simplify and ask in different way.
> 
> 1. Can I return a scsi I/O by invoking scsi_done()
> from the Fast IRQ context in the Low level SCSI HBA
> driver?
> 
> 2. Is the interrupt handler right place to call
> scsi_done() and invoke SCSI mid layer? or should I
> defer to the DPC thread context?
> 
> Parav
> 
> 
> 
> --- Parav Pandit <paravpandit@yahoo.com> wrote:
> 
>> Hi,
>>
>> A low level SCSI HBA driver can return the I/O back
>> to
>> the OS from various paths.
>>
>> Some of the common possible paths
>> 1, enqueue_command itself
>> 2. Timer handler (at the time of command timeout)
>> 3. Interrupt handler (when a response is received
>> from
>> the storage)
>> 4. DPC handler thread.
>>
>> Whenever an I/O is returned from the interrupt
>> handler
>> by invoking scsi_done callback function, it will
>> invoke the SCSI mid layer.
>>
>> 1. Is it good practice to return call scsi_done
>> callback function from Interrupt handler? 
>> If no, may I know the implications of doing that?
>> (other then blocking the interrupt context for a
>> longer time)
>>
>> 2. if multiple I/Os are returned in a single
>> interrupt, how many  commands should be returned by
>> calling scsi_done before shifting to dpc thread?
>>
>> Regards,
>> Parav Pandit
>>
>>
>>
>>        
>>
> ____________________________________________________________________________________
>> Got a little couch potato? 
>> Check out fun summer activities for kids.
>>
> http://search.yahoo.com/search?fr=oni_on_mail&p=summer+activities+for+kids&cs=bz
>> -
>> 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
>>
> 
> 
> 
>        
> ____________________________________________________________________________________Ready for the edge of your seat? 
> Check out tonight's top picks on Yahoo! TV. 
> http://tv.yahoo.com/
> -
> 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] 3+ messages in thread

end of thread, other threads:[~2007-08-30 12:49 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-08-26 16:11 returning scsi I/O to OS from interrupt handler Parav Pandit
2007-08-30  9:45 ` returning scsi I/O to SCSI mid layer from Fast IRQ context Parav Pandit
2007-08-30 12:49   ` James Smart

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).