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 | alpine_aports-1696949be1f50d49f5798a6105c348f785f01acc.tar.bz2 alpine_aports-1696949be1f50d49f5798a6105c348f785f01acc.tar.xz alpine_aports-1696949be1f50d49f5798a6105c348f785f01acc.zip |
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 @@ | |||
1 | From 7dbb491878a2c51d372a8890fa45a8ff80358af1 Mon Sep 17 00:00:00 2001 | ||
2 | From: =?UTF-8?q?fran=C3=A7ois=20romieu?= <romieu@fr.zoreil.com> | ||
3 | Date: Sat, 9 Jun 2012 10:53:16 +0000 | ||
4 | Subject: [PATCH] r8169: avoid NAPI scheduling delay. | ||
5 | |||
6 | While reworking the r8169 driver a few months ago to perform the | ||
7 | smallest amount of work in the irq handler, I took care of avoiding | ||
8 | any irq mask register operation in the slow work dedicated user | ||
9 | context thread. The slow work thread scheduled an extra round of NAPI | ||
10 | work which would ultimately set the irq mask register as required, | ||
11 | thus keeping such irq mask operations in the NAPI handler. | ||
12 | It would eventually race with the irq handler and delay NAPI execution | ||
13 | for - assuming no further irq - a whole ksoftirqd period. Mildly a | ||
14 | problem for rare link changes or corner case PCI events. | ||
15 | |||
16 | The race was always lost after the last bh disabling lock had been | ||
17 | removed from the work thread and people started wondering where those | ||
18 | pesky "NOHZ: local_softirq_pending 08" messages came from. | ||
19 | |||
20 | Actually the irq mask register _can_ be set up directly in the slow | ||
21 | work thread. | ||
22 | |||
23 | Signed-off-by: Francois Romieu <romieu@fr.zoreil.com> | ||
24 | Reported-by: Dave Jones <davej@redhat.com> | ||
25 | Tested-by: Marc Dionne <marc.c.dionne@gmail.com> | ||
26 | Cc: Thomas Gleixner <tglx@linutronix.de> | ||
27 | Cc: Hayes Wang <hayeswang@realtek.com> | ||
28 | Signed-off-by: David S. Miller <davem@davemloft.net> | ||
29 | --- | ||
30 | drivers/net/ethernet/realtek/r8169.c | 6 +----- | ||
31 | 1 file changed, 1 insertion(+), 5 deletions(-) | ||
32 | |||
33 | diff --git a/drivers/net/ethernet/realtek/r8169.c b/drivers/net/ethernet/realtek/r8169.c | ||
34 | index 9757ce3..7260aa7 100644 | ||
35 | --- a/drivers/net/ethernet/realtek/r8169.c | ||
36 | +++ b/drivers/net/ethernet/realtek/r8169.c | ||
37 | @@ -5889,11 +5889,7 @@ static void rtl_slow_event_work(struct rtl8169_private *tp) | ||
38 | if (status & LinkChg) | ||
39 | __rtl8169_check_link_status(dev, tp, tp->mmio_addr, true); | ||
40 | |||
41 | - napi_disable(&tp->napi); | ||
42 | - rtl_irq_disable(tp); | ||
43 | - | ||
44 | - napi_enable(&tp->napi); | ||
45 | - napi_schedule(&tp->napi); | ||
46 | + rtl_irq_enable_all(tp); | ||
47 | } | ||
48 | |||
49 | static void rtl_task(struct work_struct *work) | ||
50 | -- | ||
51 | 1.8.1 | ||
52 | |||
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 | |||
4 | pkgname=linux-${_flavor} | 4 | pkgname=linux-${_flavor} |
5 | pkgver=3.4.24 | 5 | pkgver=3.4.24 |
6 | _kernver=3.4 | 6 | _kernver=3.4 |
7 | pkgrel=1 | 7 | pkgrel=2 |
8 | pkgdesc="Linux kernel with grsecurity" | 8 | pkgdesc="Linux kernel with grsecurity" |
9 | url=http://grsecurity.net | 9 | url=http://grsecurity.net |
10 | depends="mkinitfs linux-firmware" | 10 | depends="mkinitfs linux-firmware" |
@@ -19,6 +19,8 @@ source="http://ftp.kernel.org/pub/linux/kernel/v3.x/linux-$_kernver.tar.xz | |||
19 | 0004-arp-flush-arp-cache-on-device-change.patch | 19 | 0004-arp-flush-arp-cache-on-device-change.patch |
20 | 0001-Revert-ipv4-Don-t-use-the-cached-pmtu-informations-f.patch | 20 | 0001-Revert-ipv4-Don-t-use-the-cached-pmtu-informations-f.patch |
21 | intel_idle.patch | 21 | intel_idle.patch |
22 | |||
23 | 0001-r8169-avoid-NAPI-scheduling-delay.patch | ||
22 | r8169-num-rx-desc.patch | 24 | r8169-num-rx-desc.patch |
23 | 25 | ||
24 | kernelconfig.x86 | 26 | kernelconfig.x86 |
@@ -147,6 +149,7 @@ f23a2fcf6562f3219e43385c787cff23 grsecurity-2.9.1-3.4.24-0.patch | |||
147 | 776adeeb5272093574f8836c5037dd7d 0004-arp-flush-arp-cache-on-device-change.patch | 149 | 776adeeb5272093574f8836c5037dd7d 0004-arp-flush-arp-cache-on-device-change.patch |
148 | cb6fcd6e966e73c87a839c4c0183f81f 0001-Revert-ipv4-Don-t-use-the-cached-pmtu-informations-f.patch | 150 | cb6fcd6e966e73c87a839c4c0183f81f 0001-Revert-ipv4-Don-t-use-the-cached-pmtu-informations-f.patch |
149 | d2f7ba780ff7567c21381428264d7fdd intel_idle.patch | 151 | d2f7ba780ff7567c21381428264d7fdd intel_idle.patch |
152 | 8e5611c6bf3dfb0008d4e58051a8b0ff 0001-r8169-avoid-NAPI-scheduling-delay.patch | ||
150 | daf2cbb558588c49c138fe9ca2482b64 r8169-num-rx-desc.patch | 153 | daf2cbb558588c49c138fe9ca2482b64 r8169-num-rx-desc.patch |
151 | 50a13359236dbd676fa355f0b4fd27ff kernelconfig.x86 | 154 | 50a13359236dbd676fa355f0b4fd27ff kernelconfig.x86 |
152 | c402f52babc729d1280c1677075aa0d7 kernelconfig.x86_64" | 155 | c402f52babc729d1280c1677075aa0d7 kernelconfig.x86_64" |