From mboxrd@z Thu Jan 1 00:00:00 1970 From: David Miller Subject: Re: [PATCH v2] net: skip genenerating uevents for network namespaces that are exiting Date: Thu, 27 Oct 2016 17:15:21 -0400 (EDT) Message-ID: <20161027.171521.641636732714679018.davem@davemloft.net> References: <1477361393-24876-1-git-send-email-avagin@openvz.org> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Cc: netdev-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, containers-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org, ebiederm-aS9lmoZGLiVWk0Htik3J/w@public.gmane.org, xiyou.wangcong-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org, linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org To: avagin-GEFAQzZX7r8dnm+yROfE0A@public.gmane.org Return-path: In-Reply-To: <1477361393-24876-1-git-send-email-avagin-GEFAQzZX7r8dnm+yROfE0A@public.gmane.org> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: containers-bounces-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org Errors-To: containers-bounces-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org List-Id: netdev.vger.kernel.org From: Andrei Vagin 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 > Cc: "David S. Miller" > Cc: Eric W. Biederman > Signed-off-by: Andrei Vagin Applied to net-next, thanks.