net: Use a percpu_counter for sockets_allocated
Instead of using one atomic_t per protocol, use a percpu_counter for "sockets_allocated", to reduce cache line contention on heavy duty network servers. Note : We revert commit (248969ae net: af_unix can make unix_nr_socks visbile in /proc), since it is not anymore used after sock_prot_inuse_add() addition Signed-off-by:Eric Dumazet <dada1@cosmosbay.com> Signed-off-by:
David S. Miller <davem@davemloft.net>
Showing
- include/net/sctp/sctp.h 1 addition, 0 deletionsinclude/net/sctp/sctp.h
- include/net/sock.h 1 addition, 1 deletioninclude/net/sock.h
- include/net/tcp.h 1 addition, 1 deletioninclude/net/tcp.h
- net/core/sock.c 7 additions, 3 deletionsnet/core/sock.c
- net/ipv4/proc.c 2 additions, 1 deletionnet/ipv4/proc.c
- net/ipv4/tcp.c 6 additions, 2 deletionsnet/ipv4/tcp.c
- net/ipv4/tcp_ipv4.c 2 additions, 2 deletionsnet/ipv4/tcp_ipv4.c
- net/ipv6/tcp_ipv6.c 1 addition, 1 deletionnet/ipv6/tcp_ipv6.c
- net/sctp/protocol.c 5 additions, 1 deletionnet/sctp/protocol.c
- net/sctp/socket.c 3 additions, 3 deletionsnet/sctp/socket.c
- net/unix/af_unix.c 0 additions, 1 deletionnet/unix/af_unix.c
Loading
Please register or sign in to comment