Received: by 2002:a25:824b:0:0:0:0:0 with SMTP id d11csp2966195ybn; Thu, 26 Sep 2019 21:57:58 -0700 (PDT) X-Google-Smtp-Source: APXvYqwumsMkooH0B470xl8DAzYzlj4Ki/FgwhMFGm7xLGx6Q2bat9e9wjoxNBfdIfnvSlo50m1w X-Received: by 2002:a17:906:27cf:: with SMTP id k15mr6184714ejc.150.1569560278524; Thu, 26 Sep 2019 21:57:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1569560278; cv=none; d=google.com; s=arc-20160816; b=OcEAUcJRMIMwzfJ1YK69MW3Jzmbplgkg2aAnILL5OvbciPHWzcIcOEljnb+M8B/xzi lP7aE/xT8vaoE6buLTT4WT79PbBiUR1PzN9sXugE6MTPAzo6xeQ9TSdz9VFbdQ/kq0Li yI9fcETSJoSd1U7FIG7gtTCJUNB3uF82gyM5iXdjrO56TFmk0zhyn8nlajymO2ZoFES2 ZEnpqmGsgV7F4J+M7y/V6afIpc1lLSlkJ/pIc6GvIjKdza1MfU5F+2ummbiSakQR+gPf Suvt7kLgK9Hu/XEWFoR+x1G28TxyD8Eqk5Ql8pQh6jGQCdgaiAKI7DwIaKcdpBHF0eW/ WSrg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from; bh=KL2j/XCKOtkwk0/K0mnzhhNXuIh3/1qmHQlcjGyVcOc=; b=QlueN80fxh2gZoNYWag3zcNBKkehohWsLer/1qptOndZfpjt7MoMUWeiQt8TmnHQOf YT2hy2sOCyMoyMAT+OElZVuY+Cj9UDj877K0wz8WUbYVLs8AdF1OQn1zRoTMYVXYXQ4S ZFk9PJGyh/u39h3Lcu07wCcr5MA9WYPO8OW40zHJl12cjavrZpOI3tXLbbrSMfZLqfYE jaMSQx4ODyyW2NSYXQqnYKix+hk9bF8j+qviN7qAFF5KSv4x+g1reAzMPol1FP0IZxKB Wm65gZftU4fdi5U/vsaQh3HANwG9hcLGRu+JYya0f9Av1gihmp+plDs40ZPxjxknFKZ4 4Hsw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id f4si868741edf.6.2019.09.26.21.57.34; Thu, 26 Sep 2019 21:57:58 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728656AbfI0Ezg (ORCPT + 99 others); Fri, 27 Sep 2019 00:55:36 -0400 Received: from cmccmta3.chinamobile.com ([221.176.66.81]:2635 "EHLO cmccmta3.chinamobile.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726217AbfI0Ezg (ORCPT ); Fri, 27 Sep 2019 00:55:36 -0400 X-Greylist: delayed 10069 seconds by postgrey-1.27 at vger.kernel.org; Fri, 27 Sep 2019 00:55:34 EDT Received: from spf.mail.chinamobile.com (unknown[172.16.121.3]) by rmmx-syy-dmz-app12-12012 (RichMail) with SMTP id 2eec5d8d962fe12-3aa7a; Fri, 27 Sep 2019 12:55:13 +0800 (CST) X-RM-TRANSID: 2eec5d8d962fe12-3aa7a X-RM-TagInfo: emlType=0 X-RM-SPAM-FLAG: 00000000 Received: from localhost (unknown[223.105.0.241]) by rmsmtp-syy-appsvr02-12002 (RichMail) with SMTP id 2ee25d8d963016f-a2662; Fri, 27 Sep 2019 12:55:13 +0800 (CST) X-RM-TRANSID: 2ee25d8d963016f-a2662 From: Haishuang Yan To: Julian Anastasov , "David S. Miller" , Pablo Neira Ayuso Cc: netdev@vger.kernel.org, lvs-devel@vger.kernel.org, linux-kernel@vger.kernel.org, netfilter-devel@vger.kernel.org, Haishuang Yan Subject: [PATCH v2 0/2] ipvs: speedup ipvs netns dismantle Date: Fri, 27 Sep 2019 12:54:49 +0800 Message-Id: <1569560091-20553-1-git-send-email-yanhaishuang@cmss.chinamobile.com> X-Mailer: git-send-email 1.8.3.1 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Implement exit_batch() method to dismantle more ipvs netns per round. Tested: $ cat add_del_unshare.sh #!/bin/bash for i in `seq 1 100` do (for j in `seq 1 40` ; do unshare -n ipvsadm -A -t 172.16.$i.$j:80 >/dev/null ; done) & done wait; grep net_namespace /proc/slabinfo Befor patch: $ time sh add_del_unshare.sh net_namespace 4020 4020 4736 6 8 : tunables 0 0 0 : slabdata 670 670 0 real 0m8.086s user 0m2.025s sys 0m36.956s After patch: $ time sh add_del_unshare.sh net_namespace 4020 4020 4736 6 8 : tunables 0 0 0 : slabdata 670 670 0 real 0m7.623s user 0m2.003s sys 0m32.935s Haishuang Yan (2): ipvs: batch __ip_vs_cleanup ipvs: batch __ip_vs_dev_cleanup include/net/ip_vs.h | 2 +- net/netfilter/ipvs/ip_vs_core.c | 47 ++++++++++++++++++++++++----------------- net/netfilter/ipvs/ip_vs_ctl.c | 12 ++++++++--- 3 files changed, 38 insertions(+), 23 deletions(-) -- 1.8.3.1