From: Paolo Abeni <pabeni@redhat.com>
To: Eric Dumazet <edumazet@google.com>,
"David S . Miller" <davem@davemloft.net>,
Jakub Kicinski <kuba@kernel.org>
Cc: netdev@vger.kernel.org, eric.dumazet@gmail.com,
Alexander Duyck <alexanderduyck@fb.com>,
Soheil Hassas Yeganeh <soheil@google.com>
Subject: Re: [PATCH net-next 0/4] net: core: use a dedicated kmem_cache for skb head allocs
Date: Mon, 06 Feb 2023 19:16:39 +0100 [thread overview]
Message-ID: <d31bd1b26b07bd316b0adea3aa897c4623268304.camel@redhat.com> (raw)
In-Reply-To: <20230202185801.4179599-1-edumazet@google.com>
On Thu, 2023-02-02 at 18:57 +0000, Eric Dumazet wrote:
> Our profile data show that using kmalloc(non_const_size)/kfree(ptr)
> has a certain cost, because kfree(ptr) has to pull a 'struct page'
> in cpu caches.
>
> Using a dedicated kmem_cache for TCP skb->head allocations makes
> a difference, both in cpu cycles and memory savings.
>
> This kmem_cache could also be used for GRO skb allocations,
> this is left as a future exercise.
>
> Eric Dumazet (4):
> net: add SKB_HEAD_ALIGN() helper
> net: remove osize variable in __alloc_skb()
> net: factorize code in kmalloc_reserve()
> net: add dedicated kmem_cache for typical/small skb->head
>
> include/linux/skbuff.h | 8 ++++
> net/core/skbuff.c | 95 +++++++++++++++++++++++++++---------------
> 2 files changed, 70 insertions(+), 33 deletions(-)
LGTM,
Acked-by: Paolo Abeni <pabeni@redhat.com>
Thanks!
Paolo
prev parent reply other threads:[~2023-02-06 18:17 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-02-02 18:57 [PATCH net-next 0/4] net: core: use a dedicated kmem_cache for skb head allocs Eric Dumazet
2023-02-02 18:57 ` [PATCH net-next 1/4] net: add SKB_HEAD_ALIGN() helper Eric Dumazet
2023-02-02 20:06 ` Soheil Hassas Yeganeh
2023-02-02 18:57 ` [PATCH net-next 2/4] net: remove osize variable in __alloc_skb() Eric Dumazet
2023-02-02 20:07 ` Soheil Hassas Yeganeh
2023-02-02 18:58 ` [PATCH net-next 3/4] net: factorize code in kmalloc_reserve() Eric Dumazet
2023-02-02 20:09 ` Soheil Hassas Yeganeh
2023-02-02 18:58 ` [PATCH net-next 4/4] net: add dedicated kmem_cache for typical/small skb->head Eric Dumazet
2023-02-02 20:14 ` Soheil Hassas Yeganeh
2023-02-03 5:11 ` Jakub Kicinski
2023-02-03 7:00 ` Eric Dumazet
2023-02-03 7:59 ` Paolo Abeni
2023-02-03 8:17 ` Eric Dumazet
2023-02-03 19:47 ` Jakub Kicinski
2023-02-03 19:37 ` kernel test robot
2023-02-03 19:42 ` Jakub Kicinski
2023-02-06 18:16 ` Paolo Abeni [this message]
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=d31bd1b26b07bd316b0adea3aa897c4623268304.camel@redhat.com \
--to=pabeni@redhat.com \
--cc=alexanderduyck@fb.com \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=eric.dumazet@gmail.com \
--cc=kuba@kernel.org \
--cc=netdev@vger.kernel.org \
--cc=soheil@google.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;
as well as URLs for NNTP newsgroup(s).