1 From 9c1e14d6451b0f612a36b535a4b18188aa73e469 Mon Sep 17 00:00:00 2001
2 From: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
3 Date: Wed, 30 Mar 2016 13:36:29 +0200
4 Subject: [PATCH 329/365] net: dev: always take qdisc's busylock in
7 The root-lock is dropped before dev_hard_start_xmit() is invoked and after
8 setting the __QDISC___STATE_RUNNING bit. If this task is now pushed away
9 by a task with a higher priority then the task with the higher priority
10 won't be able to submit packets to the NIC directly instead they will be
11 enqueued into the Qdisc. The NIC will remain idle until the task(s) with
12 higher priority leave the CPU and the task with lower priority gets back
15 If we take always the busylock we ensure that the RT task can boost the
16 low-prio task and submit the packet.
18 Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
20 net/core/dev.c | 4 ++++
21 1 file changed, 4 insertions(+)
23 diff --git a/net/core/dev.c b/net/core/dev.c
24 index 14f7b58..a2ddf73 100644
27 @@ -2892,7 +2892,11 @@ static inline int __dev_xmit_skb(struct sk_buff *skb, struct Qdisc *q,
28 * This permits __QDISC___STATE_RUNNING owner to get the lock more
29 * often and dequeue packets faster.
31 +#ifdef CONFIG_PREEMPT_RT_FULL
34 contended = qdisc_is_running(q);
36 if (unlikely(contended))
37 spin_lock(&q->busylock);