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]
Date: Fri, 28 Jun 2024 18:39:49 +0200
From: Jesper Dangaard Brouer <hawk@...nel.org>
To: Sebastian Andrzej Siewior <bigeasy@...utronix.de>,
 netdev@...r.kernel.org, bpf@...r.kernel.org
Cc: Björn Töpel <bjorn@...nel.org>,
 "David S. Miller" <davem@...emloft.net>, Alexei Starovoitov
 <ast@...nel.org>, Andrii Nakryiko <andrii@...nel.org>,
 Daniel Borkmann <daniel@...earbox.net>, Eduard Zingerman
 <eddyz87@...il.com>, Eric Dumazet <edumazet@...gle.com>,
 Hao Luo <haoluo@...gle.com>, Jakub Kicinski <kuba@...nel.org>,
 Jiri Olsa <jolsa@...nel.org>, John Fastabend <john.fastabend@...il.com>,
 Jonathan Lemon <jonathan.lemon@...il.com>, KP Singh <kpsingh@...nel.org>,
 Maciej Fijalkowski <maciej.fijalkowski@...el.com>,
 Magnus Karlsson <magnus.karlsson@...el.com>,
 Martin KaFai Lau <martin.lau@...ux.dev>, Paolo Abeni <pabeni@...hat.com>,
 Song Liu <song@...nel.org>, Stanislav Fomichev <sdf@...ichev.me>,
 Thomas Gleixner <tglx@...utronix.de>, Yonghong Song <yonghong.song@...ux.dev>
Subject: Re: [PATCH net-next 3/3] net: Move flush list retrieval to where it
 is used.


On 28/06/2024 12.18, Sebastian Andrzej Siewior wrote:
> The bpf_net_ctx_get_.*_flush_list() are used at the top of the function.
> This means the variable is always assigned even if unused. By moving the
> function to where it is used, it is possible to delay the initialisation
> until it is unavoidable.
> Not sure how much this gains in reality but by looking at bq_enqueue()
> (in devmap.c) gcc pushes one register less to the stack. \o/.
> 
>   Move flush list retrieval to where it is used.
> 
> Signed-off-by: Sebastian Andrzej Siewior<bigeasy@...utronix.de>
> ---
>   kernel/bpf/cpumap.c | 6 ++++--
>   kernel/bpf/devmap.c | 3 ++-
>   net/xdp/xsk.c       | 6 ++++--
>   3 files changed, 10 insertions(+), 5 deletions(-)

Nice small optimization :-)

Acked-by: Jesper Dangaard Brouer <hawk@...nel.org>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ