From mboxrd@z Thu Jan 1 00:00:00 1970 From: Daniel Lezcano Subject: Re: [PATCH] [NETNS49] support for per/namespace routing cache cleanup Date: Fri, 19 Oct 2007 09:39:06 +0200 Message-ID: <47185F1A.6070600@fr.ibm.com> References: <20071017111215.GA29653@iris.sw.ru> <4715F60F.6060304@fr.ibm.com> <4716055D.4010102@sw.ru> <471610E8.8020008@fr.ibm.com> <471617CA.9090901@sw.ru> <471624C0.9020108@fr.ibm.com> <47164CBD.3040107@gmail.com> <471708D8.3080808@bull.net> <471772EB.2060206@sw.ru> <471789FD.5020802@bull.net> <4717AE7D.1060000@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <4717AE7D.1060000-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: containers-bounces-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org Errors-To: containers-bounces-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org To: "Denis V. Lunev" Cc: Linux Containers , "Denis V. Lunev" , ebiederm-aS9lmoZGLiVWk0Htik3J/w@public.gmane.org, Benjamin Thery List-Id: containers.vger.kernel.org Denis V. Lunev wrote: > Benjamin Thery wrote: >> Denis V. Lunev wrote: >>> Benjamin Thery wrote: >>>> Denis V. Lunev wrote: >>>>> Daniel Lezcano wrote: >>>>>> Oh, by the way, I forgot something important you spotted with the >>>>>> list >>>>>> protected by the mutex. >>>>>> >>>>>> When looking at ipv6/fib_hash.c with Benjamin, we need to browse the >>>>>> network namespaces list for the garbage collecting, but we are in an >>>>>> interrupt handler, so I can not use rtnl_lock. >>>>> where exactly.... >>>> Actually, it is in net/ipv6/ip6_fib.c, in fib6_clean_all(). >>>> >>>> fib6_clean_all() is called by fib6_run_gc() handler of the >>>> ip6_fib_timer. If we don't want to have one such timer per net >>>> namespace, in fib6_clean_all() we have to go through all net to clean >>>> their own >>>> fib_table_hash (using for_each_net() protected by rtnl_lock). >>> after careful thinking, one timer per/namespace looks better for me :) >> >> Why? :) >> Then you'll have to find a way pass the target net to fib6_run_gc() >> (the timer handler). current->nsproxy->net_ns won't work :) > > sorry for spam :) forget to mention that the namespace can be passed via > timer data :) yes - additional structure will be required > > By the way, why do you, guys, so dislike our approach :) In that case > there will be no problem to get context from currrent. Yes. In soft > interrupt also :)) the approach of the patchset is : we don't use current->nsproxy->net_ns.