diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-08 03:21:37 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-08 03:21:37 +0000 |
commit | 06343b27411344fc542f4f3a643f8441aa35252d (patch) | |
tree | 66aa45187c93c350bbdf7e6ae4467a70bf3a8f4c /debian/patches-rt/0230-net-Remove-preemption-disabling-in-netif_rx.patch | |
parent | Merging upstream version 4.19.260. (diff) | |
download | linux-06343b27411344fc542f4f3a643f8441aa35252d.tar.xz linux-06343b27411344fc542f4f3a643f8441aa35252d.zip |
Adding debian version 4.19.260-1.debian/4.19.260-1
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'debian/patches-rt/0230-net-Remove-preemption-disabling-in-netif_rx.patch')
-rw-r--r-- | debian/patches-rt/0230-net-Remove-preemption-disabling-in-netif_rx.patch | 67 |
1 files changed, 67 insertions, 0 deletions
diff --git a/debian/patches-rt/0230-net-Remove-preemption-disabling-in-netif_rx.patch b/debian/patches-rt/0230-net-Remove-preemption-disabling-in-netif_rx.patch new file mode 100644 index 000000000..190c702a6 --- /dev/null +++ b/debian/patches-rt/0230-net-Remove-preemption-disabling-in-netif_rx.patch @@ -0,0 +1,67 @@ +From: Priyanka Jain <Priyanka.Jain@freescale.com> +Date: Thu, 17 May 2012 09:35:11 +0530 +Subject: [PATCH 230/342] net: Remove preemption disabling in netif_rx() +Origin: https://git.kernel.org/cgit/linux/kernel/git/rt/linux-stable-rt.git/commit?id=857d0eea97c02863c4283d4ece826762ed4ae3f3 + +1)enqueue_to_backlog() (called from netif_rx) should be + bind to a particluar CPU. This can be achieved by + disabling migration. No need to disable preemption + +2)Fixes crash "BUG: scheduling while atomic: ksoftirqd" + in case of RT. + If preemption is disabled, enqueue_to_backog() is called + in atomic context. And if backlog exceeds its count, + kfree_skb() is called. But in RT, kfree_skb() might + gets scheduled out, so it expects non atomic context. + +3)When CONFIG_PREEMPT_RT_FULL is not defined, + migrate_enable(), migrate_disable() maps to + preempt_enable() and preempt_disable(), so no + change in functionality in case of non-RT. + +-Replace preempt_enable(), preempt_disable() with + migrate_enable(), migrate_disable() respectively +-Replace get_cpu(), put_cpu() with get_cpu_light(), + put_cpu_light() respectively + +Signed-off-by: Priyanka Jain <Priyanka.Jain@freescale.com> +Acked-by: Rajan Srivastava <Rajan.Srivastava@freescale.com> +Cc: <rostedt@goodmis.orgn> +Link: http://lkml.kernel.org/r/1337227511-2271-1-git-send-email-Priyanka.Jain@freescale.com + +Signed-off-by: Thomas Gleixner <tglx@linutronix.de> +--- + net/core/dev.c | 8 ++++---- + 1 file changed, 4 insertions(+), 4 deletions(-) + +diff --git a/net/core/dev.c b/net/core/dev.c +index e65dc7a7cc13..3df1fe052863 100644 +--- a/net/core/dev.c ++++ b/net/core/dev.c +@@ -4494,7 +4494,7 @@ static int netif_rx_internal(struct sk_buff *skb) + struct rps_dev_flow voidflow, *rflow = &voidflow; + int cpu; + +- preempt_disable(); ++ migrate_disable(); + rcu_read_lock(); + + cpu = get_rps_cpu(skb->dev, skb, &rflow); +@@ -4504,14 +4504,14 @@ static int netif_rx_internal(struct sk_buff *skb) + ret = enqueue_to_backlog(skb, cpu, &rflow->last_qtail); + + rcu_read_unlock(); +- preempt_enable(); ++ migrate_enable(); + } else + #endif + { + unsigned int qtail; + +- ret = enqueue_to_backlog(skb, get_cpu(), &qtail); +- put_cpu(); ++ ret = enqueue_to_backlog(skb, get_cpu_light(), &qtail); ++ put_cpu_light(); + } + return ret; + } |