Re: [PATCH v4 net-next 08/11] skbuff: introduce {,__}napi_build_skb() which reuses NAPI cache heads

2021-02-11 Thread Alexander Lobakin
From: Jesper Dangaard Brouer Date: Thu, 11 Feb 2021 13:54:59 +0100 > On Wed, 10 Feb 2021 16:30:23 + > Alexander Lobakin wrote: > > > Instead of just bulk-flushing skbuff_heads queued up through > > napi_consume_skb() or __kfree_skb_defer(), try to reuse them > > on allocation path. > >

Re: [PATCH v4 net-next 08/11] skbuff: introduce {,__}napi_build_skb() which reuses NAPI cache heads

2021-02-11 Thread Jesper Dangaard Brouer
On Wed, 10 Feb 2021 16:30:23 + Alexander Lobakin wrote: > Instead of just bulk-flushing skbuff_heads queued up through > napi_consume_skb() or __kfree_skb_defer(), try to reuse them > on allocation path. Maybe you are already aware of this dynamics, but high speed NICs will usually run the

[PATCH v4 net-next 08/11] skbuff: introduce {,__}napi_build_skb() which reuses NAPI cache heads

2021-02-10 Thread Alexander Lobakin
Instead of just bulk-flushing skbuff_heads queued up through napi_consume_skb() or __kfree_skb_defer(), try to reuse them on allocation path. If the cache is empty on allocation, bulk-allocate the first 16 elements, which is more efficient than per-skb allocation. If the cache is full on freeing,