[PATCH v2] net: skip genenerating uevents for network namespaces that are exiting

David Miller davem at davemloft.net
Thu Oct 27 21:15:21 UTC 2016


From: Andrei Vagin <avagin at openvz.org>
Date: Mon, 24 Oct 2016 19:09:53 -0700

> No one can see these events, because a network namespace can not be
> destroyed, if it has sockets.
> 
> Unlike other devices, uevent-s for network devices are generated
> only inside their network namespaces. They are filtered in
> kobj_bcast_filter()
> 
> My experiments shows that net namespaces are destroyed more 30% faster
> with this optimization.
> 
> Here is a perf output for destroying network namespaces without this
> patch.
 ...
> It's very critical to optimize the exit path for network namespaces,
> because they are destroyed under net_mutex and many namespaces can be
> destroyed for one iteration.
> 
> v2: use dev_set_uevent_suppress()
> 
> Cc: Cong Wang <xiyou.wangcong at gmail.com>
> Cc: "David S. Miller" <davem at davemloft.net>
> Cc: Eric W. Biederman <ebiederm at xmission.com>
> Signed-off-by: Andrei Vagin <avagin at openvz.org>

Applied to net-next, thanks.


More information about the Containers mailing list