summaryrefslogtreecommitdiffstats
path: root/debian/patches-rt/0197-net-Use-skbufhead-with-raw-lock.patch
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-08 03:43:38 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-08 03:43:38 +0000
commit1ff870768c5cacf4bdc05cce822ac61837666b0f (patch)
tree94a1b1fd6d42485c062620781ed0ac16e05bf60c /debian/patches-rt/0197-net-Use-skbufhead-with-raw-lock.patch
parentMerging upstream version 4.19.269. (diff)
downloadlinux-1ff870768c5cacf4bdc05cce822ac61837666b0f.tar.xz
linux-1ff870768c5cacf4bdc05cce822ac61837666b0f.zip
Adding debian version 4.19.269-1.debian/4.19.269-1
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'debian/patches-rt/0197-net-Use-skbufhead-with-raw-lock.patch')
-rw-r--r--debian/patches-rt/0197-net-Use-skbufhead-with-raw-lock.patch23
1 files changed, 14 insertions, 9 deletions
diff --git a/debian/patches-rt/0197-net-Use-skbufhead-with-raw-lock.patch b/debian/patches-rt/0197-net-Use-skbufhead-with-raw-lock.patch
index 4625d57cb..b107d36b4 100644
--- a/debian/patches-rt/0197-net-Use-skbufhead-with-raw-lock.patch
+++ b/debian/patches-rt/0197-net-Use-skbufhead-with-raw-lock.patch
@@ -1,20 +1,21 @@
From: Thomas Gleixner <tglx@linutronix.de>
Date: Tue, 12 Jul 2011 15:38:34 +0200
-Subject: [PATCH 197/342] net: Use skbufhead with raw lock
-Origin: https://git.kernel.org/cgit/linux/kernel/git/rt/linux-stable-rt.git/commit?id=f524a61883a8ae93a669bc5d257d7bd5ecb25b4f
+Subject: [PATCH 197/351] net: Use skbufhead with raw lock
+Origin: https://git.kernel.org/cgit/linux/kernel/git/rt/linux-stable-rt.git/commit?id=619cb3448d91f55316735c1ca4725b7d8b3d73e3
Use the rps lock as rawlock so we can keep irq-off regions. It looks low
latency. However we can't kfree() from this context therefore we defer this
to the softirq and use the tofree_queue list for it (similar to process_queue).
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
-[bwh: Adjust context to apply on top of 4.19.257]
---
include/linux/netdevice.h | 1 +
include/linux/skbuff.h | 7 +++++++
net/core/dev.c | 26 ++++++++++++++++++++------
3 files changed, 28 insertions(+), 6 deletions(-)
+diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h
+index 8d48b352ee74..d893dc112afc 100644
--- a/include/linux/netdevice.h
+++ b/include/linux/netdevice.h
@@ -2990,6 +2990,7 @@ struct softnet_data {
@@ -25,6 +26,8 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
};
+diff --git a/include/linux/skbuff.h b/include/linux/skbuff.h
+index f97734f34746..3ede4f0eac10 100644
--- a/include/linux/skbuff.h
+++ b/include/linux/skbuff.h
@@ -287,6 +287,7 @@ struct sk_buff_head {
@@ -35,7 +38,7 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
};
struct sk_buff;
-@@ -1735,6 +1736,12 @@ static inline void skb_queue_head_init(s
+@@ -1735,6 +1736,12 @@ static inline void skb_queue_head_init(struct sk_buff_head *list)
__skb_queue_head_init(list);
}
@@ -48,9 +51,11 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
static inline void skb_queue_head_init_class(struct sk_buff_head *list,
struct lock_class_key *class)
{
+diff --git a/net/core/dev.c b/net/core/dev.c
+index add05f74ba38..8ea1c7347987 100644
--- a/net/core/dev.c
+++ b/net/core/dev.c
-@@ -219,14 +219,14 @@ static inline struct hlist_head *dev_ind
+@@ -219,14 +219,14 @@ static inline struct hlist_head *dev_index_hash(struct net *net, int ifindex)
static inline void rps_lock(struct softnet_data *sd)
{
#ifdef CONFIG_RPS
@@ -67,7 +72,7 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
#endif
}
-@@ -5858,7 +5858,9 @@ static int process_backlog(struct napi_s
+@@ -5858,7 +5858,9 @@ static int process_backlog(struct napi_struct *napi, int quota)
while (again) {
struct sk_buff *skb;
@@ -77,7 +82,7 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
rcu_read_lock();
__netif_receive_skb(skb);
rcu_read_unlock();
-@@ -5866,9 +5868,9 @@ static int process_backlog(struct napi_s
+@@ -5866,9 +5868,9 @@ static int process_backlog(struct napi_struct *napi, int quota)
if (++work >= quota)
return work;
@@ -88,7 +93,7 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
rps_lock(sd);
if (skb_queue_empty(&sd->input_pkt_queue)) {
/*
-@@ -6341,13 +6343,21 @@ static __latent_entropy void net_rx_acti
+@@ -6341,13 +6343,21 @@ static __latent_entropy void net_rx_action(struct softirq_action *h)
unsigned long time_limit = jiffies +
usecs_to_jiffies(READ_ONCE(netdev_budget_usecs));
int budget = READ_ONCE(netdev_budget);
@@ -110,7 +115,7 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
for (;;) {
struct napi_struct *n;
-@@ -9545,10 +9555,13 @@ static int dev_cpu_dead(unsigned int old
+@@ -9545,10 +9555,13 @@ static int dev_cpu_dead(unsigned int oldcpu)
netif_rx_ni(skb);
input_queue_head_incr(oldsd);
}