netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/20] Batch network namespace cleanup
@ 2009-11-30  1:46 Eric W. Biederman
  2009-11-30  8:07 ` Eric Dumazet
                   ` (7 more replies)
  0 siblings, 8 replies; 14+ messages in thread
From: Eric W. Biederman @ 2009-11-30  1:46 UTC (permalink / raw)
  To: David Miller
  Cc: netdev, jamal, Daniel Lezcano, Alexey Dobriyan, Patrick McHardy



Recently Jamal and Daniel perform some experiments and found that
large numbers of network namespace exiting simultaneously is very
inefficient.  24+ minutes in some configurations.  The cpu overhead
was negligible but it results in long hold times of net_mutex, and
memory being consumed a long time after the last user has gone away.

I looked into it and discovered that by batching network namespace
cleanups I can reduce the time for 4k network namespaces exiting from
5-7 minutes in my configuration to 44 seconds.

This patch series is my set of changes to the network namespace core
and associated cleanups to allow for network namespace batching.

Eric


 drivers/net/bonding/bond_main.c         |   32 +---
 drivers/net/loopback.c                  |    8 -
 drivers/net/ppp_generic.c               |   30 +---
 drivers/net/pppoe.c                     |   38 +----
 drivers/net/pppol2tp.c                  |   36 +----
 include/linux/netdevice.h               |    2 +
 include/linux/notifier.h                |    2 +-
 include/net/net_namespace.h             |    8 +-
 include/net/netns/generic.h             |    8 +-
 include/net/route.h                     |    1 +
 net/8021q/vlan.c                        |   33 +---
 net/core/dev.c                          |   52 ++-----
 net/core/net_namespace.c                |  254 +++++++++++++++++++------------
 net/ipv4/fib_frontend.c                 |    4 +-
 net/ipv4/ip_gre.c                       |   24 +---
 net/ipv4/ipip.c                         |   24 +---
 net/ipv4/route.c                        |    6 +
 net/ipv6/ip6_tunnel.c                   |   25 +---
 net/ipv6/sit.c                          |   25 +---
 net/key/af_key.c                        |   25 +---
 net/netfilter/nf_conntrack_proto_dccp.c |   31 +---
 net/netfilter/nf_conntrack_proto_gre.c  |   20 +--
 net/phonet/pn_dev.c                     |   16 +--
 23 files changed, 284 insertions(+), 420 deletions(-)

Eric W. Biederman (20):
      net: NETDEV_UNREGISTER_PERNET -> NETDEV_UNREGISTER_BATCH
      net: Implement for_each_netdev_reverse.
      net: Batch network namespace destruction.
      net: Automatically allocate per namespace data.
      net: Simplify loopback and improve batching.
      net: Simplfy default_device_exit and improve batching.
      net: Simplify the bond drivers pernet operations.
      net: Simplify vlan pernet operations.
      net: Simplify af_key pernet operations.
      net: Simplify conntrack_proto_dccp pernet operations.
      net: Simplify conntrack_proto_gre pernet operations.
      net: Simplify ppp_generic pernet operations.
      net: Simplify pppoe pernet operations.
      net: Simplify pppol2tp pernet operations.
      net: Simplify phonet pernet operations.
      net: Simplify ip_gre pernet operations.
      net: Simplify ipip pernet operations.
      net: Simplify ip6_tunnel pernet operations.
      net: Simplify ipip6 aka sit pernet operations.
      net: remove [un]register_pernet_gen_... and update the docs.


^ permalink raw reply	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2009-12-01  0:55 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-11-30  1:46 [PATCH 0/20] Batch network namespace cleanup Eric W. Biederman
2009-11-30  8:07 ` Eric Dumazet
2009-11-30  8:09   ` David Miller
2009-11-30  8:17     ` Eric W. Biederman
2009-11-30  8:48       ` Eric W. Biederman
2009-11-30  8:25 ` [PATCH 02/20] net: Implement for_each_netdev_reverse Eric W. Biederman
2009-11-30  8:25 ` [PATCH 03/20] net: Batch network namespace destruction Eric W. Biederman
2009-11-30  8:25 ` [PATCH 04/20] net: Automatically allocate per namespace data Eric W. Biederman
2009-11-30  8:25 ` [PATCH 05/20] net: Simplify loopback and improve batching Eric W. Biederman
2009-11-30  8:25 ` [PATCH 06/20] net: Simplfy default_device_exit " Eric W. Biederman
2009-11-30 12:44 ` [PATCH 0/20] Batch network namespace cleanup jamal
2009-11-30 19:22   ` Eric W. Biederman
2009-12-01  0:34 ` David Miller
2009-12-01  0:55   ` Eric W. Biederman

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).