From: Jakub Kicinski <kuba@kernel.org>
To: Alexander Lobakin <aleksander.lobakin@intel.com>
Cc: Edward Cree <ecree.xilinx@gmail.com>, <davem@davemloft.net>,
<netdev@vger.kernel.org>, <edumazet@google.com>,
<pabeni@redhat.com>, <willemb@google.com>, <fw@strlen.de>
Subject: Re: [PATCH net-next 2/3] net: skbuff: cache one skb_ext for use by GRO
Date: Wed, 15 Feb 2023 10:20:15 -0800 [thread overview]
Message-ID: <20230215102015.70d81a20@kernel.org> (raw)
In-Reply-To: <4aa71029-8a4a-0c6d-438d-71cebb11ccea@intel.com>
On Wed, 15 Feb 2023 19:01:19 +0100 Alexander Lobakin wrote:
> > I was hoping to leave sizing of the cache until we have some data from
> > a production network (or at least representative packet traces).
> >
> > NAPI_SKB_CACHE_SIZE kinda assumes we're not doing much GRO, right?
>
> It assumes we GRO a lot :D
>
> Imagine that you have 64 frames during one poll and the GRO layer
> decides to coalesce them by batches of 16. Then only 4 skbs will be
> used, the rest will go as frags (with "stolen heads") -> 60 of 64 skbs
> will return to that skb cache and will then be reused by napi_build_skb().
Let's say 5 - for 4 resulting skbs GRO will need the 4 resulting and
one extra to shuttle between the driver and GRO (worst case).
With a cache of 1 I'm guaranteed to save 59 alloc calls, 92%, right?
That's why I'm saying - the larger cache would help workloads which
don't GRO as much. Am I missing the point or how GRO works?
next prev parent reply other threads:[~2023-02-15 18:20 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-02-15 3:43 [PATCH net-next 0/3] net: skbuff: cache one skb_ext for use by GRO Jakub Kicinski
2023-02-15 3:43 ` [PATCH net-next 1/3] net: skb: carve the allocation out of skb_ext_add() Jakub Kicinski
2023-02-15 3:43 ` [PATCH net-next 2/3] net: skbuff: cache one skb_ext for use by GRO Jakub Kicinski
2023-02-15 8:41 ` Paolo Abeni
2023-02-15 17:45 ` Jakub Kicinski
2023-02-15 18:08 ` Alexander Lobakin
2023-02-15 19:08 ` Paolo Abeni
2023-02-15 15:37 ` Edward Cree
2023-02-15 16:17 ` Alexander Lobakin
2023-02-15 17:52 ` Jakub Kicinski
2023-02-15 18:01 ` Alexander Lobakin
2023-02-15 18:20 ` Jakub Kicinski [this message]
2023-02-16 12:04 ` Alexander Lobakin
2023-02-15 3:43 ` [PATCH net-next 3/3] net: create and use NAPI version of tc_skb_ext_alloc() Jakub Kicinski
2023-02-15 16:50 ` Jamal Hadi Salim
2023-02-15 17:03 ` Jiri Pirko
2023-02-15 18:36 ` Jamal Hadi Salim
2023-02-15 17:35 ` Jakub Kicinski
2023-02-15 18:38 ` Jamal Hadi Salim
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=20230215102015.70d81a20@kernel.org \
--to=kuba@kernel.org \
--cc=aleksander.lobakin@intel.com \
--cc=davem@davemloft.net \
--cc=ecree.xilinx@gmail.com \
--cc=edumazet@google.com \
--cc=fw@strlen.de \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=willemb@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.