RE: e1000: Question about polling

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Brandeburg, Jesse
Date: Wednesday, February 20, 2008 - 1:15 am

Badalian Vyacheslav wrote:
this binds all 217 irq interrupts to cpu 0


do you mean to be balancing interrupts between core 1 and 2 here?
1 = cpu 0
2 = cpu 1
4 = cpu 2
8 = cpu 3

so 1+2 = 3 for irq 218, ie balancing between the two.

sometimes the cpus will have a paired cache, depending on your bios it
will be organized like cpu 0/2 = shared cache, and cput 1/3 = shared
cache.
you can find this out by looking at physical ID and CORE ID in
/proc/cpuinfo


because as each adapter generating interrupts gets rotated through cpu0,
it gets "stuck" on cpu0 because the napi scheduling can only run one at
a time, and so each is always waiting in line behind the other to run
its napi poll, always fills its quota (work_done is always != 0) and
keeps interrupts disabled "forever"


only if your performance is not cache limited but cpu horsepower
limited.  you're sacrificing cache coherency for cpu power, but if that
works for you then great.
 

the patch helps a little because it decreases the amount of time the
driver spends in napi mode, basically shortening the exit condition
(which reenables interrupts, and therefore balancing) to work_done <
budget, not work_done == 0.


you basically can't get much more than one cpu can do for each nic.  its
possible to get a little more, but my guess is you won't get much.  The
best thing you can do is make sure as much traffic as possible stays in
the same cache, on two different cores.

you can try turning off NAPI mode either in the .config, or build the
sourceforge driver with CFLAGS_EXTRA=-DE1000_NO_NAPI,  which seems
counterintuitive, but with the non-napi e1000 pushing packets to the
backlog queue on each cpu, you may actually get better performance due
to the balancing.

some day soon (maybe) we'll have some coherent way to have one tx and rx
interrupt per core, and enough queues for each port to be able to handle
1 queue per core.

good luck,
  Jesse  
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
e1000: Question about polling, Badalian Vyacheslav, (Mon Feb 18, 2:18 am)
Re: e1000: Question about polling, Jarek Poplawski, (Wed Feb 20, 12:50 am)
RE: e1000: Question about polling, Brandeburg, Jesse, (Wed Feb 20, 1:15 am)
Re: e1000: Question about polling, Badalian Vyacheslav, (Wed Feb 20, 2:15 am)
Re: e1000: Question about polling, Badalian Vyacheslav, (Wed Feb 20, 2:25 am)
Re: e1000: Question about polling, Jarek Poplawski, (Wed Feb 20, 2:47 am)
Re: e1000: Question about polling, Badalian Vyacheslav, (Wed Feb 20, 4:54 am)
Re: e1000: Question about polling, Jarek Poplawski, (Wed Feb 20, 5:25 am)