Interrupt Problem in multiprocessor platfom

Hi All,

I am developing a PCI driver for Windows 2003.

Its working fine in uniprocessor mode. There is no
problem in ISR processing.

But when I am running the driver on multiprocessor
platform, after some time I am losing interrupts. This
is happening when the driver gets the interrupts at
the same time. Because of that only one DPC object has
been inserted in the DPC queue instead of two. So that
I am losing one DPC object and so that interrupt. I
am using KeInsertQueueDpc to insert the DPC object
in the queue.

When I see the DDK docs, It has been specified to use
KeAcquireInterruptSpinLock and KeSynchronizeExecution
to serialize the interrupt handling in ISRs. But both
of them failed. When I used, I am getting the blue
screen of message with 0xF (SPIN_LOCK_ALREADY_OWNED).

Can anybody please tell me some way of how I can
synchronize the ISRs in SMP platforms?

Thanks,
Sundar


Do you Yahoo!?
Win a $20,000 Career Makeover at Yahoo! HotJobs
http://hotjobs.sweepstakes.yahoo.com/careermakeover

You may have 2 options:

  1. one DPC for each interrupt source, the DPC only acks/serves the interrupt
    source it manages.
  2. one DPC handles all interrupt sources, the DPC acks/servers all interrupt
    sources.

Good luck,
Calvin

Calvin Guan Software Engineer
ATI Technologies Inc. www.ati.com

-----Original Message-----
From: sundarapandian durairaj [mailto:xxxxx@yahoo.com]
Sent: Tuesday, April 27, 2004 12:49 PM
To: Windows System Software Devs Interest List
Subject: [ntdev] Interrupt Problem in multiprocessor platfom

Hi All,

I am developing a PCI driver for Windows 2003.

Its working fine in uniprocessor mode. There is no
problem in ISR processing.

But when I am running the driver on multiprocessor
platform, after some time I am losing interrupts. This
is happening when the driver gets the interrupts at
the same time. Because of that only one DPC object has
been inserted in the DPC queue instead of two. So that
I am losing one DPC object and so that interrupt. I
am using KeInsertQueueDpc to insert the DPC object
in the queue.

When I see the DDK docs, It has been specified to use
KeAcquireInterruptSpinLock and KeSynchronizeExecution
to serialize the interrupt handling in ISRs. But both
of them failed. When I used, I am getting the blue
screen of message with 0xF (SPIN_LOCK_ALREADY_OWNED).

Can anybody please tell me some way of how I can
synchronize the ISRs in SMP platforms?

Thanks,
Sundar


Do you Yahoo!?
Win a $20,000 Career Makeover at Yahoo! HotJobs
http://hotjobs.sweepstakes.yahoo.com/careermakeover


Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256

You are currently subscribed to ntdev as: xxxxx@ati.com
To unsubscribe send a blank email to xxxxx@lists.osr.com

> But when I am running the driver on multiprocessor

platform, after some time I am losing interrupts. This

Losing interrupts is normal. Interrupt is not a “token” or “coin”, it is the
condition pending.

You must only be able to catch the moment when the condition starts to be on.
This works OK in your case. So, no problems.

is happening when the driver gets the interrupts at
the same time. Because of that only one DPC object has
been inserted in the DPC queue instead of two.

Correct. There must be 1 DPC object for this scenario.

Such a DPC must analyze the “interrupt status” register of the device to see
whether there are unhandled conditions yet - and handle them. After it will
handle them all, the hardware will deassert the interrupt, and the DPC will
quit.

Maxim Shatskih, Windows DDK MVP
StorageCraft Corporation
xxxxx@storagecraft.com
http://www.storagecraft.com