lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CANn89iLQ1Sz7=sYMr=4r66-ZjHfnG5REi4uvitewfQrC7jrdZQ@mail.gmail.com>
Date: Tue, 20 Feb 2024 13:43:43 +0100
From: Eric Dumazet <edumazet@...gle.com>
To: 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

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>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ