diff options
author | françois romieu <romieu@fr.zoreil.com> | 2012-06-09 06:53:16 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2012-06-10 23:21:07 -0400 |
commit | 7dbb491878a2c51d372a8890fa45a8ff80358af1 (patch) | |
tree | 53ebf669c4011bdd9b1494cc1f767f7fe9fce02f | |
parent | 8876d6b5f81f4e242a6660da22bbd92f17a8d058 (diff) |
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>
-rw-r--r-- | drivers/net/ethernet/realtek/r8169.c | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/drivers/net/ethernet/realtek/r8169.c b/drivers/net/ethernet/realtek/r8169.c index 9757ce3543a0..7260aa79466a 100644 --- a/drivers/net/ethernet/realtek/r8169.c +++ b/drivers/net/ethernet/realtek/r8169.c | |||
@@ -5889,11 +5889,7 @@ static void rtl_slow_event_work(struct rtl8169_private *tp) | |||
5889 | if (status & LinkChg) | 5889 | if (status & LinkChg) |
5890 | __rtl8169_check_link_status(dev, tp, tp->mmio_addr, true); | 5890 | __rtl8169_check_link_status(dev, tp, tp->mmio_addr, true); |
5891 | 5891 | ||
5892 | napi_disable(&tp->napi); | 5892 | rtl_irq_enable_all(tp); |
5893 | rtl_irq_disable(tp); | ||
5894 | |||
5895 | napi_enable(&tp->napi); | ||
5896 | napi_schedule(&tp->napi); | ||
5897 | } | 5893 | } |
5898 | 5894 | ||
5899 | static void rtl_task(struct work_struct *work) | 5895 | static void rtl_task(struct work_struct *work) |