Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1030372AbcJ0VP2 (ORCPT ); Thu, 27 Oct 2016 17:15:28 -0400 Received: from shards.monkeyblade.net ([184.105.139.130]:34712 "EHLO shards.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S964938AbcJ0VPX (ORCPT ); Thu, 27 Oct 2016 17:15:23 -0400 Date: Thu, 27 Oct 2016 17:15:21 -0400 (EDT) Message-Id: <20161027.171521.641636732714679018.davem@davemloft.net> To: avagin@openvz.org Cc: ebiederm@xmission.com, containers@lists.linux-foundation.org, linux-kernel@vger.kernel.org, netdev@vger.kernel.org, xiyou.wangcong@gmail.com Subject: Re: [PATCH v2] net: skip genenerating uevents for network namespaces that are exiting From: David Miller In-Reply-To: <1477361393-24876-1-git-send-email-avagin@openvz.org> References: <1477361393-24876-1-git-send-email-avagin@openvz.org> X-Mailer: Mew version 6.7 on Emacs 24.5 / Mule 6.0 (HANACHIRUSATO) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.5.12 (shards.monkeyblade.net [149.20.54.216]); Thu, 27 Oct 2016 14:15:22 -0700 (PDT) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 956 Lines: 28 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.