Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1441590

[PATCH RT 03/14] net: dev: always take qdiscs busylock in __dev_xmit_skb()

From Steven Rostedt <rostedt@goodmis.org>
Newsgroups linux.kernel
Subject [PATCH RT 03/14] net: dev: always take qdiscs busylock in __dev_xmit_skb()
Date 2016-07-12 19:00 +0200
Message-ID <rU9co-7AG-81@gated-at.bofh.it> (permalink)
References <rU92F-7wG-3@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


3.14.72-rt76-rc1 stable review patch.
If anyone has any objections, please let me know.

------------------

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: Steven Rostedt <rostedt@goodmis.org>
---
 net/core/dev.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/net/core/dev.c b/net/core/dev.c
index 4259edb6d29b..0a680b4adf35 100644
--- a/net/core/dev.c
+++ b/net/core/dev.c
@@ -2720,7 +2720,11 @@ static inline int __dev_xmit_skb(struct sk_buff *skb, struct Qdisc *q,
 	 * This permits __QDISC_STATE_RUNNING owner to get the lock more often
 	 * and dequeue packets faster.
 	 */
+#ifdef CONFIG_PREEMPT_RT_FULL
+	contended = true;
+#else
 	contended = qdisc_is_running(q);
+#endif
 	if (unlikely(contended))
 		spin_lock(&q->busylock);
 
-- 
2.8.1

Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH RT 00/14] Linux 3.14.72-rt76-rc1 Steven Rostedt <rostedt@goodmis.org> - 2016-07-12 19:00 +0200
  [PATCH RT 14/14] Linux 3.14.72-rt76-rc1 Steven Rostedt <rostedt@goodmis.org> - 2016-07-12 19:00 +0200
  [PATCH RT 11/14] mm: perform lru_add_drain_all() remotely Steven Rostedt <rostedt@goodmis.org> - 2016-07-12 19:00 +0200
  [PATCH RT 10/14] locallock: add local_lock_on() Steven Rostedt <rostedt@goodmis.org> - 2016-07-12 19:00 +0200
  [PATCH RT 07/14] sched,preempt: Fix preempt_count manipulations Steven Rostedt <rostedt@goodmis.org> - 2016-07-12 19:00 +0200
  [PATCH RT 09/14] arm: lazy preempt: correct resched condition Steven Rostedt <rostedt@goodmis.org> - 2016-07-12 19:00 +0200
  [PATCH RT 08/14] kernel/printk: Dont try to print from IRQ/NMI region Steven Rostedt <rostedt@goodmis.org> - 2016-07-12 19:00 +0200
  [PATCH RT 04/14] list_bl: fixup bogus lockdep warning Steven Rostedt <rostedt@goodmis.org> - 2016-07-12 19:00 +0200
  [PATCH RT 03/14] net: dev: always take qdiscs busylock in __dev_xmit_skb() Steven Rostedt <rostedt@goodmis.org> - 2016-07-12 19:00 +0200
  Linux 3.14.72-rt76-rc2 Steven Rostedt <rostedt@goodmis.org> - 2016-07-13 01:30 +0200

csiph-web