I have a SCSI device that appears to reach the status phase on two different requests in one order, but the IRPs are completed
about 10-20% of the time in the reverse order.
I do have two CPUs, but all interrupts are forced to CPU 0 (by a proprietary HAL whose sole purpose is to affect ScsiPort’s
affinity parameter to the IoConnectInterrupt call).
The IRP completion routine ends up being called out of order frequently. In what context does SCSIPort complete SRB/IRPs (DPC
or Thread)? Would SCSIPort tend to re-order these completions?
Thanks,
-DH
Dave Harvey, System Software Solutions, Inc.
617-964-7039, FAX 208-361-9395, xxxxx@syssoftsol.com, http://www.syssoftsol.com
Creators of RedunDisks - Robust RAID 1 for embedded systems.
You are currently subscribed to ntdev as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com
Suppose that scsiport uses a stack to queue completed requests in its
ISR, and pops the stack 'till its empty in its DPC. I think that would
explain the behavior. Try stepping into
ScsiPortNotification(RequestComplete, …) - you ought to see the front
end of the theorized behavior. This would of course be deliberate on the
part of some NT software engineer, determined to exercise to the max the
potential performance improvements inherent in asynchronous IO 
I was going to suggest that the proof would be that you only see this
behavior when you complete multiple requests in your miniport isr, but
as dpc’s are decoupled from isr’s that would not always be the case. It
would be the case that you would only see this behavior when your have
managed to complete multiple requests before the scsiport dpc runs.
-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Dave Harvey
Sent: Tuesday, November 20, 2001 7:13 PM
To: NT Developers Interest List
Subject: [ntdev] Out of order SCSI Status
I have a SCSI device that appears to reach the status phase
on two different requests in one order, but the IRPs are
completed about 10-20% of the time in the reverse order.
I do have two CPUs, but all interrupts are forced to CPU 0
(by a proprietary HAL whose sole purpose is to affect
ScsiPort’s affinity parameter to the IoConnectInterrupt call).
The IRP completion routine ends up being called out of order
frequently. In what context does SCSIPort complete SRB/IRPs (DPC
or Thread)? Would SCSIPort tend to re-order these completions?
Thanks,
-DH
Dave Harvey, System Software Solutions, Inc.
617-964-7039, FAX 208-361-9395, xxxxx@syssoftsol.com,
http://www.syssoftsol.com
Creators of RedunDisks - Robust RAID 1 for embedded systems.
You are currently subscribed to ntdev as: xxxxx@hollistech.com To
unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com
You are currently subscribed to ntdev as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com
> The IRP completion routine ends up being called out of order frequently. In what context
does SCSIPort complete SRB/IRPs (DPC
or Thread)?
DPC or even ISR.
IIRC some miniport functions are called from ISR, others from DpcForIsr+KeSynchronizeExecution.
Would SCSIPort tend to re-order these completions?
Maybe.
It maintains the list of to-be-completed SRBs. ScsiPortNotification(RequestComplete) adds to this list and does nothing more.
The list will be processed when finally quitting the miniport context (the KeSynchronizeExecution callback or ISR) and the SRBs from
this list are really completed one by one (this involves IoCompleteRequest and LUN/adapter queue management) from DpcForIsr/timer
DPC contexts.
Max
You are currently subscribed to ntdev as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com