Files
linux/include/linux
Jakub Kicinski 301f227fc8 net: piggy back on the memory barrier in bql when waking queues
Drivers call netdev_tx_completed_queue() right before
netif_txq_maybe_wake(). If BQL is enabled netdev_tx_completed_queue()
should issue a memory barrier, so we can depend on that separating
the stop check from the consumer index update, instead of adding
another barrier in netif_txq_maybe_wake().

This matters more than the barriers on the xmit path, because
the wake condition is almost always true. So we issue the
consumer side barrier often.

Wrap netdev_tx_completed_queue() in a local helper to issue
the barrier even if BQL is disabled. Keep the same semantics
as netdev_tx_completed_queue() (barrier only if bytes != 0)
to make it clear that the barrier is conditional.

Plus since macro gets pkt/byte counts as arguments now -
we can skip waking if there were no packets completed.

Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2023-04-10 17:56:18 -07:00
..
2023-02-16 13:42:22 +01:00
2023-02-20 09:20:55 -05:00
2023-02-15 19:38:50 +01:00
2023-03-07 09:33:43 -08:00
2023-03-03 17:42:20 +01:00
2023-02-03 08:20:55 -07:00
2023-03-05 10:49:37 -08:00
2023-01-29 15:18:33 -07:00
2023-01-29 15:18:33 -07:00
2023-02-06 19:06:58 +01:00
2023-03-13 10:14:05 +01:00
2023-03-19 10:02:04 -07:00
2023-02-02 22:33:13 -08:00
2023-03-07 01:50:53 -05:00
2023-02-13 10:11:20 +02:00
2023-03-15 14:58:52 +01:00
2023-02-02 22:33:34 -08:00
2023-02-16 18:10:18 +01:00
2023-02-20 19:26:58 -05:00
2023-03-29 08:19:38 +01:00