[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20220218072811.72bf7276@kicinski-fedora-pc1c0hjn.dhcp.thefacebook.com>
Date: Fri, 18 Feb 2022 07:28:11 -0800
From: Jakub Kicinski <kuba@...nel.org>
To: Eric Dumazet <eric.dumazet@...il.com>
Cc: "David S . Miller" <davem@...emloft.net>,
netdev <netdev@...r.kernel.org>,
Eric Dumazet <edumazet@...gle.com>
Subject: Re: [PATCH net-next] net: avoid quadratic behavior in
netdev_wait_allrefs_any()
On Thu, 17 Feb 2022 22:54:30 -0800 Eric Dumazet wrote:
> From: Eric Dumazet <edumazet@...gle.com>
>
> If the list of devices has N elements, netdev_wait_allrefs_any()
> is called N times, and linkwatch_forget_dev() is called N*(N-1)/2 times.
>
> Fix this by calling linkwatch_forget_dev() only once per device.
>
> Fixes: faab39f63c1f ("net: allow out-of-order netdev unregistration")
> Signed-off-by: Eric Dumazet <edumazet@...gle.com>
Yup, I was on the fence on this one, I went for keeping all linkwatch
stuff in one function and minimal changes. Clearly underestimated the
number of netdevs your cases are destroying at once :)
Powered by blists - more mailing lists