Hi everybody,
I’m working in a PCI device driver with interrupts
with Windows NT 4.
I have a CustomDpc routine that signals an event that
is visible from user-mode, indicating a interrupt have
arrived.
If the system is loaded with many applications, the
user-mode thread don’t receive all the interrupts (it
don’t clean the event as fast as the interrupt are
arriving)
And there are DPC lost in the KeInsertQueueDPC call
too.
For that reason, I want to create a custom DPC’s
queue.
Each DPC wait until the event is nonsignaled state to
run.
This is possible?
What is the better way to do that?
Thanks in advance.
Pablo Negri.
Do You Yahoo!?
Obtenga su dirección de correo-e gratis @yahoo.com
en http://correo.espanol.yahoo.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
Pablo:
Instead of a simple event, try a (counting) semaphore. Every time the
application
returns from WaitForSingleObject the semaphore is decremented. Every time
your DPC signals the semaphore the count is incremented. That will keep
track of
how many events you need to process.
If the interrupt is going so fast that even the DPC is overrun, keep a
counter in extension memory
and, using interlocked calls, when the DPC is processed signal your
semaphore by the number of counts
present in that counter. So you increment that counter in your interrupt
code and you
reset it to zero in your DPC after reading it in an interlocked call. The
reading is then used to signal the
semaphore by that increment.
George
At 09:08 AM 2/14/01 -0600, you wrote:
Hi everybody,
I’m working in a PCI device driver with interrupts
with Windows NT 4.
I have a CustomDpc routine that signals an event that
is visible from user-mode, indicating a interrupt have
arrived.
If the system is loaded with many applications, the
user-mode thread don’t receive all the interrupts (it
don’t clean the event as fast as the interrupt are
arriving)
And there are DPC lost in the KeInsertQueueDPC call
too.
For that reason, I want to create a custom DPC’s
queue.
Each DPC wait until the event is nonsignaled state to
run.
This is possible?
What is the better way to do that?
Thanks in advance.
Pablo Negri.
Do You Yahoo!?
Obtenga su direcci?n de correo-e gratis @yahoo.com
en http://correo.espanol.yahoo.com
You are currently subscribed to ntdev as: xxxxx@brd.com
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com
George Blat
BRD Corp
8016 188th SW, Edmonds, WA 98026
phone: 425-775-7475
fax: 781-998-5940
mailto:xxxxx@brd.com
http://www.brd.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
Look at the Viscarola and Mason book. They have an example of a PCI
BusMaster device that illustrates the kind of queuing you are talking about.
Gary G. Little
Sr. Staff Engineer
Broadband Storage, LLC
xxxxx@broadstor.com
xxxxx@delphieng.com
-----Original Message-----
From: Pablo Negri [mailto:xxxxx@yahoo.com]
Sent: Wednesday, February 14, 2001 7:09 AM
To: NT Developers Interest List
Subject: [ntdev] Custom DPC’s queue.
Hi everybody,
I’m working in a PCI device driver with interrupts
with Windows NT 4.
I have a CustomDpc routine that signals an event that
is visible from user-mode, indicating a interrupt have
arrived.
If the system is loaded with many applications, the
user-mode thread don’t receive all the interrupts (it
don’t clean the event as fast as the interrupt are
arriving)
And there are DPC lost in the KeInsertQueueDPC call
too.
For that reason, I want to create a custom DPC’s
queue.
Each DPC wait until the event is nonsignaled state to
run.
This is possible?
What is the better way to do that?
Thanks in advance.
Pablo Negri.
Do You Yahoo!?
Obtenga su direcci?n de correo-e gratis @yahoo.com
en http://correo.espanol.yahoo.com
You are currently subscribed to ntdev as: xxxxx@delphieng.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
Pablo:
Lookup InterlockedIncrement and InterlockedDecrement in the DDK docs.
Do not use the variants ExInterlocked… because those require a spin lock and
are therefore not useful in an interrupt service routine.
InterlockedIncrement and InterlockedDecrement are so-called atomic calls,
so they
cannot interfere with other threads or an interrupt happening while the
increment or
decrement is being processed.
Mucha suerte con tus drivers.
George
At 11:51 AM 2/20/01 -0600, you wrote:
Dear George,
I’d like your idea.
I’m trying it.
But I have one question:
What is a interlocked call?
(I’m new developping NT drivers)
Thanks in advance.
— Lyris ListManager
>escribi?: > Re: your command request
> > > get ntdev 8493 8508
> >
> > Here is the text of Message 8493:
> >
> > Date: Wed, 14 Feb 2001 08:41:39 -0800
> > From: George Blat
> > Subject: Re: Custom DPC’s queue.
> >
> > Pablo:
> >
> > Instead of a simple event, try a (counting)
> > semaphore. Every time the
> > application
> > returns from WaitForSingleObject the semaphore is
> > decremented. Every time
> > your DPC signals the semaphore the count is
> > incremented. That will keep
> > track of
> > how many events you need to process.
> >
> > If the interrupt is going so fast that even the DPC
> > is overrun, keep a
> > counter in extension memory
> > and, using interlocked calls, when the DPC is
> > processed signal your
> > semaphore by the number of counts
> > present in that counter. So you increment that
> > counter in your interrupt
> > code and you
> > reset it to zero in your DPC after reading it in an
> > interlocked call. The
> > reading is then used to signal the
> > semaphore by that increment.
> >
> > George
> >
> >
> >
>
>
> _________________________________________________________
>Do You Yahoo!?
>Obtenga su direcci?n de correo-e gratis @yahoo.com
>en http://correo.espanol.yahoo.com
-------------------------------------------
George Blat
BRD Corp
8016 188th SW, Edmonds, WA 98026
phone: 425-775-7475
fax: 781-998-5940
mailto:xxxxx@brd.com
http://www.brd.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