Re: [NTDEV] Queue Management

Phil,

I wrote my own function for mid-queue removal since my queue management
routines exist in a driver that does not have access to the interrupt
object, and giving it access to that object would have added complexity that
an interlocked function would remove. Besides, the first 15 years of my
career was spent wallowing in machine code and I enjoyed the brief excursion
into machine language.

Peter,

Sometimes you walk into things with a pre-conceived notion. I read your post
a dozen times while I penned a poignant epistle pointing out piquant points
of error … then realized you were actually supportive.

“Down boy”.

If I understood your earlier post correctly, the development team does not
want to provide such a function because it could to easily be abused. I
submit, however, that NOT providing such functionality encourages worse
abuse … such as a third party developer having to do an end-run into
assembly to provide their own function. At least they could properly export
the acquisition/release of the interrupt spinlock without having to use
KeSynchronizeExcution. Elyas pointed out that I could use
KeAcquireSpinLockRaiseToSynch, which I did try early on, but that little
beastie ain’t exported.

Gary G. Little
Staff Engineer
Broadband Storage, Inc.
xxxxx@broadstor.com

-----Original Message-----
From: Barila, Phil [mailto:xxxxx@intel.com]
Sent: Thursday, July 26, 2001 8:15 AM
To: NT Developers Interest List
Subject: [ntdev] Re: [NTDEV] Queue Management

Thanks for reducing my ignorance. In the future, I might want something
like that.

Phil

-----Original Message-----
From: PeterGV [mailto:xxxxx@osr.com]
Sent: Thursday, July 26, 2001 2:19 AM
To: NT Developers Interest List
Subject: [ntdev] Re: [NTDEV] Queue Management

“Barila, Phil” wrote in message news:xxxxx@ntdev…
>
> OK, I’ll display my ignorance for all to see. I don’t deal with
interlocked
> lists in my environment, so I don’t have a lot of reason to think about
> them. But I am curious to know how you can be bullet-proof sure that you
> have a valid pointer to an arbitrary element in the list without having
> traversed it.
>

Take the simple case of a storage driver that does tagged queuing: An IRP
arrives, you put the IRP on the interlocked “in progress” list, using
ExInterlockedInsertTailList. You make the I/O request represented by the
IRP active on the hardware, and give the hardware a context “tag” to
identify the request back to you when its finished. The “tag” is a pointer
to the IRP.

Your device interrupts, and gives you the tag of the entry that was
completed (any one of the many requests that are in progress). You call the
now non existant ExInterlockedRemoveEntryList(). You then take the IRP
(removed from the “in progress” list) and put it on the done list, and queue
your DPCforIsr.

So, instead of using an interlocked list, now you guard the list with the
interrupt spinlock. Oh well…

Peter


You are currently subscribed to ntdev as: xxxxx@intel.com
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com


You are currently subscribed to ntdev as: xxxxx@broadstor.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