]> git.baikalelectronics.ru Git - kernel.git/commit
net: dev: Always serialize on Qdisc::busylock in __dev_xmit_skb() on PREEMPT_RT.
authorSebastian Andrzej Siewior <bigeasy@linutronix.de>
Mon, 13 Dec 2021 10:53:29 +0000 (11:53 +0100)
committerDavid S. Miller <davem@davemloft.net>
Mon, 13 Dec 2021 14:57:03 +0000 (14:57 +0000)
commitb5c2bda5e032b2502bfe9f2350e9fc080eb068e0
tree16dda030b630cf2f363e0ab71e08322f6a994393
parente98aa8fbf792a4ad93e156b32dd5bc809e867385
net: dev: Always serialize on Qdisc::busylock in __dev_xmit_skb() on PREEMPT_RT.

The root-lock is dropped before dev_hard_start_xmit() is invoked and after
setting the __QDISC___STATE_RUNNING bit. If the Qdisc owner is preempted
by another sender/task with a higher priority then this new sender 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 Qdisc owner
is scheduled again and finishes the job.

By serializing every task on the ->busylock then the task will be
preempted by a sender only after the Qdisc has no owner.

Always serialize on the busylock on PREEMPT_RT.

Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/core/dev.c