]> git.baikalelectronics.ru Git - kernel.git/commit
net: call skb_defer_free_flush() before each napi_poll()
authorEric Dumazet <edumazet@google.com>
Mon, 16 May 2022 04:24:56 +0000 (21:24 -0700)
committerDavid S. Miller <davem@davemloft.net>
Mon, 16 May 2022 10:33:59 +0000 (11:33 +0100)
commit1acd1f9832c2e3640f181705476cf6d61339f0c7
treed5be1a42e32e55e228aeee48bc252b5fa2db4d8b
parent5bb4acc2fa9fcd7a6cb19eada861e2db20659d53
net: call skb_defer_free_flush() before each napi_poll()

skb_defer_free_flush() can consume cpu cycles,
it seems better to call it in the inner loop:

- Potentially frees page/skb that will be reallocated while hot.

- Account for the cpu cycles in the @time_limit determination.

- Keep softnet_data.defer_count small to reduce chances for
  skb_attempt_defer_free() to send an IPI.

Signed-off-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/core/dev.c