]> git.baikalelectronics.ru Git - kernel.git/commit
r8169: avoid NAPI scheduling delay.
authorfrançois romieu <romieu@fr.zoreil.com>
Sat, 9 Jun 2012 10:53:16 +0000 (10:53 +0000)
committerDavid S. Miller <davem@davemloft.net>
Mon, 11 Jun 2012 03:21:07 +0000 (20:21 -0700)
commit761b816e567e403e7c327d7eec41e6ecd270af51
tree53ebf669c4011bdd9b1494cc1f767f7fe9fce02f
parent5097fd0ba5246f0a182727b3517602d44fd514aa
r8169: avoid NAPI scheduling delay.

While reworking the r8169 driver a few months ago to perform the
smallest amount of work in the irq handler, I took care of avoiding
any irq mask register operation in the slow work dedicated user
context thread. The slow work thread scheduled an extra round of NAPI
work which would ultimately set the irq mask register as required,
thus keeping such irq mask operations in the NAPI handler.
It would eventually race with the irq handler and delay NAPI execution
for - assuming no further irq - a whole ksoftirqd period. Mildly a
problem for rare link changes or corner case PCI events.

The race was always lost after the last bh disabling lock had been
removed from the work thread and people started wondering where those
pesky "NOHZ: local_softirq_pending 08" messages came from.

Actually the irq mask register _can_ be set up directly in the slow
work thread.

Signed-off-by: Francois Romieu <romieu@fr.zoreil.com>
Reported-by: Dave Jones <davej@redhat.com>
Tested-by: Marc Dionne <marc.c.dionne@gmail.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Hayes Wang <hayeswang@realtek.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/realtek/r8169.c