From: Lorenzo Bianconi <lorenzo@kernel.org>
To: Eric Dumazet <edumazet@google.com>
Cc: netdev@vger.kernel.org, lorenzo.bianconi@redhat.com,
davem@davemloft.net, kuba@kernel.org, pabeni@redhat.com,
bpf@vger.kernel.org, hawk@kernel.org, toke@redhat.com,
willemdebruijn.kernel@gmail.com, jasowang@redhat.com,
sdf@google.com
Subject: Re: [PATCH v5 net-next 1/3] net: introduce page_pool pointer in softnet_data percpu struct
Date: Tue, 19 Dec 2023 18:32:31 +0100 [thread overview]
Message-ID: <ZYHTr-26328RpBDf@lore-desk> (raw)
In-Reply-To: <CANn89iKytnOU3_mR2RidXE74ad3x9QdWxGf+OZei4tpL8Wvcbw@mail.gmail.com>
[-- Attachment #1: Type: text/plain, Size: 1518 bytes --]
> On Thu, Dec 14, 2023 at 3:30 PM Lorenzo Bianconi <lorenzo@kernel.org> wrote:
> >
> > Allocate percpu page_pools in softnet_data.
> > Moreover add cpuid filed in page_pool struct in order to recycle the
> > page in the page_pool "hot" cache if napi_pp_put_page() is running on
> > the same cpu.
> > This is a preliminary patch to add xdp multi-buff support for xdp running
> > in generic mode.
> >
> > Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
> > ---
> > include/linux/netdevice.h | 1 +
> > include/net/page_pool/helpers.h | 5 +++++
> > include/net/page_pool/types.h | 1 +
> > net/core/dev.c | 39 ++++++++++++++++++++++++++++++++-
> > net/core/page_pool.c | 5 +++++
> > net/core/skbuff.c | 5 +++--
> > 6 files changed, 53 insertions(+), 3 deletions(-)
> >
> > diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h
> > index 1b935ee341b4..30b6a3f601fe 100644
> > --- a/include/linux/netdevice.h
> > +++ b/include/linux/netdevice.h
> > @@ -3319,6 +3319,7 @@ struct softnet_data {
> > int defer_count;
> > int defer_ipi_scheduled;
> > struct sk_buff *defer_list;
> > + struct page_pool *page_pool;
> > call_single_data_t defer_csd;
> > };
>
> This field should be put elsewhere, not in this contended cache line.
ack, I think we could add a percpu dedicated pointer for it.
Regards,
Lorenzo
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]
next prev parent reply other threads:[~2023-12-19 17:32 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-12-14 14:29 [PATCH v5 net-next 0/3] add multi-buff support for xdp running in generic mode Lorenzo Bianconi
2023-12-14 14:29 ` [PATCH v5 net-next 1/3] net: introduce page_pool pointer in softnet_data percpu struct Lorenzo Bianconi
2023-12-19 15:23 ` Paolo Abeni
2023-12-20 12:00 ` Jesper Dangaard Brouer
2024-01-17 17:36 ` Lorenzo Bianconi
2024-01-18 1:47 ` Jakub Kicinski
2024-01-22 11:19 ` Lorenzo Bianconi
2023-12-19 16:29 ` Eric Dumazet
2023-12-19 17:32 ` Lorenzo Bianconi [this message]
2023-12-14 14:29 ` [PATCH v5 net-next 2/3] xdp: rely on skb pointer reference in do_xdp_generic and netif_receive_generic_xdp Lorenzo Bianconi
2023-12-14 14:29 ` [PATCH v5 net-next 3/3] xdp: add multi-buff support for xdp running in generic mode Lorenzo Bianconi
2023-12-20 16:01 ` Jesper Dangaard Brouer
2023-12-21 8:23 ` Lorenzo Bianconi
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=ZYHTr-26328RpBDf@lore-desk \
--to=lorenzo@kernel.org \
--cc=bpf@vger.kernel.org \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=hawk@kernel.org \
--cc=jasowang@redhat.com \
--cc=kuba@kernel.org \
--cc=lorenzo.bianconi@redhat.com \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=sdf@google.com \
--cc=toke@redhat.com \
--cc=willemdebruijn.kernel@gmail.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