Linux Container Development
 help / color / mirror / Atom feed
* [RFD] net list protected by rcu
@ 2007-10-31 14:42 Daniel Lezcano
  0 siblings, 0 replies; only message in thread
From: Daniel Lezcano @ 2007-10-31 14:42 UTC (permalink / raw)
  To: Eric W. Biederman, Denis V. Lunev, Benjamin Thery
  Cc: container >> Linux Containers

Hi,

Benjamin and I, we are currently looking for using IPV6 for the network 
namespaces.

There is a special case where we must browse the network namespace list 
to check the routes ages at a given time for garbage collecting.

fib6_run_gc
  => fib6_clean_all

In this function we browse the network namespace list with the usual 
macro: for_each_net, which should be protected by rtnl_lock.

The function fib6_run_gc is a timer callback, that means we are called 
from interrupt handler. But in this case, we can not use rtnl_lock 
because it locks a mutex and this is forbidden to do that from an 
interrupt handler.

If we put apart the fact there is perhaps a better solution than 
browsing the netns list (eg. make a gc timer per namespace), can we 
consider to simply use the RCU to lock the network namespace list ?

So we can remove the rtnl_lock calls in the network namespaces and just 
use rcu_read_lock for browsing the netns list in the network code. That 
will be more flexible, we can use it in interrupt handler, we can nest 
with another rcu_read_lock and we don't add more locking contention for 
the network.

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2007-10-31 14:42 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-10-31 14:42 [RFD] net list protected by rcu Daniel Lezcano

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox