diff options
author | Timo Teräs <timo.teras@iki.fi> | 2013-01-11 21:03:19 +0200 |
---|---|---|
committer | Timo Teräs <timo.teras@iki.fi> | 2013-01-11 21:08:16 +0200 |
commit | 1696949be1f50d49f5798a6105c348f785f01acc (patch) | |
tree | e5cd4b705fbb231835904dc2a20c63d4842319b4 | |
parent | 8b8a5b25699ecf5b3997b66e06473b660cd1d407 (diff) | |
download | aports-1696949be1f50d49f5798a6105c348f785f01acc.tar.bz2 aports-1696949be1f50d49f5798a6105c348f785f01acc.tar.xz |
main/linux-grsec: additional r8169 fix cherry-picked from upstream
-rw-r--r-- | main/linux-grsec/0001-r8169-avoid-NAPI-scheduling-delay.patch | 52 | ||||
-rw-r--r-- | main/linux-grsec/APKBUILD | 5 |
2 files changed, 56 insertions, 1 deletions
diff --git a/main/linux-grsec/0001-r8169-avoid-NAPI-scheduling-delay.patch b/main/linux-grsec/0001-r8169-avoid-NAPI-scheduling-delay.patch new file mode 100644 index 0000000000..a06c4c03f1 --- /dev/null +++ b/main/linux-grsec/0001-r8169-avoid-NAPI-scheduling-delay.patch @@ -0,0 +1,52 @@ +From 7dbb491878a2c51d372a8890fa45a8ff80358af1 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?fran=C3=A7ois=20romieu?= <romieu@fr.zoreil.com> +Date: Sat, 9 Jun 2012 10:53:16 +0000 +Subject: [PATCH] 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 | 6 +----- + 1 file changed, 1 insertion(+), 5 deletions(-) + +diff --git a/drivers/net/ethernet/realtek/r8169.c b/drivers/net/ethernet/realtek/r8169.c +index 9757ce3..7260aa7 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) + if (status & LinkChg) + __rtl8169_check_link_status(dev, tp, tp->mmio_addr, true); + +- napi_disable(&tp->napi); +- rtl_irq_disable(tp); +- +- napi_enable(&tp->napi); +- napi_schedule(&tp->napi); ++ rtl_irq_enable_all(tp); + } + + static void rtl_task(struct work_struct *work) +-- +1.8.1 + diff --git a/main/linux-grsec/APKBUILD b/main/linux-grsec/APKBUILD index ee50cd19b9..68db9fbb23 100644 --- a/main/linux-grsec/APKBUILD +++ b/main/linux-grsec/APKBUILD @@ -4,7 +4,7 @@ _flavor=grsec pkgname=linux-${_flavor} pkgver=3.4.24 _kernver=3.4 -pkgrel=1 +pkgrel=2 pkgdesc="Linux kernel with grsecurity" url=http://grsecurity.net depends="mkinitfs linux-firmware" @@ -19,6 +19,8 @@ source="http://ftp.kernel.org/pub/linux/kernel/v3.x/linux-$_kernver.tar.xz 0004-arp-flush-arp-cache-on-device-change.patch 0001-Revert-ipv4-Don-t-use-the-cached-pmtu-informations-f.patch intel_idle.patch + + 0001-r8169-avoid-NAPI-scheduling-delay.patch r8169-num-rx-desc.patch kernelconfig.x86 @@ -147,6 +149,7 @@ f23a2fcf6562f3219e43385c787cff23 grsecurity-2.9.1-3.4.24-0.patch 776adeeb5272093574f8836c5037dd7d 0004-arp-flush-arp-cache-on-device-change.patch cb6fcd6e966e73c87a839c4c0183f81f 0001-Revert-ipv4-Don-t-use-the-cached-pmtu-informations-f.patch d2f7ba780ff7567c21381428264d7fdd intel_idle.patch +8e5611c6bf3dfb0008d4e58051a8b0ff 0001-r8169-avoid-NAPI-scheduling-delay.patch daf2cbb558588c49c138fe9ca2482b64 r8169-num-rx-desc.patch 50a13359236dbd676fa355f0b4fd27ff kernelconfig.x86 c402f52babc729d1280c1677075aa0d7 kernelconfig.x86_64" |