Skip to content

ipv6: per netns FIB6 walkers and garbage collector

Michal Kubecek lkml netdev 2 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest3 patches 4 repliesIn review
  2. v13 patches 5 repliesSuperseded

Patches in v2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/3ipv6: replace global gc_args with local variablenet/ipv6/ip6_fib.c+8 -61 reply
2/3ipv6: per netns fib6 walkersinclude/net/netns/ipv6.h net/ipv6/ip6_fib.c+38 -321 reply
3/3ipv6: per netns FIB garbage collectioninclude/net/netns/ipv6.h net/ipv6/ip6_fib.c+5 -51 reply

Reviews trailers per patch

All 3 patches have a Reviewed-by or Acked-by.

PatchCong Wang
1/3R-b
2/3R-b
3/3R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v2 thread

Cover letter [PATCH net-next v2 0/3] ipv6: per netns FIB6 walkers and garbage collector

Commit 2ac3ac8f86f2 ("ipv6: prevent fib6_run_gc() contention") reduced the risk of contention on FIB6 garbage collector lock on systems with many CPUs. However, one of our customers can still observe heavy contention on fib6_gc_lock which can even trigger the soft lockup detector.

This is caused by garbage collector running in forced mode from a timer. While there is one timer per network namespace, the instances of fib6_run_gc() running from them are protected by one global spinlock so that only one garbage collector can run at any moment and other namespaces have to wait. As most relevant data structures are separated per netns, there is little reason for garbage collectors blocking each other.

Similar problem exists for walkers: changes in one tree do not need to adjust (and block) walkers traversing FIB trees in other namespaces.

This series separates both the walkers infrastructure and garbage collector so that they work independently in network namespaces.

v2: get rid of ifdef in ipv6_route_seq_setup_walk(), pass net from callers instead

Michal Kubecek (3):
ipv6: replace global gc_args with local variable
ipv6: per netns fib6 walkers
ipv6: per netns FIB garbage collection

 include/net/netns/ipv6.h |  3 ++
 net/ipv6/ip6_fib.c       | 91 +++++++++++++++++++++++++-----------------------
 2 files changed, 51 insertions(+), 43 deletions(-)
Signature · 1 line
2.7.2