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: <CANn89iLDO4MUsRLWw-UOhYvTaP_Wn_jhByUCHTFCAHLv_kJSaw@mail.gmail.com>
Date: Mon, 7 Oct 2024 21:06:16 +0200
From: Eric Dumazet <edumazet@...gle.com>
To: Jonas Rebmann <jre@...gutronix.de>
Cc: "David S. Miller" <davem@...emloft.net>, David Ahern <dsahern@...nel.org>, 
	Jakub Kicinski <kuba@...nel.org>, Paolo Abeni <pabeni@...hat.com>, 
	Madalin Bucur <madalin.bucur@....com>, Sean Anderson <sean.anderson@...o.com>, netdev@...r.kernel.org, 
	linux-kernel@...r.kernel.org, kernel@...gutronix.de
Subject: Re: [PATCH 1/2] net: ipv4: igmp: optimize ____ip_mc_inc_group() using mc_hash

On Mon, Oct 7, 2024 at 4:17 PM Jonas Rebmann <jre@...gutronix.de> wrote:
>
> The runtime cost of joining a single multicast group in the current
> implementation of ____ip_mc_inc_group grows linearly with the number of
> existing memberships. This is caused by the linear search for an
> existing group record in the multicast address list.
>
> This linear complexity results in quadratic complexity when successively
> adding memberships, which becomes a performance bottleneck when setting
> up large numbers of multicast memberships.
>
> If available, use the existing multicast hash map mc_hash to quickly
> search for an existing group membership record. This leads to
> near-constant complexity on the addition of a new multicast record,
> significantly improving performance for workloads involving many
> multicast memberships.
>
> On profiling with a loopback device, this patch presented a speedup of
> around 6 when successively setting up 2000 multicast groups using
> setsockopt without measurable drawbacks on smaller numbers of
> multicast groups.
>
> Signed-off-by: Jonas Rebmann <jre@...gutronix.de>
> ---

Reviewed-by: Eric Dumazet <edumazet@...gle.com>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ