From cd9ee63a36812856e8bf546e6cd82ba13152afd9 Mon Sep 17 00:00:00 2001
From: Sebastian Andrzej Siewior <>
Date: Wed, 30 Mar 2016 13:36:29 +0200
Subject: [PATCH 108/158] net: dev: always take qdisc's busylock in

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 <>
Signed-off-by: Thomas Gleixner <>
 net/core/dev.c | 4 ++++
 1 file changed, 4 insertions(+)

Index: linux-5.15.19-rt29/net/core/dev.c
@ linux-5.15.19-rt29/net/core/dev.c:3836 @ no_lock_out:
 	 * This permits qdisc->running owner to get the lock more
 	 * often and dequeue packets faster.
+	contended = true;
 	contended = qdisc_is_running(q);
 	if (unlikely(contended))