Would you consider the the following changes to switch_task_namespaces() ??
I've tested 3.2.1-stable: --- a/kernel/nsproxy.c 2011-12-08 17:46:59.000000000 -0500 +++ b/kernel/nsproxy.c 2012-01-24 10:30:06.000000000 -0500 @@ -222,7 +222,7 @@ void switch_task_namespaces(struct task_ * cannot release this nsproxy via the call_rcu() since * put_mnt_ns() will want to sleep */ - synchronize_rcu(); + synchronize_rcu_expedited(); free_nsproxy(ns); } } --- Perf results for setns(): # uname -a Linux zzzz 3.2.1-setns-synchronize-rcu-expedited-c #1 SMP Tue Jan 24 09:09:04 EST 2012 x86_64 GNU/Linux # ip netns list ns6 ns5 ns4 ns3 ns2 ns1 # for i in {1..100} ; do ./a.out ; done Performed 100 switches Microseconds per setns() call, average: 6 Performed 100 switches ... ... Performed 102 switches Microseconds per setns() call, average: 6 ---------------------------------------------------------------------- With: # uname -a Linux zzzz 3.2.1-stable #1 SMP Thu Jan 19 20:14:15 EST 2012 x86_64 GNU/Linux # ip netns list ns6 ns5 ns4 ns3 ns2 ns1 The same test app looping 100 times produced ~4454 microseconds per setns() call. -DilipD. ------------------------------------------------------------------------------ Keep Your Developer Skills Current with LearnDevNow! The most comprehensive online learning library for Microsoft developers is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3, Metro Style Apps, more. Free future releases when you subscribe now! http://p.sf.net/sfu/learndevnow-d2d _______________________________________________ Lxc-devel mailing list Lxc-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/lxc-devel