[PATCH net-next 0/4] tun: optimize SKB allocation with NAPI cache

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Use the per-CPU NAPI cache for SKB allocation, leveraging bulk
allocation since the batch size is known at submission time. This
improves efficiency by reducing allocation overhead, particularly when
using IFF_NAPI and GRO, which can replenish the cache in a tight loop.

Additionally, utilize napi_build_skb and napi_consume_skb to further
benefit from the NAPI cache.

Note: This series does not address the large payload path in
tun_alloc_skb, which spans sock.c and skbuff.c. A separate series will
handle privatizing the allocation code in tun and integrating the NAPI
cache for that path.

Thanks all,
Jon

Jon Kohler (4):
  tun: rcu_deference xdp_prog only once per batch
  tun: optimize skb allocation in tun_xdp_one
  tun: use napi_build_skb in __tun_build_skb
  tun: use napi_consume_skb in tun_do_read

 drivers/net/tun.c | 60 +++++++++++++++++++++++++++++++++--------------
 1 file changed, 42 insertions(+), 18 deletions(-)

-- 
2.43.0





[Index of Archives]     [Linux Samsung SoC]     [Linux Rockchip SoC]     [Linux Actions SoC]     [Linux for Synopsys ARC Processors]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]


  Powered by Linux