linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 0/2] ipvs: speedup ipvs netns dismantle
@ 2019-09-27  4:54 Haishuang Yan
  2019-09-27  4:54 ` [PATCH v2 1/2] ipvs: batch __ip_vs_cleanup Haishuang Yan
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Haishuang Yan @ 2019-09-27  4:54 UTC (permalink / raw)
  To: Julian Anastasov, David S. Miller, Pablo Neira Ayuso
  Cc: netdev, lvs-devel, linux-kernel, netfilter-devel, Haishuang Yan

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




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

end of thread, other threads:[~2019-10-01  9:54 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-09-27  4:54 [PATCH v2 0/2] ipvs: speedup ipvs netns dismantle Haishuang Yan
2019-09-27  4:54 ` [PATCH v2 1/2] ipvs: batch __ip_vs_cleanup Haishuang Yan
2019-09-27  4:54 ` [PATCH v2 2/2] ipvs: batch __ip_vs_dev_cleanup Haishuang Yan
2019-09-30 19:08 ` [PATCH v2 0/2] ipvs: speedup ipvs netns dismantle Julian Anastasov
2019-10-01  9:54   ` Simon Horman

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).