]> www.infradead.org Git - users/jedix/linux-maple.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)
committerJoe Jin <joe.jin@oracle.com>
Wed, 29 Aug 2012 00:22:21 +0000 (08:22 +0800)
commiteb8af00704c5225d855024380b49300914688ed6
tree0491d661d4fd5da6736eb83876b803f498f4fbad
parent536b6bb53746da4da63ba574ed0602fbe1bf2fab
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.

(cherry picked from commit 7dbb491878a2c51d372a8890fa45a8ff80358af1)
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>
Signed-off-by: Joe Jin <joe.jin@oracle.com>
drivers/net/r8169.c