diff options
| author | Kuniyuki Iwashima <kuniyu@google.com> | 2026-02-23 23:07:18 +0000 |
|---|---|---|
| committer | Jakub Kicinski <kuba@kernel.org> | 2026-02-24 18:13:38 -0800 |
| commit | fc1f97929ada9e923c3b0c70a999469eeb0b9f94 (patch) | |
| tree | d705307ad022db5c20108d09f12b7b91c5465b1d /tools/testing/vma/include/git@git.tavy.me:linux.git | |
| parent | 64db5933c7adcdc4dd8f5ef6506cc998ecbe63ac (diff) | |
bonding: Optimise is_netpoll_tx_blocked().
bond_start_xmit() spends some cycles in is_netpoll_tx_blocked():
if (unlikely(is_netpoll_tx_blocked(dev)))
return NETDEV_TX_BUSY;
because of the "pushf;pop reg" sequence (aka irqs_disabled()).
Let's swap the conditions in is_netpoll_tx_blocked() and
convert netpoll_block_tx to a static key.
Before:
1.23 │ mov %gs:0x28,%rax
1.24 │ mov %rax,0x18(%rsp)
29.45 │ pushfq
0.50 │ pop %rax
0.47 │ test $0x200,%eax
│ ↓ je 1b4
0.49 │ 32: lea 0x980(%rsi),%rbx
After:
0.72 │ mov %gs:0x28,%rax
0.81 │ mov %rax,0x18(%rsp)
0.82 │ nop
2.77 │ 2a: lea 0x980(%rsi),%rbx
Suggested-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: Kuniyuki Iwashima <kuniyu@google.com>
Reviewed-by: Eric Dumazet <edumazet@google.com>
Link: https://patch.msgid.link/20260223230749.2376145-1-kuniyu@google.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'tools/testing/vma/include/git@git.tavy.me:linux.git')
0 files changed, 0 insertions, 0 deletions
