Netdev List
 help / color / mirror / Atom feed
From: Willem de Bruijn <willemdebruijn.kernel@gmail.com>
To: Eric Dumazet <edumazet@google.com>,  Paolo Abeni <pabeni@redhat.com>
Cc: netdev@vger.kernel.org,
	 Willem de Bruijn <willemdebruijn.kernel@gmail.com>,
	 "David S. Miller" <davem@davemloft.net>,
	 David Ahern <dsahern@kernel.org>,
	 Jakub Kicinski <kuba@kernel.org>
Subject: Re: [PATCH net-next] udp: add local "peek offset enabled" flag
Date: Tue, 20 Feb 2024 10:53:30 -0500	[thread overview]
Message-ID: <65d4cafaf0839_23483829459@willemb.c.googlers.com.notmuch> (raw)
In-Reply-To: <CANn89iLQ1Sz7=sYMr=4r66-ZjHfnG5REi4uvitewfQrC7jrdZQ@mail.gmail.com>

Eric Dumazet wrote:
> On Tue, Feb 20, 2024 at 12:00 PM Paolo Abeni <pabeni@redhat.com> wrote:
> >
> > We want to re-organize the struct sock layout. The sk_peek_off
> > field location is problematic, as most protocols want it in the
> > RX read area, while UDP wants it on a cacheline different from
> > sk_receive_queue.
> >
> > Create a local (inside udp_sock) copy of the 'peek offset is enabled'
> > flag and place it inside the same cacheline of reader_queue.
> >
> > Check such flag before reading sk_peek_off. This will save potential
> > false sharing and cache misses in the fast-path.
> >
> > Tested under UDP flood with small packets. The struct sock layout
> > update causes a 4% performance drop, and this patch restores completely
> > the original tput.
> >
> > Signed-off-by: Paolo Abeni <pabeni@redhat.com>
> > ---
> 
> SGTM, thanks !
> Reviewed-by: Eric Dumazet <edumazet@google.com>

Reviewed-by: Willem de Bruijn <willemb@google.com>

  reply	other threads:[~2024-02-20 15:53 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-02-20 11:00 [PATCH net-next] udp: add local "peek offset enabled" flag Paolo Abeni
2024-02-20 12:43 ` Eric Dumazet
2024-02-20 15:53   ` Willem de Bruijn [this message]
2024-02-22  1:20 ` patchwork-bot+netdevbpf

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=65d4cafaf0839_23483829459@willemb.c.googlers.com.notmuch \
    --to=willemdebruijn.kernel@gmail.com \
    --cc=davem@davemloft.net \
    --cc=dsahern@kernel.org \
    --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