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

2016-10-24 Thread Cong Wang
On Sat, Oct 22, 2016 at 12:37 AM, Andrey Vagin wrote: > Hi Cong, > > On Thu, Oct 20, 2016 at 10:25 PM, Andrey Vagin wrote: >> On Thu, Oct 20, 2016 at 8:10 PM, Cong Wang wrote: >>> On Thu, Oct 20, 2016 at 7:46 PM, Andrei Vagin wrote: No one can see these events, because a network namespace

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

2016-10-22 Thread David Miller
From: Andrei Vagin Date: Thu, 20 Oct 2016 19:46:26 -0700 > @@ -1525,6 +1530,9 @@ void netdev_unregister_kobject(struct net_device *ndev) > { > struct device *dev = &(ndev->dev); > > + if (!list_empty(&dev_net(ndev)->exit_list)) > + dev->kobj.uevent_suppress = 1; > + Plea

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

2016-10-22 Thread Andrey Vagin
Hi Cong, On Thu, Oct 20, 2016 at 10:25 PM, Andrey Vagin wrote: > On Thu, Oct 20, 2016 at 8:10 PM, Cong Wang wrote: >> On Thu, Oct 20, 2016 at 7:46 PM, Andrei Vagin wrote: >>> No one can see these events, because a network namespace can not be >>> destroyed, if it has sockets. >>> >> >> Are you

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

2016-10-20 Thread Andrey Vagin
On Thu, Oct 20, 2016 at 8:10 PM, Cong Wang wrote: > On Thu, Oct 20, 2016 at 7:46 PM, Andrei Vagin wrote: >> No one can see these events, because a network namespace can not be >> destroyed, if it has sockets. >> > > Are you sure? kobject_uevent_env() seems sending uevents to all > network namespa

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

2016-10-20 Thread Cong Wang
On Thu, Oct 20, 2016 at 7:46 PM, Andrei Vagin wrote: > No one can see these events, because a network namespace can not be > destroyed, if it has sockets. > Are you sure? kobject_uevent_env() seems sending uevents to all network namespaces.

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

2016-10-20 Thread Andrei Vagin
No one can see these events, because a network namespace can not be destroyed, if it has sockets. 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. - 94.76% 0.02% kwork