{"id":815096,"url":"http://patchwork.ozlabs.org/api/1.2/covers/815096/?format=json","web_url":"http://patchwork.ozlabs.org/project/netdev/cover/20170918190733.26272-1-edumazet@google.com/","project":{"id":7,"url":"http://patchwork.ozlabs.org/api/1.2/projects/7/?format=json","name":"Linux network development","link_name":"netdev","list_id":"netdev.vger.kernel.org","list_email":"netdev@vger.kernel.org","web_url":null,"scm_url":null,"webscm_url":null,"list_archive_url":"","list_archive_url_format":"","commit_url_format":""},"msgid":"<20170918190733.26272-1-edumazet@google.com>","list_archive_url":null,"date":"2017-09-18T19:07:26","name":"[net-next,0/7] net: speedup netns create/delete time","submitter":{"id":13357,"url":"http://patchwork.ozlabs.org/api/1.2/people/13357/?format=json","name":"Eric Dumazet","email":"edumazet@google.com"},"mbox":"http://patchwork.ozlabs.org/project/netdev/cover/20170918190733.26272-1-edumazet@google.com/mbox/","series":[{"id":3713,"url":"http://patchwork.ozlabs.org/api/1.2/series/3713/?format=json","web_url":"http://patchwork.ozlabs.org/project/netdev/list/?series=3713","date":"2017-09-18T19:07:26","name":"net: speedup netns create/delete time","version":1,"mbox":"http://patchwork.ozlabs.org/series/3713/mbox/"}],"comments":"http://patchwork.ozlabs.org/api/covers/815096/comments/","headers":{"Return-Path":"<netdev-owner@vger.kernel.org>","X-Original-To":"patchwork-incoming@ozlabs.org","Delivered-To":"patchwork-incoming@ozlabs.org","Authentication-Results":["ozlabs.org;\n\tspf=none (mailfrom) smtp.mailfrom=vger.kernel.org\n\t(client-ip=209.132.180.67; helo=vger.kernel.org;\n\tenvelope-from=netdev-owner@vger.kernel.org;\n\treceiver=<UNKNOWN>)","ozlabs.org; dkim=pass (2048-bit key;\n\tunprotected) header.d=google.com header.i=@google.com\n\theader.b=\"EIqtC28W\"; dkim-atps=neutral"],"Received":["from vger.kernel.org (vger.kernel.org [209.132.180.67])\n\tby ozlabs.org (Postfix) with ESMTP id 3xwwW246Pvz9s7p\n\tfor <patchwork-incoming@ozlabs.org>;\n\tTue, 19 Sep 2017 05:07:42 +1000 (AEST)","(majordomo@vger.kernel.org) by vger.kernel.org via listexpand\n\tid S1750964AbdIRTHk (ORCPT <rfc822;patchwork-incoming@ozlabs.org>);\n\tMon, 18 Sep 2017 15:07:40 -0400","from mail-pf0-f174.google.com ([209.85.192.174]:47101 \"EHLO\n\tmail-pf0-f174.google.com\" rhost-flags-OK-OK-OK-OK) by vger.kernel.org\n\twith ESMTP id S1750772AbdIRTHi (ORCPT\n\t<rfc822;netdev@vger.kernel.org>); Mon, 18 Sep 2017 15:07:38 -0400","by mail-pf0-f174.google.com with SMTP id e199so712934pfh.3\n\tfor <netdev@vger.kernel.org>; Mon, 18 Sep 2017 12:07:38 -0700 (PDT)","from localhost ([2620:15c:2cb:201:1d19:43e0:8828:6785])\n\tby smtp.gmail.com with ESMTPSA id\n\tx8sm164121pff.104.2017.09.18.12.07.37\n\t(version=TLS1_2 cipher=AES128-SHA bits=128/128);\n\tMon, 18 Sep 2017 12:07:37 -0700 (PDT)"],"DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=google.com; s=20161025;\n\th=from:to:cc:subject:date:message-id;\n\tbh=jX1HV1iGFxKd3SD8LoeDK3l+RsUN6PLVNzlUlNSAL1c=;\n\tb=EIqtC28WAWS8OSMyhqHE413WcX9mIThH9sYNpvw8m/TiU7g5vskkehCQM4gZF6BJxC\n\tvd3MeCsfU3pVFcA/hQi262SlRHCnYcBGaYv1jXzN+RywKwxT/R/LkuxhSq0Nkj/MReAB\n\tDzND+xTkUZBteM2iIVd0JJtbLxubLbu+NZPqVCPuKxzjmeh8nabjLf67vDGgnRpBPqof\n\tP6q97XSAbLSSvh14XispCGvQvvhGB1mAYo+g/M+KwdSkFl0VO8xWkdaaF2FcnvUWzcej\n\tcEpoa4UnVLlzHPKaoYSlQ9cL0ICwW3chP548gqMhBTZ1JWDAmJYKi6hXxr4O2MeakrVK\n\tQWzA==","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20161025;\n\th=x-gm-message-state:from:to:cc:subject:date:message-id;\n\tbh=jX1HV1iGFxKd3SD8LoeDK3l+RsUN6PLVNzlUlNSAL1c=;\n\tb=c0D8995qQRLuY7ray2HLMnjq+jnJJBH2d2in1vAeod5PeDPUVpPPVWNYlCqgiyt5AO\n\tLQJz0Z6lxqWDFRH35LzN7od2OHBwbR8/xZ/9QSYkTfzApv228Uk7sgH2Z/ah+bkjKkRg\n\t57+Sphl+NYaJ6IGE0BTjGaOnRH4AAhdKk7+HoyWHnCbqbcMLX0gXGEVjOkTVmoETslQE\n\tWxH4D4DptEpqOYeJETLudCqNnx6kozx6dwpyoTYmaf9jp8tooi+UhH68DGFjlhwFYtu9\n\tFS3stexFKClpQALDZvGyf0aQzI8L35l3dGQCq1bX5V+c/ztA1WYftyajaM0SLtKcWzom\n\tBMEg==","X-Gm-Message-State":"AHPjjUiOXlu9VVAGK713H/dx5ffGjqYQUzSmt2mjneKKB566ofIZmJVX\n\tYqARTR0JCqOLQzUO","X-Google-Smtp-Source":"ADKCNb5RjPfy7ycOIXx4eRA88J0xyWEbutR3/Y+r/k8IQQz4tq03mWZmebFp9zHDvmVvhMnlz30MoQ==","X-Received":"by 10.84.216.78 with SMTP id f14mr29729706plj.394.1505761657946; \n\tMon, 18 Sep 2017 12:07:37 -0700 (PDT)","From":"Eric Dumazet <edumazet@google.com>","To":"\"David S . Miller\" <davem@davemloft.net>","Cc":"netdev <netdev@vger.kernel.org>,\n\t\"Eric W . Biederman\" <ebiederm@xmission.com>,\n\tEric Dumazet <edumazet@google.com>, Eric Dumazet <eric.dumazet@gmail.com>","Subject":"[PATCH net-next 0/7] net: speedup netns create/delete time","Date":"Mon, 18 Sep 2017 12:07:26 -0700","Message-Id":"<20170918190733.26272-1-edumazet@google.com>","X-Mailer":"git-send-email 2.14.1.690.gbb1197296e-goog","Sender":"netdev-owner@vger.kernel.org","Precedence":"bulk","List-ID":"<netdev.vger.kernel.org>","X-Mailing-List":"netdev@vger.kernel.org"},"content":"When rate of netns creation/deletion is high enough,\nwe observe softlockups in cleanup_net() caused by huge list\nof netns and way too many rcu_barrier() calls.\n\nThis patch series does some optimizations in kobject,\nand add batching to tunnels so that netns dismantles are\nless costly.\n\nIPv6 addrlabels also get a per netns list, and tcp_metrics\nalso benefit from batch flushing.\n\nThis gives me one order of magnitude gain.\n(~50 ms -> ~5 ms for one netns create/delete pair)\n\nTested:\n\nfor i in `seq 1 40`\ndo\n (for j in `seq 1 100` ; do  unshare -n /bin/true >/dev/null ; done) &\ndone\nwait ; grep net_namespace /proc/slabinfo\n\nBefore patch series :\n\n$ time ./add_del_unshare.sh\nnet_namespace        116    258   5504    1    2 : tunables    8    4    0 : slabdata    116    258      0\n\nreal\t3m24.910s\nuser\t0m0.747s\nsys\t0m43.162s\n\nAfter :\n$ time ./add_del_unshare.sh\nnet_namespace        135    291   5504    1    2 : tunables    8    4    0 : slabdata    135    291      0\n\nreal\t0m22.117s\nuser\t0m0.728s\nsys\t0m35.328s\n\nEric Dumazet (7):\n  kobject: add kobject_uevent_net_broadcast()\n  kobject: copy env blob in one go\n  kobject: factorize skb setup in kobject_uevent_net_broadcast()\n  ipv6: addrlabel: per netns list\n  tcp: batch tcp_net_metrics_exit\n  ipv6: speedup ipv6 tunnels dismantle\n  ipv4: speedup ipv6 tunnels dismantle\n\n include/net/ip_tunnels.h |  3 +-\n include/net/netns/ipv6.h |  5 +++\n lib/kobject_uevent.c     | 95 ++++++++++++++++++++++++++----------------------\n net/ipv4/ip_gre.c        | 22 +++++------\n net/ipv4/ip_tunnel.c     | 13 +++++--\n net/ipv4/ip_vti.c        |  7 ++--\n net/ipv4/ipip.c          |  7 ++--\n net/ipv4/tcp_metrics.c   | 14 ++++---\n net/ipv6/addrlabel.c     | 81 +++++++++++++++--------------------------\n net/ipv6/ip6_gre.c       |  8 ++--\n net/ipv6/ip6_tunnel.c    | 20 +++++-----\n net/ipv6/ip6_vti.c       | 23 +++++++-----\n net/ipv6/sit.c           |  9 +++--\n 13 files changed, 159 insertions(+), 148 deletions(-)"}