Commit 229671a
net: remove cpu stall in txq_trans_update()
txq_trans_update() currently uses txq->xmit_lock_owner
to conditionally update txq->trans_start.
For regular devices, txq->xmit_lock_owner is updated
from HARD_TX_LOCK() and HARD_TX_UNLOCK(), and this apparently
causes cpu stalls.
Using dev->lltx, which sits in a read-mostly cache-line,
and already used in HARD_TX_LOCK() and HARD_TX_UNLOCK()
helps cpu prediction.
On an AMD EPYC 7B12 dual socket server, tcp_rr with 128 threads
and 30,000 flows gets a 5 % increase in throughput.
As explained in commit 95ecba6 ("net: fix races in
netdev_tx_sent_queue()/dev_watchdog()") I am planning
to no longer update txq->trans_start in the fast path
in a followup patch.
Signed-off-by: Eric Dumazet <edumazet@google.com>
Link: https://patch.msgid.link/20250408202742.2145516-1-edumazet@google.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>1 parent 9c056ec commit 229671a
File tree
2 files changed
+5
-4
lines changed- drivers/net/ethernet/ti
- include/linux
2 files changed
+5
-4
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
427 | 427 | | |
428 | 428 | | |
429 | 429 | | |
430 | | - | |
| 430 | + | |
431 | 431 | | |
432 | 432 | | |
433 | 433 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4693 | 4693 | | |
4694 | 4694 | | |
4695 | 4695 | | |
4696 | | - | |
| 4696 | + | |
| 4697 | + | |
4697 | 4698 | | |
4698 | | - | |
| 4699 | + | |
4699 | 4700 | | |
4700 | 4701 | | |
4701 | 4702 | | |
| |||
5214 | 5215 | | |
5215 | 5216 | | |
5216 | 5217 | | |
5217 | | - | |
| 5218 | + | |
5218 | 5219 | | |
5219 | 5220 | | |
5220 | 5221 | | |
| |||
0 commit comments