From: Saeed Mahameed <saeed@kernel.org>
To: Jesper Dangaard Brouer <brouer@redhat.com>
Cc: netdev@vger.kernel.org, Jakub Kicinski <kuba@kernel.org>,
"David S. Miller" <davem@davemloft.net>,
edumazet@google.com, pabeni@redhat.com
Subject: Re: [PATCH net-next 2/2] net: kfree_skb_list use kmem_cache_free_bulk
Date: Fri, 6 Jan 2023 12:09:13 -0800 [thread overview]
Message-ID: <Y7h/6RwHW2IU3dq3@x130> (raw)
In-Reply-To: <167293336786.249536.14237439594457105125.stgit@firesoul>
On 05 Jan 16:42, Jesper Dangaard Brouer wrote:
>The kfree_skb_list function walks SKB (via skb->next) and frees them
>individually to the SLUB/SLAB allocator (kmem_cache). It is more
>efficient to bulk free them via the kmem_cache_free_bulk API.
>
>This patches create a stack local array with SKBs to bulk free while
>walking the list. Bulk array size is limited to 16 SKBs to trade off
>stack usage and efficiency. The SLUB kmem_cache "skbuff_head_cache"
>uses objsize 256 bytes usually in an order-1 page 8192 bytes that is
>32 objects per slab (can vary on archs and due to SLUB sharing). Thus,
>for SLUB the optimal bulk free case is 32 objects belonging to same
>slab, but runtime this isn't likely to occur.
>
>Signed-off-by: Jesper Dangaard Brouer <brouer@redhat.com>
any performance numbers ?
LGTM,
Reviewed-by: Saeed Mahameed <saeed@kernel.org>
next prev parent reply other threads:[~2023-01-06 20:09 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-01-05 15:42 [PATCH net-next 0/2] net: use kmem_cache_free_bulk in kfree_skb_list Jesper Dangaard Brouer
2023-01-05 15:42 ` [PATCH net-next 1/2] net: fix call location in kfree_skb_list_reason Jesper Dangaard Brouer
2023-01-06 19:54 ` Saeed Mahameed
2023-01-06 19:57 ` Saeed Mahameed
2023-01-05 15:42 ` [PATCH net-next 2/2] net: kfree_skb_list use kmem_cache_free_bulk Jesper Dangaard Brouer
2023-01-06 20:09 ` Saeed Mahameed [this message]
2023-01-06 22:33 ` Jakub Kicinski
2023-01-09 12:24 ` Jesper Dangaard Brouer
2023-01-09 19:34 ` Jakub Kicinski
2023-01-09 22:10 ` Alexander H Duyck
2023-01-10 14:52 ` Jesper Dangaard Brouer
2023-01-10 20:20 ` Jakub Kicinski
2023-01-13 13:42 ` Jesper Dangaard Brouer
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=Y7h/6RwHW2IU3dq3@x130 \
--to=saeed@kernel.org \
--cc=brouer@redhat.com \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=kuba@kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox