Windows Vista Tips

Windows Vista Tips > Newsgroups > Windows Vista Drivers > Does HWBuildIO need a spinlock?

Reply
Thread Tools Display Modes

Does HWBuildIO need a spinlock?

 
 
RamenWarrior
Guest
Posts: n/a

 
      08-28-2009
I thought that one of the primary benefits of storport drivers was separating
the build process from the submit process. If the build process is really
"safe", it should not need any spinlocks.

We have noticed a degradation in performance when we build out
scatter/gather lists in HWBuildIO. The performance improves when we delay
this part of the I/O build until HWStartIO is called.

Here is a trace showing the spinlock acquired during HWBuildIO:

Here is part of the trace. It seems to show a spinlock being acquired during
BuildIO:

b9b04914 808256e7 nt!KefAcquireSpinLockAtDpcLevel+0x12
b9b04924 bae361a1 nt!KeAcquireInterruptSpinLock+0x1d
b9b04930 bae3732e storport!RaidAdapterAcquireInterruptLock+0x1b
b9b04944 bae3c153 storport!RaidAdapterFindUnit+0x34
b9b04958 b89c13a4 storport!StorPortGetLogicalUnit+0x2f
b9b04998 bae360be MyDriverHWBuildIORoutine
b9b049a8 bae36c8c storport!RaCallMiniportBuildIo+0x24
b9b049cc bae36dad storport!RaidAdapterPostScatterGatherExecute+0x22
b9b049e4 80a5f147 storport!RaidpAdapterContinueScatterGather+0x3f
b9b04a10 bae3a3f0 hal!HalBuildScatterGatherList+0x1c7
b9b04a40 bae36e2d storport!RaidDmaBuildScatterGatherList+0x2c
b9b04a7c bae36e7f storport!RaidAdapterScatterGatherExecute+0x49
b9b04a8c bae41ae0 storport!RaidAdapterExecuteXrb+0x21
b9b04aac bae3b80b storport!RaUnitStartIo+0x98
b9b04ae0 bae40179 storport!RaidStartIoPacket+0x85
b9b04b00 bae42083 storport!RaidUnitSubmitRequest+0x47
b9b04b1c bae3a62e storport!RaUnitScsiIrp+0xc1
b9b04b38 8081df85 storport!RaDriverScsiIrp+0x5c
b9b04b4c bae23607 nt!IofCallDriver+0x45
b9b04b5c bae232b2 CLASSPNP!SubmitTransferPacket+0xbb

Is this the expected behavior of the build I/O process?


 
Reply With Quote
 
 
 
 
Maxim S. Shatskih
Guest
Posts: n/a

 
      08-28-2009
> Is this the expected behavior of the build I/O process?

Probably BuildIo causes degradation if you need to call StorPortGetLogicalUnit from it.

If you not need to do this - then it can probably make things faster.

--
Maxim S. Shatskih
Windows DDK MVP

http://www.storagecraft.com

 
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Spinlock vs Semaphore \ Mutex Jack Huang Windows Vista Drivers 7 08-04-2009 07:24 PM



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59