On Fri, 17 Apr 2009, Azeem Khan wrote:
> I see almost 80% spurious interrupts inside the e1000 irq handler 
> (e1000_intr) when receiving frames. NAPI is enabled and functional. 
> Please help me understand why. Here are more details.
> 
> Configuration:
> --------------

> I have a PC with an onboard NVIDIA GbE NIC and a Intel 82540EM NIC in a 
> PCI slot. Coincidentally, both of them are sharing IRQ 11. I am using 
> ver 6.3.9 of the e1000 driver. The NVIDIA driver is not NAPI enabled 
> afaik. Linux kernel version 2.6.16.13. Processor is AMD Opteron @ 2GHz. 
> IP Forwarding is enabled.
> 
> 
> Execution:
> ------------
> 
> For performance analysis, I send small packets (64 bytes) at rates of 
> 200Kpps into the Intel NIC which is routed through the NVIDIA NIC to the 
> other network. What I observe is that for 3 million packets, about 1.1 
> million interrupts are being handled by e1000_intr(). Deeper analysis (I 
> added some code) shows that about 22% of these are the timer RXT0 

RXT0 is actually the receive interrupt too.  For this workload (and 
especially if you have only one cpu) you definitely want NAPI enabled on 
both ports if at all possible.

> interrupts. The remainder are not destined for the Intel NIC (since the 
> icr variable set earlier in e1000_intr() contains the value 0x0). To 
> confirm, I added a counter which shows that 78% of the times, 
> e1000_intr() returns IRQ_NONE i.e. the interrupt register does not have 
> any bits set at all.

that means there is no work to do for the e1000 NIC.
 
> How can this be? I mean, where are all these interrupts coming from? And 
> why is the e1000 driver being asked to handle the interrupt when no bits 
> in the register are set? This is seriously affecting peak packet 
> throughput of my router. So please help me out.

This is the correct behavior when you're sharing interrupts.  All the 
extra interrupts are coming from the nvidia port (transmitting?).  
Sharing an interrupt means that both interrupt handlers have to be called 
for each shared interrupt.  Sharing interrupts is NOT good for 
performance, as you've found.
 
The best solution is to either physically move the e1000 to another pci 
slot, or use the bios to change it to its own interrupt vector. or move 
the nvidia to its own interrupt vector, that would work too.

hope this helps,
  Jesse

------------------------------------------------------------------------------
Stay on top of everything new and different, both inside and 
around Java (TM) technology - register by April 22, and save
$200 on the JavaOne (SM) conference, June 2-5, 2009, San Francisco.
300 plus technical and hands-on sessions. Register today. 
Use priority code J9JMT32. http://p.sf.net/sfu/p
_______________________________________________
E1000-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/e1000-devel

Reply via email to