lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20220124202457.3450198-1-eric.dumazet@gmail.com>
Date:   Mon, 24 Jan 2022 12:24:51 -0800
From:   Eric Dumazet <eric.dumazet@...il.com>
To:     "David S . Miller" <davem@...emloft.net>,
        Jakub Kicinski <kuba@...nel.org>
Cc:     netdev <netdev@...r.kernel.org>,
        Eric Dumazet <edumazet@...gle.com>,
        Eric Dumazet <eric.dumazet@...il.com>
Subject: [PATCH net-next 0/6] netns: speedup netns dismantles

From: Eric Dumazet <edumazet@...gle.com>

netns are dismantled by a single thread, from cleanup_net()

On hosts with many TCP sockets, and/or many cpus, this thread
is spending too many cpu cycles, and can not keep up with some
workloads.

- Removing 3*num_possible_cpus() sockets per netns, for icmp and tcp protocols.
- Iterating over all TCP sockets to remove stale timewait sockets.

This patch series removes ~50% of cleanup_net() cpu costs on
hosts with 256 cpus. It also reduces per netns memory footprint.

Eric Dumazet (6):
  tcp/dccp: add tw->tw_bslot
  tcp/dccp: no longer use twsk_net(tw) from tw_timer_handler()
  tcp/dccp: get rid of inet_twsk_purge()
  ipv4: do not use per netns icmp sockets
  ipv6: do not use per netns icmp sockets
  ipv4/tcp: do not use per netns ctl sockets

 include/net/inet_timewait_sock.h |  8 ++-
 include/net/netns/ipv4.h         |  2 -
 include/net/netns/ipv6.h         |  1 -
 net/dccp/ipv4.c                  |  6 ---
 net/dccp/ipv6.c                  |  6 ---
 net/ipv4/icmp.c                  | 91 +++++++++++---------------------
 net/ipv4/inet_timewait_sock.c    | 67 ++++-------------------
 net/ipv4/tcp_ipv4.c              | 63 ++++++++++------------
 net/ipv6/icmp.c                  | 62 ++++------------------
 net/ipv6/tcp_ipv6.c              |  6 ---
 10 files changed, 82 insertions(+), 230 deletions(-)

-- 
2.35.0.rc0.227.g00780c9af4-goog

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ