Files
linux/include/net
Kuniyuki Iwashima fc1f97929a 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>
2026-02-24 18:13:38 -08:00
..
2025-11-03 16:49:53 +09:00
2024-10-08 15:33:49 -07:00
2025-09-02 15:52:24 -07:00
2025-04-24 17:03:45 -07:00
2025-07-08 18:05:25 -07:00
2026-01-27 10:45:38 +01:00
2022-08-09 22:14:02 -07:00
2024-05-08 10:35:09 +01:00
2024-08-26 09:37:23 -07:00
2024-11-13 18:49:50 -08:00
2024-08-26 09:37:23 -07:00
2025-08-26 17:34:31 -07:00
2025-09-03 15:16:49 -07:00
2026-01-21 19:28:32 -08:00
2024-05-07 01:35:55 +02:00
2026-01-13 10:12:11 +01:00
2024-08-26 09:37:23 -07:00
2025-09-22 11:38:43 -07:00
2025-08-26 17:34:31 -07:00
2024-12-06 17:43:08 -08:00
2021-10-13 09:40:46 -07:00
2024-08-26 09:37:23 -07:00
2025-04-15 08:21:46 -07:00
2023-07-14 20:39:30 -07:00
2025-09-18 12:32:06 +02:00
2024-08-26 09:37:23 -07:00
2024-08-26 09:37:23 -07:00
2025-09-03 15:08:20 -07:00
2025-04-11 18:58:10 -07:00
2025-07-04 09:32:35 +02:00
2025-04-11 18:58:10 -07:00
2024-05-30 18:29:38 -07:00
2025-09-08 18:06:21 -07:00
2026-02-24 16:30:33 -08:00
2023-10-04 11:49:20 -07:00
2026-02-24 17:16:09 -08:00
2025-07-11 11:00:57 -07:00
2023-07-28 14:07:59 -07:00
2022-12-12 15:04:39 -08:00
2026-01-06 17:06:03 -08:00
2023-09-14 16:16:36 +02:00
2026-02-10 20:21:48 -08:00