Re: [PATCH 0/2] kobject: reduce uevent_sock_mutex contention

From: Eric Dumazet
Date: Wed Feb 14 2024 - 05:44:11 EST


On Wed, Feb 14, 2024 at 11:34 AM Greg Kroah-Hartman
<gregkh@xxxxxxxxxxxxxxxxxxx> wrote:
>
> On Wed, Feb 14, 2024 at 08:48:27AM +0000, Eric Dumazet wrote:
> > This series reduces the (small ?) contention over uevent_sock_mutex,
> > noticed when creating/deleting many network namespaces/devices.
> >
> > 1) uevent_seqnum becomes an atomic64_t
> >
> > 2) Only acquire uevent_sock_mutex whenever using uevent_sock_list
>
> Cool, any boot-time measured speedups from this? Or is this just tiny
> optimizations that you noticed doing reviews?

No impressive nice numbers yet, the main bottleneck is still rtnl,
which I am working on net-next tree.

Other candidates are : rdma_nets_rwsem, proc_subdir_lock, pcpu_alloc_mutex, ...

Christian made the much needed changes [1], since the last time I took
a look at kobject (this was in 2017 !)

[1]
commit a3498436b3a0f8ec289e6847e1de40b4123e1639
Author: Christian Brauner <brauner@xxxxxxxxxx>
Date: Sun Apr 29 12:44:12 2018 +0200

netns: restrict uevents