[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <65d4cafaf0839_23483829459@willemb.c.googlers.com.notmuch>
Date: Tue, 20 Feb 2024 10:53:30 -0500
From: Willem de Bruijn <willemdebruijn.kernel@...il.com>
To: Eric Dumazet <edumazet@...gle.com>,
Paolo Abeni <pabeni@...hat.com>
Cc: netdev@...r.kernel.org,
Willem de Bruijn <willemdebruijn.kernel@...il.com>,
"David S. Miller" <davem@...emloft.net>,
David Ahern <dsahern@...nel.org>,
Jakub Kicinski <kuba@...nel.org>
Subject: Re: [PATCH net-next] udp: add local "peek offset enabled" flag
Eric Dumazet wrote:
> On Tue, Feb 20, 2024 at 12:00 PM Paolo Abeni <pabeni@...hat.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@...hat.com>
> > ---
>
> SGTM, thanks !
> Reviewed-by: Eric Dumazet <edumazet@...gle.com>
Reviewed-by: Willem de Bruijn <willemb@...gle.com>
Powered by blists - more mailing lists