OpenVZ Forum


Home » Mailing lists » Devel » [RFD] net list protected by rcu
[RFD] net list protected by rcu [message #22616] Wed, 31 October 2007 14:42
Daniel Lezcano is currently offline  Daniel Lezcano
Messages: 417
Registered: June 2006
Senior Member
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.


_______________________________________________
Containers mailing list
Containers@lists.linux-foundation.org
https://lists.linux-foundation.org/mailman/listinfo/containers
Previous Topic: [PATCH] memory cgroup enhancements take 4 [1/8] fix zone handling in try_to_free_mem_cgroup_page
Next Topic: [PATCH] proc: Fix proc_kill_inodes to kill dentries on all proc superblocks
Goto Forum:
  


Current Time: Thu Aug 15 17:29:12 GMT 2024

Total time taken to generate the page: 0.02870 seconds