Skip to content

tcp_metrics: Network namespace bloat reduction

Eric W. Biederman netdev 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest6 patches 16 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/6tcp_metrics: panic when tcp_metrics can not be allocatednet/ipv4/tcp_metrics.c+1 -02 replies
1/6tcp_metrics: panic when tcp_metrics_init fails.net/ipv4/tcp_metrics.c+3 -90 replies
2/6tcp_metrics: Mix the network namespace into the hash function.net/ipv4/tcp_metrics.c+5 -00 replies
2/6tcp_metrics: Mix the network namespace into the hash function.net/ipv4/tcp_metrics.c+5 -00 replies
3/6tcp_metrics: Add a field tcpm_net and verify it matches on lookupnet/ipv4/tcp_metrics.c+14 -58 replies
3/6tcp_metrics: Add a field tcpm_net and verify it matches on lookupnet/ipv4/tcp_metrics.c+19 -50 replies
4/6tcp_metrics: Remove the unused return code from tcp_metrics_flush_allnet/ipv4/tcp_metrics.c+5 -40 replies
4/6tcp_metrics: Remove the unused return code from tcp_metrics_flush_allnet/ipv4/tcp_metrics.c+5 -40 replies
5/6tcp_metrics: Rewrite tcp_metrics_flush_allnet/ipv4/tcp_metrics.c+11 -100 replies
5/6tcp_metrics: Rewrite tcp_metrics_flush_allnet/ipv4/tcp_metrics.c+11 -100 replies
6/6tcp_metrics: Use a single hash table for all network namespaces.include/net/netns/ipv4.h net/ipv4/tcp_metrics.c+37 -284 replies
6/6tcp_metrics: Use a single hash table for all network namespaces.include/net/netns/ipv4.h net/ipv4/tcp_metrics.c+30 -380 replies

Reviews trailers per patch

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

Read the v1 thread

Cover letter [PATCH net-next 0/6] tcp_metrics: Network namespace bloat reduction

This is a small pile of patches that convert tcp_metrics from using a hash table per network namespace to using a single hash table for all network namespaces.

This is broken up into several patches so that each small step along the way could be carefully scrutinized as I wrote it, and equally so that each small step can be reviewed.

There are two minor cleanups included. The addition of a missing panic when the tcp_metrics hash table can not be allocated during boot and the removal of the return code from tcp_metrics_flush_all

The motivation for this change is that the tcp_metrics hash table at 128KiB is the single largest component of a freshly allocated network namespace.

Eric W. Biederman (6):
tcp_metrics: panic when tcp_metrics can not be allocated
tcp_metrics: Mix the network namespace into the hash function.
tcp_metrics: Add a field tcpm_net and verify it matches on lookup
tcp_metrics: Remove the unused return code from tcp_metrics_flush_all
tcp_metrics: Rewrite tcp_metrics_flush_all
tcp_metrics: Use a single hash table for all network namespaces.

 include/net/netns/ipv4.h |   2 -
 net/ipv4/tcp_metrics.c   | 118 +++++++++++++++++++++++++++++------------------
 2 files changed, 73 insertions(+), 47 deletions(-)