![]() ![]() 20 21 Revision History: 22 23 -/ 24 25 include 'classp.h' 26 include 'debug.h' 27 28 ifdef DEBUGUSEWPP 29 include 'lock. ![]() While testing some base functionality of the implemented stack, I noticed that replies to pings would sometimes take noticeably longer than usual. Note that I am not talking about Deadlocks, since KeAcquireSpinLock would always return at some point and the implementation with KeAcquireSpinLockAtDpcLevel uses the same architecture / locking object. 18 19 This module is a driver dll for scsi miniports. KeAcquireSpinLock long execution time Asked 225 times 3 I am currently developing a Windows Kernel Driver that implements its own networking stack. Maybe I have a bug in other sections of the driver? Can someone explain this behavior? ![]() I have searched the internet for similar problems with KeAcquireSpinLock, but it seems like I am alone with this issue. However, it turned out that the runtime issue I had with KeAcquireSpinLock is gone and performance is fine with this approach. I expected the above code to be functionally equivalent to KeAcquireSpinLock. If (oldIrql< DISPATCH_LEVEL) KeLowerIrql(oldIrql) Since I had no clue why KeAcquireSpinLock takes so long, I implemented a different approach with KeAcquireSpinLockAtDpcLevel, manually rising the IRQL if required: oldIrql = KeGetCurrentIrql() Investigating this issue further, I found out that KeAcquireSpinLock sporadically has an execution time of up to 20 ms (instead of few µs), even when the lock is not held by other cores (I confirmed this by printing the lock value before calling KeAcquireSpinLock). KeTryToAcquireQueuedSpinLockRaiseToSynch ( IN KSPINLOCKQUEUENUMBER LockNumber, IN PKIRQL OldIrql) LOGICAL FASTCALL. It doesn’t mean we don’t respect or understand. That doesn’t diminish the work people have poured into it. KeReleaseInStackQueuedSpinLock ( IN PKLOCKQUEUEHANDLE LockHandle) BOOLEAN FASTCALL. ReactOS in its current state isn’t usable for anything outside tinkering. While testing some base functionality of the implemented stack, I noticed that replies to pings would sometimes take noticeably longer than usual. KeReleaseQueuedSpinLock ( IN KSPINLOCKQUEUENUMBER LockNumber, IN KIRQL OldIrql) VOID FASTCALL. I am currently developing a Windows Kernel Driver that implements its own networking stack. ![]()
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |