OpenCloudOS-Kernel/net
Eric W. Biederman 2b035b3997 net: Batch network namespace destruction.
It is fairly common to kill several network namespaces at once.  Either
because they are nested one inside the other or because they are cooperating
in multiple machine networking experiments.  As the network stack control logic
does not parallelize easily batch up multiple network namespaces existing
together.

To get the full benefit of batching the virtual network devices to be
removed must be all removed in one batch.  For that purpose I have added
a loop after the last network device operations have run that batches
up all remaining network devices and deletes them.

An extra benefit is that the reorganization slightly shrinks the size
of the per network namespace data structures replaceing a work_struct
with a list_head.

In a trivial test with 4K namespaces this change reduced the cost of
a destroying 4K namespaces from 7+ minutes (at 12% cpu) to 44 seconds
(at 60% cpu).  The bulk of that 44s was spent in inet_twsk_purge.

Signed-off-by: Eric W. Biederman <ebiederm@xmission.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-12-01 16:15:51 -08:00
..
9p net: Move && and || to end of previous line 2009-11-29 16:55:45 -08:00
802 net: remove COMPAT_NET_DEV_OPS 2009-05-25 01:53:53 -07:00
8021q vlan: support "loose binding" to the underlying network device 2009-11-26 16:00:36 -08:00
appletalk net: use net_eq to compare nets 2009-11-25 15:14:13 -08:00
atm net: use net_eq to compare nets 2009-11-25 15:14:13 -08:00
ax25 net: use net_eq to compare nets 2009-11-25 15:14:13 -08:00
bluetooth net: Move && and || to end of previous line 2009-11-29 16:55:45 -08:00
bridge net: Move && and || to end of previous line 2009-11-29 16:55:45 -08:00
can net: Move && and || to end of previous line 2009-11-29 16:55:45 -08:00
core net: Batch network namespace destruction. 2009-12-01 16:15:51 -08:00
dcb net: Move && and || to end of previous line 2009-11-29 16:55:45 -08:00
dccp net: drop capability from protocol definitions 2009-11-05 21:40:17 -08:00
decnet net: Move && and || to end of previous line 2009-11-29 16:55:45 -08:00
dsa netdev: convert pseudo-devices to netdev_tx_t 2009-09-01 01:13:07 -07:00
econet net: use net_eq to compare nets 2009-11-25 15:14:13 -08:00
ethernet remove deprecated and not used: print_mac() 2009-11-15 22:21:34 -08:00
ieee802154 net: use net_eq to compare nets 2009-11-25 15:14:13 -08:00
ipv4 net: NETDEV_UNREGISTER_PERNET -> NETDEV_UNREGISTER_BATCH 2009-12-01 16:15:50 -08:00
ipv6 xfrm: Use the user specified truncation length in ESP and AH 2009-11-25 15:48:41 -08:00
ipx net: use net_eq to compare nets 2009-11-25 15:14:13 -08:00
irda net: Move && and || to end of previous line 2009-11-29 16:55:45 -08:00
iucv iucv: add work_queue cleanup for suspend 2009-11-13 20:46:58 -08:00
key netns: net_identifiers should be read_mostly 2009-11-18 05:03:25 -08:00
lapb net: remove NET_RX_BAD and NET_RX_CN* defines 2009-07-05 19:15:35 -07:00
llc net: use net_eq to compare nets 2009-11-25 15:14:13 -08:00
mac80211 net: Move && and || to end of previous line 2009-11-29 16:55:45 -08:00
netfilter net: Move && and || to end of previous line 2009-11-29 16:55:45 -08:00
netlabel net: rename skb->iif to skb->skb_iif 2009-11-20 15:35:04 -08:00
netlink net: use net_eq to compare nets 2009-11-25 15:14:13 -08:00
netrom net: use net_eq to compare nets 2009-11-25 15:14:13 -08:00
packet net: Move && and || to end of previous line 2009-11-29 16:55:45 -08:00
phonet net: Move && and || to end of previous line 2009-11-29 16:55:45 -08:00
rds net: Move && and || to end of previous line 2009-11-29 16:55:45 -08:00
rfkill Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6 2009-11-29 00:57:15 -08:00
rose net: Move && and || to end of previous line 2009-11-29 16:55:45 -08:00
rxrpc net: use net_eq to compare nets 2009-11-25 15:14:13 -08:00
sched net: Move && and || to end of previous line 2009-11-29 16:55:45 -08:00
sctp net: Move && and || to end of previous line 2009-11-29 16:55:45 -08:00
sunrpc net: Move && and || to end of previous line 2009-11-29 16:55:45 -08:00
tipc net: Move && and || to end of previous line 2009-11-29 16:55:45 -08:00
unix net: Move && and || to end of previous line 2009-11-29 16:55:45 -08:00
wanrouter headers: smp_lock.h redux 2009-07-12 12:22:34 -07:00
wimax net: Move && and || to end of previous line 2009-11-29 16:55:45 -08:00
wireless net: Move && and || to end of previous line 2009-11-29 16:55:45 -08:00
x25 X25: Fix oops and refcnt problems from x25_dev_get 2009-11-29 00:25:02 -08:00
xfrm xfrm: Add SHA384 and SHA512 HMAC authentication algorithms to XFRM 2009-11-25 15:48:44 -08:00
Kconfig net/compat/wext: send different messages to compat tasks 2009-07-15 08:53:39 -07:00
Makefile net: remove redundant sched/ in net/Makefile 2009-07-12 20:11:14 -07:00
TUNABLE
compat.c net: Cleanup redundant tests on unsigned 2009-10-29 01:39:54 -07:00
nonet.c
socket.c net/atm: move all compat_ioctl handling to atm/ioctl.c 2009-11-11 19:22:23 -08:00
sysctl_net.c net: sysctl_net - use net_eq to compare nets 2009-03-16 16:23:30 +01:00