Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp4341255ybi; Tue, 30 Jul 2019 00:15:41 -0700 (PDT) X-Google-Smtp-Source: APXvYqxEB/uVXTip2L20J3kCvfsQ95wJ6m/oXlNXyVwV6CTKx0sAvQdqGuzG1LMvm8bA1X/vQYOM X-Received: by 2002:a63:1b66:: with SMTP id b38mr107392520pgm.54.1564470940856; Tue, 30 Jul 2019 00:15:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1564470940; cv=none; d=google.com; s=arc-20160816; b=P8oxvyTsyMOZ4XEhGJTp4Xc86GB4NE8qQKxiUKFoCJVsIllfUpB27LcAo++rxCz9Rh 8JuOHVpWKqQv5Cjk5iwAf2kXfxvwQdek1z0kjRWwhPuO+TZ3r9HBFixt8dZYw7TtLSOG RHyS4+fRStOjlCf+6rUDO34JPxiLUXXWthoUtZ8ftOFMVHkOlVgEnwrzVd0bgin2732S MZievevehUy+Af6pi4mE58JmOZtDC3TzRqTNzOlnboxPZ3tzUdhWHmJmazg9W5H/+K6q k7FLc70ynHc6UHzUf5Y4xbJro9SjmF6cbGfh2Tu73fZzRSnvMMfQZu9FMR5W26Co+idU ro5Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :message-id:in-reply-to:subject:cc:to:from:date; bh=fXdWUUIvfNS3DQR3PedSoJyPg3wQ4poKhETh6xB2biA=; b=ja5qCqSaxsbapRHdh4ew0AbeaSmHGZyQBT5gMPhnhvXA8BmADxGLhFavZ7fAQ/BtW9 0rYBVFavt0QEkfK9c1ttWeGVXvC0IFCW8p/nH3obsbYqLdCWDea8+vDvIB4tCCqrF/69 1xT5gNReChhaxIUDmbsMkuwMMdUFrWPWMRKdhlbIbexcEgnW8O6I6VO7RDhn74Q8vlr0 lxiyu9ncuFg4ky29YOfxEai5Npx5FODIj2+omv2nyK8fzUpfDx/X7Ov3vsjANdzI661W R/s5W3+8/S+FMV7T0bb9ejn8TL4E7Z4HrdGKb6UIwJVG19uyTByYvHkkFwppx3/TAM80 at5A== 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 g127si19344873pgc.128.2019.07.30.00.15.26; Tue, 30 Jul 2019 00:15:40 -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 S1729967AbfG2UD4 (ORCPT + 99 others); Mon, 29 Jul 2019 16:03:56 -0400 Received: from ja.ssi.bg ([178.16.129.10]:52746 "EHLO ja.ssi.bg" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1729843AbfG2UDz (ORCPT ); Mon, 29 Jul 2019 16:03:55 -0400 Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by ja.ssi.bg (8.15.2/8.15.2) with ESMTP id x6TK3VOW005690; Mon, 29 Jul 2019 23:03:32 +0300 Date: Mon, 29 Jul 2019 23:03:31 +0300 (EEST) From: Julian Anastasov To: Haishuang Yan cc: "David S. Miller" , Pablo Neira Ayuso , Simon Horman , netdev@vger.kernel.org, lvs-devel@vger.kernel.org, linux-kernel@vger.kernel.org, netfilter-devel@vger.kernel.org Subject: Re: [net-next 1/2] ipvs: batch __ip_vs_cleanup In-Reply-To: <8441EA26-E197-4F40-A6D7-5B7D59AA7F7F@cmss.chinamobile.com> Message-ID: References: <1563031186-2101-1-git-send-email-yanhaishuang@cmss.chinamobile.com> <1563031186-2101-2-git-send-email-yanhaishuang@cmss.chinamobile.com> <8441EA26-E197-4F40-A6D7-5B7D59AA7F7F@cmss.chinamobile.com> User-Agent: Alpine 2.21 (LFD 202 2017-01-01) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hello, On Thu, 18 Jul 2019, Haishuang Yan wrote: > As the following benchmark testing results show, there is a little performance improvement: OK, can you send v2 after removing the LIST_HEAD(list) from both patches, I guess, it is not needed. If you prefer, you can include these benchmark results too. > $ 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 > > > > > >> + ipvs = net_ipvs(net); > >> + ip_vs_conn_net_cleanup(ipvs); > >> + ip_vs_app_net_cleanup(ipvs); > >> + ip_vs_protocol_net_cleanup(ipvs); > >> + ip_vs_control_net_cleanup(ipvs); > >> + ip_vs_estimator_net_cleanup(ipvs); > >> + IP_VS_DBG(2, "ipvs netns %d released\n", ipvs->gen); > >> + net->ipvs = NULL; Regards -- Julian Anastasov