summaryrefslogtreecommitdiffstats
path: root/debian/patches-rt/net__dev__always_take_qdiscs_busylock_in___dev_xmit_skb.patch
diff options
context:
space:
mode:
Diffstat (limited to 'debian/patches-rt/net__dev__always_take_qdiscs_busylock_in___dev_xmit_skb.patch')
-rw-r--r--debian/patches-rt/net__dev__always_take_qdiscs_busylock_in___dev_xmit_skb.patch40
1 files changed, 40 insertions, 0 deletions
diff --git a/debian/patches-rt/net__dev__always_take_qdiscs_busylock_in___dev_xmit_skb.patch b/debian/patches-rt/net__dev__always_take_qdiscs_busylock_in___dev_xmit_skb.patch
new file mode 100644
index 000000000..7b4dd8573
--- /dev/null
+++ b/debian/patches-rt/net__dev__always_take_qdiscs_busylock_in___dev_xmit_skb.patch
@@ -0,0 +1,40 @@
+Subject: net: dev: always take qdisc's busylock in __dev_xmit_skb()
+From: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
+Date: Wed Mar 30 13:36:29 2016 +0200
+Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.15/older/patches-5.15.3-rt21.tar.xz
+
+From: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
+
+The root-lock is dropped before dev_hard_start_xmit() is invoked and after
+setting the __QDISC___STATE_RUNNING bit. If this task is now pushed away
+by a task with a higher priority then the task with the higher priority
+won't be able to submit packets to the NIC directly instead they will be
+enqueued into the Qdisc. The NIC will remain idle until the task(s) with
+higher priority leave the CPU and the task with lower priority gets back
+and finishes the job.
+
+If we take always the busylock we ensure that the RT task can boost the
+low-prio task and submit the packet.
+
+Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
+Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
+
+
+---
+ net/core/dev.c | 4 ++++
+ 1 file changed, 4 insertions(+)
+---
+--- a/net/core/dev.c
++++ b/net/core/dev.c
+@@ -3825,7 +3825,11 @@ static inline int __dev_xmit_skb(struct
+ * This permits qdisc->running owner to get the lock more
+ * often and dequeue packets faster.
+ */
++#ifdef CONFIG_PREEMPT_RT
++ contended = true;
++#else
+ contended = qdisc_is_running(q);
++#endif
+ if (unlikely(contended))
+ spin_lock(&q->busylock);
+