OpenVZ Forum - RDF feed
type: channel
items: Re: Pid namespaces problems
items: net namespace plans for 2.6.25 (was Re: Pid namespaces problems)
items: Re: net namespace plans for 2.6.25 (was Re: Pid namespaces problems)

Re: Pid namespaces problems
type: item
description: Pavel Emelyanov <xemul@openvz.org> writes: > Hi, Eric, Suka. > > Eric, you and Ulrich claim that pid namespaces are full of BUGs. > Can you please share you BUG list with me, so I could correct > mine. To be clear. I think the current pid namespace work is incomplete. I do not think the pid namespaces is fundamentally buggy the way Ingo and Ulrich were suggesting (my apologies for the delayed reply I have been away from my computer). I think I shared just about everything I know of off the top of my head in earlier threads. But I haven't tried to find an exhaustive list of uncorrected code as they pop up fairly easily when I audit various pid users. Which lead me to conclude that the pid namespace is not complete. > Things as I see them now are the following: > 1. signals delivery is not perfect in the namespace > 2. fs/lock.c will report wrong ids in the namespace > 3. some kernel threads (nfs) still use old api (relevant > for a namespace only) > 4. tsk->pid and tsk->tgid should not be explicitly used A wrapper that gets those values for use in printk. As a general principle I am opposed to using global pid values (except in kernel print statements). Using them we continue to have pid wrap around issues if we store them, and mixing global pid_t values and non-global pid_t values is all too possible. For example: fs/autofs/inode.c: line 83 *pgrp = task_pgrp_nr(current); fs/autofs/inode.c: line 117: *pgrp = option; We are simultaneously assigning a global pid and a pid from the current pid namespace to the same variable. Ouch! Used in anything but the init_pid namespace that code is wrong. So with stupid things like that I would very much like to convert everything to storing and comparing struct pid pointers which have essentially the same cost as pid_t values, can be used the same way, but cannot be accidentally mixed with with pid_t operations. So they are just less error prone. > I'd appreciate some specific information, like "the ttys > in drivers/char/tty_io.c…
creator: ebiederm
date: 2007-11-04T04:06:48-00:00

Re: Pid namespaces problems
type: item
description: Eric W. Biederman wrote: > Pavel Emelyanov <xemul@openvz.org> writes: > >> Hi, Eric, Suka. >> >> Eric, you and Ulrich claim that pid namespaces are full of BUGs. >> Can you please share you BUG list with me, so I could correct >> mine. > > To be clear. I think the current pid namespace work is incomplete. > I do not think the pid namespaces is fundamentally buggy the way > Ingo and Ulrich were suggesting (my apologies for the delayed > reply I have been away from my computer). Thanks :) > I think I shared just about everything I know of off the top > of my head in earlier threads. But I haven't tried to > find an exhaustive list of uncorrected code as they pop > up fairly easily when I audit various pid users. Which > lead me to conclude that the pid namespace is not complete. > >> Things as I see them now are the following: >> 1. signals delivery is not perfect in the namespace >> 2. fs/lock.c will report wrong ids in the namespace >> 3. some kernel threads (nfs) still use old api (relevant >> for a namespace only) >> 4. tsk->pid and tsk->tgid should not be explicitly used > A wrapper that gets those values for use in printk. > > As a general principle I am opposed to using global pid values > (except in kernel print statements). Using them we continue > to have pid wrap around issues if we store them, and mixing > global pid_t values and non-global pid_t values is all too possible. > > For example: > fs/autofs/inode.c: line 83 *pgrp = task_pgrp_nr(current); > fs/autofs/inode.c: line 117: *pgrp = option; > > We are simultaneously assigning a global pid and a pid from > the current pid namespace to the same variable. Ouch! Yup. I agree with this too. I'm about to deprecate the pid and tgid fields in the task_struct (but not remove to make printk-s faster and smaller). The work is in progress here. > Used in anything but the init_pid namespace that code is wrong. > > So with stupid things like that I would very much like to > convert everything to storing and compari…
creator: Pavel Emelianov
date: 2007-11-06T07:39:00-00:00

Re: Pid namespaces problems
type: item
description: Pavel Emelyanov <xemul@openvz.org> writes: > Yup. I agree with this too. I'm about to deprecate the pid and tgid > fields in the task_struct (but not remove to make printk-s faster > and smaller). > > The work is in progress here. Last time I looked at the printks, it looked to me like we wanted to print both the global pid and tsk->comm. When we printed which process did what, and helpers to do that would be nice. printk of any of this information is rare enough that size is the important thing not speed. I'm hoping we can come up with a nice wrapper to use with printk that we can bury all of the logic in. Possibly something like NIP_QUAD. >> >> - We need to store a struct pid reference on the sysvipc semaphores (and >> probably the other sysvipc objects) so that if they are used across >> namespace boundaries we can convert and give processes the pid for >> their local namespace. > > Hm.. What if they are used across two not-connected namespaces? E.g. > two different children of init namespace? Well we get a 0 pid value. But at least we get a correct pid value when they are mixed in a way that it possible to have one. There are also the credentials for AF_UNIX sockets that need this same treatment. >> - There are several architectures with their own signal functions for >> other OS compatibility that have are using _pid and not _vpid >> variants of functions. (irix and solaris) >> arch/mips/kernel/irixsig.c:irix_waitsys >> arch/mips/kernel/sysirix.c:irix_setpgrp >> arch/sparc64/solaris/misc.c:solaris_procids > > Ok. Looks like your list is the same as mine. That's good to hear > that I haven't missed anything important. I guess there are also all of the things we have been discussing with respect to signals, and clone semantics. In particular after having looked at the issue it looks like we can send signals between namespaces, and it doesn't look like it is going to hard to support setting si_pid properly. So because we can do that I don't see any reason for the …
creator: ebiederm
date: 2007-11-06T16:28:19-00:00

Re: Pid namespaces problems
type: item
description: Cedric Le Goater wrote: >>> - There are several architectures with their own signal functions for >>> other OS compatibility that have are using _pid and not _vpid >>> variants of functions. (irix and solaris) >>> arch/mips/kernel/irixsig.c:irix_waitsys >>> arch/mips/kernel/sysirix.c:irix_setpgrp >>> arch/sparc64/solaris/misc.c:solaris_procids >> Ok. Looks like your list is the same as mine. That's good to hear >> that I haven't missed anything important. > > We've also talked about af_unix credentials. > >> So, I see that you're about to take a closer look at the pid >> namespaces. If so, then what time can we expect the net namespace >> activity to go on? Or (if you don't mind) can we start merging >> the patches to David as soon as he opens his 2.6.25 merge window? > > I think daniel and benjamin are also getting ready for the 2.6.25 > merge window. Yes, right. We are identifying the ipv4 subset patches to send to David. _______________________________________________ Containers mailing list Containers@lists.linux-foundation.org https://lists.linux-foundation.org/mailman/listinfo/containers
creator: Daniel Lezcano
date: 2007-11-07T08:18:30-00:00

Re: Pid namespaces problems
type: item
description: > >> - There are several architectures with their own signal functions for >> other OS compatibility that have are using _pid and not _vpid >> variants of functions. (irix and solaris) >> arch/mips/kernel/irixsig.c:irix_waitsys >> arch/mips/kernel/sysirix.c:irix_setpgrp >> arch/sparc64/solaris/misc.c:solaris_procids > > Ok. Looks like your list is the same as mine. That's good to hear > that I haven't missed anything important. We've also talked about af_unix credentials. > So, I see that you're about to take a closer look at the pid > namespaces. If so, then what time can we expect the net namespace > activity to go on? Or (if you don't mind) can we start merging > the patches to David as soon as he opens his 2.6.25 merge window? I think daniel and benjamin are also getting ready for the 2.6.25 merge window. C. _______________________________________________ Containers mailing list Containers@lists.linux-foundation.org https://lists.linux-foundation.org/mailman/listinfo/containers
creator: Cedric Le Goater
date: 2007-11-07T08:28:29-00:00

Re: Pid namespaces problems
type: item
description: Cedric Le Goater wrote: >>> - There are several architectures with their own signal functions for >>> other OS compatibility that have are using _pid and not _vpid >>> variants of functions. (irix and solaris) >>> arch/mips/kernel/irixsig.c:irix_waitsys >>> arch/mips/kernel/sysirix.c:irix_setpgrp >>> arch/sparc64/solaris/misc.c:solaris_procids >> Ok. Looks like your list is the same as mine. That's good to hear >> that I haven't missed anything important. > > We've also talked about af_unix credentials. > >> So, I see that you're about to take a closer look at the pid >> namespaces. If so, then what time can we expect the net namespace >> activity to go on? Or (if you don't mind) can we start merging >> the patches to David as soon as he opens his 2.6.25 merge window? > > I think daniel and benjamin are also getting ready for the 2.6.25 > merge window. Yes. It can be cool if we can sync up Benjamin, Pavel, Denis, Eric and I with the different parts to be posted. Benjamin and I we began to look at ipv4. This is a big part, perhaps we can split that into several subset and dispatch them, except if Pavel and Denis already rebase ipv4 for net-2.6, in this case feel free to send them out. _______________________________________________ Containers mailing list Containers@lists.linux-foundation.org https://lists.linux-foundation.org/mailman/listinfo/containers
creator: Daniel Lezcano
date: 2007-11-07T09:00:23-00:00

Re: Pid namespaces problems
type: item
description: Daniel Lezcano wrote: > Cedric Le Goater wrote: >>>> - There are several architectures with their own signal functions for >>>> other OS compatibility that have are using _pid and not _vpid >>>> variants of functions. (irix and solaris) >>>> arch/mips/kernel/irixsig.c:irix_waitsys >>>> arch/mips/kernel/sysirix.c:irix_setpgrp >>>> arch/sparc64/solaris/misc.c:solaris_procids >>> Ok. Looks like your list is the same as mine. That's good to hear >>> that I haven't missed anything important. >> We've also talked about af_unix credentials. >> >>> So, I see that you're about to take a closer look at the pid >>> namespaces. If so, then what time can we expect the net namespace >>> activity to go on? Or (if you don't mind) can we start merging >>> the patches to David as soon as he opens his 2.6.25 merge window? >> I think daniel and benjamin are also getting ready for the 2.6.25 >> merge window. > > Yes. It can be cool if we can sync up Benjamin, Pavel, Denis, Eric and I > with the different parts to be posted. Yup. Team work will give us a chance to get in to the 2.6.25 with the core virtualization. By core I mean unix, netlinux, ipv4 and ipv6. Netfilters virtualization is a complex task :) > Benjamin and I we began to look > at ipv4. This is a big part, perhaps we can split that into several > subset and dispatch them, except if Pavel and Denis already rebase ipv4 > for net-2.6, in this case feel free to send them out. Well, actually we have almost moved to the net-2.6 with the ipv4 set. There are only some minor (I hope they are minor ;)) things. So we would be glad to go on with ipv4 further. What's up with the ipv6 patches, Daniel? You said that you and Benjamin make some big progress in this area, no? Thanks, Pavel _______________________________________________ Containers mailing list Containers@lists.linux-foundation.org https://lists.linux-foundation.org/mailman/listinfo/containers
creator: Pavel Emelianov
date: 2007-11-07T16:12:14-00:00

Re: Pid namespaces problems
type: item
description: Pavel Emelyanov wrote: > Daniel Lezcano wrote: >> Cedric Le Goater wrote: >>>>> - There are several architectures with their own signal functions for >>>>> other OS compatibility that have are using _pid and not _vpid >>>>> variants of functions. (irix and solaris) >>>>> arch/mips/kernel/irixsig.c:irix_waitsys >>>>> arch/mips/kernel/sysirix.c:irix_setpgrp >>>>> arch/sparc64/solaris/misc.c:solaris_procids >>>> Ok. Looks like your list is the same as mine. That's good to hear >>>> that I haven't missed anything important. >>> We've also talked about af_unix credentials. >>> >>>> So, I see that you're about to take a closer look at the pid >>>> namespaces. If so, then what time can we expect the net namespace >>>> activity to go on? Or (if you don't mind) can we start merging >>>> the patches to David as soon as he opens his 2.6.25 merge window? >>> I think daniel and benjamin are also getting ready for the 2.6.25 >>> merge window. >> Yes. It can be cool if we can sync up Benjamin, Pavel, Denis, Eric and I >> with the different parts to be posted. > > Yup. Team work will give us a chance to get in to the 2.6.25 with > the core virtualization. By core I mean unix, netlinux, ipv4 and ipv6. Yeah, if we can push these protocols in time, that will be *very very* cool :) When you talk about ipv4/ipv6 do you include tcp/udp ? > Netfilters virtualization is a complex task :) > >> Benjamin and I we began to look >> at ipv4. This is a big part, perhaps we can split that into several >> subset and dispatch them, except if Pavel and Denis already rebase ipv4 >> for net-2.6, in this case feel free to send them out. > > Well, actually we have almost moved to the net-2.6 with the ipv4 > set. Excellent ! Did you took the different patches I sent for udplite and multicast ? If you rebased netns49 to net-2.6 and you plan to keep synced with the Dave Miller tree, perhaps it is time to switch the git tree. It can be cool if you can put a git tree at openvz. > There are only some minor (I …
creator: Daniel Lezcano
date: 2007-11-07T17:24:12-00:00

Re: Pid namespaces problems
type: item
description: Daniel Lezcano wrote: > Pavel Emelyanov wrote: >> Daniel Lezcano wrote: >>> Cedric Le Goater wrote: >>>>>> - There are several architectures with their own signal functions for >>>>>> other OS compatibility that have are using _pid and not _vpid >>>>>> variants of functions. (irix and solaris) >>>>>> arch/mips/kernel/irixsig.c:irix_waitsys >>>>>> arch/mips/kernel/sysirix.c:irix_setpgrp >>>>>> arch/sparc64/solaris/misc.c:solaris_procids >>>>> Ok. Looks like your list is the same as mine. That's good to hear >>>>> that I haven't missed anything important. >>>> We've also talked about af_unix credentials. >>>> >>>>> So, I see that you're about to take a closer look at the pid >>>>> namespaces. If so, then what time can we expect the net namespace >>>>> activity to go on? Or (if you don't mind) can we start merging >>>>> the patches to David as soon as he opens his 2.6.25 merge window? >>>> I think daniel and benjamin are also getting ready for the 2.6.25 >>>> merge window. >>> Yes. It can be cool if we can sync up Benjamin, Pavel, Denis, Eric and I >>> with the different parts to be posted. >> Yup. Team work will give us a chance to get in to the 2.6.25 with >> the core virtualization. By core I mean unix, netlinux, ipv4 and ipv6. > > Yeah, if we can push these protocols in time, that will be *very very* > cool :) > > When you talk about ipv4/ipv6 do you include tcp/udp ? > >> Netfilters virtualization is a complex task :) >> >>> Benjamin and I we began to look >>> at ipv4. This is a big part, perhaps we can split that into several >>> subset and dispatch them, except if Pavel and Denis already rebase ipv4 >>> for net-2.6, in this case feel free to send them out. >> Well, actually we have almost moved to the net-2.6 with the ipv4 >> set. > > Excellent ! > Did you took the different patches I sent for udplite and multicast ? Not yet, sorry. But we will look at them as soon as we finish with the existing netns tree. > If you rebased netns49 to net-2.6 and you plan to kee…
creator: Pavel Emelianov
date: 2007-11-08T10:40:37-00:00

Re: Pid namespaces problems
type: item
description: Daniel Lezcano wrote: > * the first one is the locking of the network namespace list by > rtnl_lock, so from the timer callback we can not browse the network > namespace list to check the age of the routes. It is a problem I would > like to talk with Denis if he has time >From my point of view, the situation is clear. The timer should be per/namespace. The situation is completely different as one in IPv4. > * the loopback refcounting is not correctly handled in ipv6. This > protocol do not expect to have the loopback to be unregistered, so there > is some problem with the addr_ifdown function when exiting the network > namespace I think that default routing targets and similar staff should be dynamically allocated as a start and submitted now. No need to wait NETNS infrastructure. I have sent similar cleanup for fib rules recently. No answer from David yet. _______________________________________________ Containers mailing list Containers@lists.linux-foundation.org https://lists.linux-foundation.org/mailman/listinfo/containers
creator: den
date: 2007-11-08T10:51:15-00:00

Re: Pid namespaces problems
type: item
description: Pavel Emelyanov wrote: > Daniel Lezcano wrote: >> Pavel Emelyanov wrote: >>> Daniel Lezcano wrote: >>>> Cedric Le Goater wrote: >>>>>>> - There are several architectures with their own signal functions for >>>>>>> other OS compatibility that have are using _pid and not _vpid >>>>>>> variants of functions. (irix and solaris) >>>>>>> arch/mips/kernel/irixsig.c:irix_waitsys >>>>>>> arch/mips/kernel/sysirix.c:irix_setpgrp >>>>>>> arch/sparc64/solaris/misc.c:solaris_procids >>>>>> Ok. Looks like your list is the same as mine. That's good to hear >>>>>> that I haven't missed anything important. >>>>> We've also talked about af_unix credentials. >>>>> >>>>>> So, I see that you're about to take a closer look at the pid >>>>>> namespaces. If so, then what time can we expect the net namespace >>>>>> activity to go on? Or (if you don't mind) can we start merging >>>>>> the patches to David as soon as he opens his 2.6.25 merge window? >>>>> I think daniel and benjamin are also getting ready for the 2.6.25 >>>>> merge window. >>>> Yes. It can be cool if we can sync up Benjamin, Pavel, Denis, Eric and I >>>> with the different parts to be posted. >>> Yup. Team work will give us a chance to get in to the 2.6.25 with >>> the core virtualization. By core I mean unix, netlinux, ipv4 and ipv6. >> Yeah, if we can push these protocols in time, that will be *very very* >> cool :) >> >> When you talk about ipv4/ipv6 do you include tcp/udp ? >> >>> Netfilters virtualization is a complex task :) >>> >>>> Benjamin and I we began to look >>>> at ipv4. This is a big part, perhaps we can split that into several >>>> subset and dispatch them, except if Pavel and Denis already rebase ipv4 >>>> for net-2.6, in this case feel free to send them out. >>> Well, actually we have almost moved to the net-2.6 with the ipv4 >>> set. >> Excellent ! >> Did you took the different patches I sent for udplite and multicast ? > > Not yet, sorry. But we will look at them as soon as we finish with > the existing ne…
creator: Daniel Lezcano
date: 2007-11-08T11:07:48-00:00

Re: Pid namespaces problems
type: item
description: Denis V. Lunev wrote: > Daniel Lezcano wrote: > >> * the first one is the locking of the network namespace list by >> rtnl_lock, so from the timer callback we can not browse the network >> namespace list to check the age of the routes. It is a problem I would >> like to talk with Denis if he has time > > From my point of view, the situation is clear. The timer should be > per/namespace. The situation is completely different as one in IPv4. We thought to make a timer per namespace for ipv6, but we are a little afraid for the performances when there will be a lot of containers. Anyway, we can do a timer per namespace and optimize that later. I will cook a new patch to take into account that for the next week. >> * the loopback refcounting is not correctly handled in ipv6. This >> protocol do not expect to have the loopback to be unregistered, so there >> is some problem with the addr_ifdown function when exiting the network >> namespace > > I think that default routing targets and similar staff should be > dynamically allocated as a start and submitted now. No need to wait > NETNS infrastructure. I have sent similar cleanup for fib rules > recently. No answer from David yet. Interesting. _______________________________________________ Containers mailing list Containers@lists.linux-foundation.org https://lists.linux-foundation.org/mailman/listinfo/containers
creator: Daniel Lezcano
date: 2007-11-08T13:29:03-00:00

Re: Pid namespaces problems
type: item
description: Daniel Lezcano wrote: > Denis V. Lunev wrote: >> Daniel Lezcano wrote: >> >>> * the first one is the locking of the network namespace list by >>> rtnl_lock, so from the timer callback we can not browse the network >>> namespace list to check the age of the routes. It is a problem I would >>> like to talk with Denis if he has time >> From my point of view, the situation is clear. The timer should be >> per/namespace. The situation is completely different as one in IPv4. > > We thought to make a timer per namespace for ipv6, but we are a little > afraid for the performances when there will be a lot of containers. > Anyway, we can do a timer per namespace and optimize that later. I will > cook a new patch to take into account that for the next week. I propose to start a new mailing thread for net namespaces discussions or at least change this one's subject ;) >>> * the loopback refcounting is not correctly handled in ipv6. This >>> protocol do not expect to have the loopback to be unregistered, so there >>> is some problem with the addr_ifdown function when exiting the network >>> namespace >> I think that default routing targets and similar staff should be >> dynamically allocated as a start and submitted now. No need to wait >> NETNS infrastructure. I have sent similar cleanup for fib rules >> recently. No answer from David yet. > > Interesting. > _______________________________________________ Containers mailing list Containers@lists.linux-foundation.org https://lists.linux-foundation.org/mailman/listinfo/containers
creator: Pavel Emelianov
date: 2007-11-08T13:37:38-00:00

Re: Pid namespaces problems
type: item
description: Daniel Lezcano wrote: > Denis V. Lunev wrote: >> Daniel Lezcano wrote: >> >>> * the first one is the locking of the network namespace list by >>> rtnl_lock, so from the timer callback we can not browse the network >>> namespace list to check the age of the routes. It is a problem I would >>> like to talk with Denis if he has time >> >> From my point of view, the situation is clear. The timer should be >> per/namespace. The situation is completely different as one in IPv4. > > We thought to make a timer per namespace for ipv6, but we are a little > afraid for the performances when there will be a lot of containers. > Anyway, we can do a timer per namespace and optimize that later. I will > cook a new patch to take into account that for the next week. IMHO not a problem. tcp_write_timer is per/socket timer. If this works efficiently, per/namespace one will work also. _______________________________________________ Containers mailing list Containers@lists.linux-foundation.org https://lists.linux-foundation.org/mailman/listinfo/containers
creator: den
date: 2007-11-08T13:41:52-00:00

net namespace plans for 2.6.25 (was Re: Pid namespaces problems)
type: item
description: Pavel Emelyanov wrote: > Daniel Lezcano wrote: >> Denis V. Lunev wrote: >>> Daniel Lezcano wrote: >>> >>>> * the first one is the locking of the network namespace list by >>>> rtnl_lock, so from the timer callback we can not browse the network >>>> namespace list to check the age of the routes. It is a problem I would >>>> like to talk with Denis if he has time >>> From my point of view, the situation is clear. The timer should be >>> per/namespace. The situation is completely different as one in IPv4. >> We thought to make a timer per namespace for ipv6, but we are a little >> afraid for the performances when there will be a lot of containers. >> Anyway, we can do a timer per namespace and optimize that later. I will >> cook a new patch to take into account that for the next week. > > I propose to start a new mailing thread for net namespaces discussions > or at least change this one's subject ;) done. C. _______________________________________________ Containers mailing list Containers@lists.linux-foundation.org https://lists.linux-foundation.org/mailman/listinfo/containers
creator: Cedric Le Goater
date: 2007-11-08T13:42:25-00:00

Re: net namespace plans for 2.6.25 (was Re: Pid namespaces problems)
type: item
description: Denis V. Lunev wrote: > Daniel Lezcano wrote: >> Denis V. Lunev wrote: >>> Daniel Lezcano wrote: >>> >>>> * the first one is the locking of the network namespace list by >>>> rtnl_lock, so from the timer callback we can not browse the network >>>> namespace list to check the age of the routes. It is a problem I would >>>> like to talk with Denis if he has time >>> From my point of view, the situation is clear. The timer should be >>> per/namespace. The situation is completely different as one in IPv4. >> We thought to make a timer per namespace for ipv6, but we are a little >> afraid for the performances when there will be a lot of containers. >> Anyway, we can do a timer per namespace and optimize that later. I will >> cook a new patch to take into account that for the next week. > > IMHO not a problem. tcp_write_timer is per/socket timer. If this works > efficiently, per/namespace one will work also. That's right, this is a good argument. By the way, the amount of work to be done in the tcp_write_timer is perhaps smaller than the one done in the ipv6 routing age check, no ? Anyway, I'm not against a timer per namespace in this case, I already did a try before rolling back to a for_each_net in the gc timer, that changes a little the API, but nothing we can handle easily. _______________________________________________ Containers mailing list Containers@lists.linux-foundation.org https://lists.linux-foundation.org/mailman/listinfo/containers
creator: Daniel Lezcano
date: 2007-11-08T13:45:33-00:00

Re: net namespace plans for 2.6.25 (was Re: Pid namespaces problems)
type: item
description: Daniel Lezcano wrote: > Denis V. Lunev wrote: > > Daniel Lezcano wrote: > >> Denis V. Lunev wrote: > >>> Daniel Lezcano wrote: > >>> > >>>> * the first one is the locking of the network namespace list by > >>>> rtnl_lock, so from the timer callback we can not browse the network > >>>> namespace list to check the age of the routes. It is a problem I would > >>>> like to talk with Denis if he has time > >>> From my point of view, the situation is clear. The timer should be > >>> per/namespace. The situation is completely different as one in IPv4. > >> We thought to make a timer per namespace for ipv6, but we are a little > >> afraid for the performances when there will be a lot of containers. > >> Anyway, we can do a timer per namespace and optimize that later. I will > >> cook a new patch to take into account that for the next week. > > > > IMHO not a problem. tcp_write_timer is per/socket timer. If this works > > efficiently, per/namespace one will work also. > > That's right, this is a good argument. By the way, the amount of work to > be done in the tcp_write_timer is perhaps smaller than the one done in > the ipv6 routing age check, no ? Anyway, I'm not against a timer per > namespace in this case, I already did a try before rolling back to a > for_each_net in the gc timer, that changes a little the API, but nothing We can easily make the netns list rcu protected to address this issue. If you're interested, I can prepare a patch tomorrow. > we can handle easily. > > _______________________________________________ Containers mailing list Containers@lists.linux-foundation.org https://lists.linux-foundation.org/mailman/listinfo/containers
creator: Pavel Emelianov
date: 2007-11-08T13:58:13-00:00

Re: net namespace plans for 2.6.25 (was Re: Pid namespaces problems)
type: item
description: Denis V. Lunev wrote: > Daniel Lezcano wrote: >> Denis V. Lunev wrote: >>> Daniel Lezcano wrote: >>>> Denis V. Lunev wrote: >>>>> Daniel Lezcano wrote: >>>>> >>>>>> * the first one is the locking of the network namespace list by >>>>>> rtnl_lock, so from the timer callback we can not browse the network >>>>>> namespace list to check the age of the routes. It is a problem I would >>>>>> like to talk with Denis if he has time >>>>> From my point of view, the situation is clear. The timer should be >>>>> per/namespace. The situation is completely different as one in IPv4. >>>> We thought to make a timer per namespace for ipv6, but we are a little >>>> afraid for the performances when there will be a lot of containers. >>>> Anyway, we can do a timer per namespace and optimize that later. I will >>>> cook a new patch to take into account that for the next week. >>> IMHO not a problem. tcp_write_timer is per/socket timer. If this works >>> efficiently, per/namespace one will work also. >> That's right, this is a good argument. By the way, the amount of work to >> be done in the tcp_write_timer is perhaps smaller than the one done in >> the ipv6 routing age check, no ? Anyway, I'm not against a timer per >> namespace in this case, I already did a try before rolling back to a >> for_each_net in the gc timer, that changes a little the API, but nothing >> we can handle easily. >> >> > I think you are wrong. The amount of work to "purge" all namespaces is a > constant in the IPv6 case, where we'll have per/namespace cache. So, for > a multiple timers model only multiple timer overhead counts and this > overhead is small, as timer list is efficient. > > This argument does not for for IPv4 case, where there is a one big cache > for all namespaces. Interesting, thanks for the precision. _______________________________________________ Containers mailing list Containers@lists.linux-foundation.org https://lists.linux-foundation.org/mailman/listinfo/containers
creator: Daniel Lezcano
date: 2007-11-08T14:00:03-00:00

Re: net namespace plans for 2.6.25 (was Re: Pid namespaces problems)
type: item
description: Daniel Lezcano wrote: > Denis V. Lunev wrote: >> Daniel Lezcano wrote: >>> Denis V. Lunev wrote: >>>> Daniel Lezcano wrote: >>>> >>>>> * the first one is the locking of the network namespace list by >>>>> rtnl_lock, so from the timer callback we can not browse the network >>>>> namespace list to check the age of the routes. It is a problem I would >>>>> like to talk with Denis if he has time >>>> From my point of view, the situation is clear. The timer should be >>>> per/namespace. The situation is completely different as one in IPv4. >>> We thought to make a timer per namespace for ipv6, but we are a little >>> afraid for the performances when there will be a lot of containers. >>> Anyway, we can do a timer per namespace and optimize that later. I will >>> cook a new patch to take into account that for the next week. >> >> IMHO not a problem. tcp_write_timer is per/socket timer. If this works >> efficiently, per/namespace one will work also. > > That's right, this is a good argument. By the way, the amount of work to > be done in the tcp_write_timer is perhaps smaller than the one done in > the ipv6 routing age check, no ? Anyway, I'm not against a timer per > namespace in this case, I already did a try before rolling back to a > for_each_net in the gc timer, that changes a little the API, but nothing > we can handle easily. > > I think you are wrong. The amount of work to "purge" all namespaces is a constant in the IPv6 case, where we'll have per/namespace cache. So, for a multiple timers model only multiple timer overhead counts and this overhead is small, as timer list is efficient. This argument does not for for IPv4 case, where there is a one big cache for all namespaces. _______________________________________________ Containers mailing list Containers@lists.linux-foundation.org https://lists.linux-foundation.org/mailman/listinfo/containers
creator: den
date: 2007-11-08T14:04:41-00:00

Re: net namespace plans for 2.6.25 (was Re: Pid namespaces problems)
type: item
description: Pavel Emelyanov wrote: > Daniel Lezcano wrote: >> Denis V. Lunev wrote: >> > Daniel Lezcano wrote: >> >> Denis V. Lunev wrote: >> >>> Daniel Lezcano wrote: >> >>> >> >>>> * the first one is the locking of the network namespace list by >> >>>> rtnl_lock, so from the timer callback we can not browse the network >> >>>> namespace list to check the age of the routes. It is a problem I would >> >>>> like to talk with Denis if he has time >> >>> From my point of view, the situation is clear. The timer should be >> >>> per/namespace. The situation is completely different as one in IPv4. >> >> We thought to make a timer per namespace for ipv6, but we are a little >> >> afraid for the performances when there will be a lot of containers. >> >> Anyway, we can do a timer per namespace and optimize that later. I will >> >> cook a new patch to take into account that for the next week. >> > >> > IMHO not a problem. tcp_write_timer is per/socket timer. If this works >> > efficiently, per/namespace one will work also. >> >> That's right, this is a good argument. By the way, the amount of work to >> be done in the tcp_write_timer is perhaps smaller than the one done in >> the ipv6 routing age check, no ? Anyway, I'm not against a timer per >> namespace in this case, I already did a try before rolling back to a >> for_each_net in the gc timer, that changes a little the API, but nothing > > We can easily make the netns list rcu protected to address this issue. > If you're interested, I can prepare a patch tomorrow. That would be great if you manage do it. This was our initial idea with Daniel, but as I have a limited knowledge of RCU, I didn't manage to obtain an acceptable patch. One of the more problematic area is rtnl_unlock(). Benjamin > >> we can handle easily. >> >> > > -- B e n j a m i n T h e r y - BULL/DT/Open Software R&D http://www.bull.com _______________________________________________ Containers mailing list Containers@lists.linux-foundation.org https://lists.linux-founda…
creator: Benjamin Thery
date: 2007-11-08T14:08:56-00:00

Re: net namespace plans for 2.6.25 (was Re: Pid namespaces problems)
type: item
description: Pavel Emelyanov wrote: > Daniel Lezcano wrote: >> Denis V. Lunev wrote: >> > Daniel Lezcano wrote: >> >> Denis V. Lunev wrote: >> >>> Daniel Lezcano wrote: >> >>> >> >>>> * the first one is the locking of the network namespace list by >> >>>> rtnl_lock, so from the timer callback we can not browse the network >> >>>> namespace list to check the age of the routes. It is a problem I would >> >>>> like to talk with Denis if he has time >> >>> From my point of view, the situation is clear. The timer should be >> >>> per/namespace. The situation is completely different as one in IPv4. >> >> We thought to make a timer per namespace for ipv6, but we are a little >> >> afraid for the performances when there will be a lot of containers. >> >> Anyway, we can do a timer per namespace and optimize that later. I will >> >> cook a new patch to take into account that for the next week. >> > >> > IMHO not a problem. tcp_write_timer is per/socket timer. If this works >> > efficiently, per/namespace one will work also. >> >> That's right, this is a good argument. By the way, the amount of work to >> be done in the tcp_write_timer is perhaps smaller than the one done in >> the ipv6 routing age check, no ? Anyway, I'm not against a timer per >> namespace in this case, I already did a try before rolling back to a >> for_each_net in the gc timer, that changes a little the API, but nothing > > We can easily make the netns list rcu protected to address this issue. > If you're interested, I can prepare a patch tomorrow. Sure, I'm interested :) Benjamin and I, we thought about using a rcu to avoid to use a timer per namespace in ipv6 but we faced to the problem with rtnl_unlock function when the network namespace is protected with the rtnl_lock/rtnl_unlock. In the function rtnl_unlock (not the one in net-2.6 but the one which is in netns49), there is loop, for_each_net, in this loop, we do rtnl_unlock, call sk_data_ready and take the lock again. If we are in rcu protected model, this loop wi…
creator: Daniel Lezcano
date: 2007-11-08T14:09:36-00:00

Re: net namespace plans for 2.6.25 (was Re: Pid namespaces problems)
type: item
description: Daniel Lezcano wrote: > Pavel Emelyanov wrote: >> Daniel Lezcano wrote: >>> Denis V. Lunev wrote: >>> > Daniel Lezcano wrote: >>> >> Denis V. Lunev wrote: >>> >>> Daniel Lezcano wrote: >>> >>> >>> >>>> * the first one is the locking of the network namespace list by >>> >>>> rtnl_lock, so from the timer callback we can not browse the network >>> >>>> namespace list to check the age of the routes. It is a problem I would >>> >>>> like to talk with Denis if he has time >>> >>> From my point of view, the situation is clear. The timer should be >>> >>> per/namespace. The situation is completely different as one in IPv4. >>> >> We thought to make a timer per namespace for ipv6, but we are a little >>> >> afraid for the performances when there will be a lot of containers. >>> >> Anyway, we can do a timer per namespace and optimize that later. I will >>> >> cook a new patch to take into account that for the next week. >>> > >>> > IMHO not a problem. tcp_write_timer is per/socket timer. If this works >>> > efficiently, per/namespace one will work also. >>> >>> That's right, this is a good argument. By the way, the amount of work to >>> be done in the tcp_write_timer is perhaps smaller than the one done in >>> the ipv6 routing age check, no ? Anyway, I'm not against a timer per >>> namespace in this case, I already did a try before rolling back to a >>> for_each_net in the gc timer, that changes a little the API, but nothing >> We can easily make the netns list rcu protected to address this issue. >> If you're interested, I can prepare a patch tomorrow. > > Sure, I'm interested :) > > Benjamin and I, we thought about using a rcu to avoid to use a timer per > namespace in ipv6 but we faced to the problem with rtnl_unlock function > when the network namespace is protected with the rtnl_lock/rtnl_unlock. > In the function rtnl_unlock (not the one in net-2.6 but the one which is > in netns49), there is loop, for_each_net, in this loop, we do > rtnl_unlock, call sk_data_ready and …
creator: Pavel Emelianov
date: 2007-11-09T10:14:32-00:00