Skip to content

NET : struct proto diet

Eric Dumazet netdev 1 version Applied

Status from this message: Applied, and because I love DCCP I added the following

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest4 patches 1 replyApplied

Patches in v1 Applied

#Subject and filesSizeRepliesApplied
1/4NET : defines an infrastructure to keep 'inuse' changes in an efficent SMP/NUMA way.include/net/sock.h net/core/sock.c net/ipv4/proc.c +1 more+112 -370 replies
2/4NET : makes ipv4 use the {DEFINE|REF}_PROTO_INUSE infrastructurenet/ipv4/raw.c net/ipv4/tcp_ipv4.c net/ipv4/udp.c +1 more+12 -00 replies
3/4NET : makes ipv6 use the {DEFINE|REF}_PROTO_INUSE infrastructurenet/ipv6/raw.c net/ipv6/tcp_ipv6.c net/ipv6/udp.c +1 more+12 -00 replies
4/4NET : makes sctp use the {DEFINE|REF}_PROTO_INUSE infrastructurenet/sctp/socket.c+6 -00 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH 0/4] NET : struct proto diet

Hi

After reading David's machines have NR_CPUS set to 4096, I realized how fat was 'struct proto', since it uses a stats[NR_CPUS] field to keep track of inuse sockets per protocol.

With NR_CPUS = 4096, this means we allocate 4096*SMP_CACHE_BYTES bytes per 'struct proto'.
As these structures are static (data section of kernel), this grows data kernel section by 256 KB per protocol.

This patch series does some cleanup and optimization.

[PATCH 1/4] NET : defines an infrastructure to keep 'inuse' changes in an efficent SMP/NUMA way.

[PATCH 2/4] NET : makes ipv4 use the  {DEFINE|REF}_PROTO_INUSE infrastructure
[PATCH 3/4] NET : makes ipv6 use the  {DEFINE|REF}_PROTO_INUSE infrastructure
[PATCH 4/4] NET : makes sctp use the  {DEFINE|REF}_PROTO_INUSE infrastructure

Thank you
Eric