netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net-next v2 0/3] ipv6: per netns FIB6 walkers and garbage collector
@ 2016-03-08 13:44 Michal Kubecek
  2016-03-08 13:44 ` [PATCH net-next v2 1/3] ipv6: replace global gc_args with local variable Michal Kubecek
                   ` (3 more replies)
  0 siblings, 4 replies; 8+ messages in thread
From: Michal Kubecek @ 2016-03-08 13:44 UTC (permalink / raw)
  To: David S. Miller
  Cc: netdev, linux-kernel, Alexey Kuznetsov, James Morris,
	Hideaki YOSHIFUJI, Patrick McHardy, Hannes Frederic Sowa,
	Martin KaFai Lau, Cong Wang

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(-)

-- 
2.7.2

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2016-03-08 20:17 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-03-08 13:44 [PATCH net-next v2 0/3] ipv6: per netns FIB6 walkers and garbage collector Michal Kubecek
2016-03-08 13:44 ` [PATCH net-next v2 1/3] ipv6: replace global gc_args with local variable Michal Kubecek
2016-03-08 18:25   ` Cong Wang
2016-03-08 13:44 ` [PATCH net-next v2 2/3] ipv6: per netns fib6 walkers Michal Kubecek
2016-03-08 18:34   ` Cong Wang
2016-03-08 13:44 ` [PATCH net-next v2 3/3] ipv6: per netns FIB garbage collection Michal Kubecek
2016-03-08 18:36   ` Cong Wang
2016-03-08 20:17 ` [PATCH net-next v2 0/3] ipv6: per netns FIB6 walkers and garbage collector David Miller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).