[patch -mm 08/17] nsproxy: add hashtable

Cedric Le Goater clg at fr.ibm.com
Wed Dec 13 06:44:06 PST 2006


Eric W. Biederman wrote:
> Cedric Le Goater <clg at fr.ibm.com> writes:
> 
>> Serge E. Hallyn wrote:
>>> Well, assuming that we're using pids as identifiers, that means
>> we can't because a process could die while the namespace is still
>> referenced by an other subsystem. We need some kind of id.
> 
> Think of a session think of a process group heck think of threads
> a pid is not tied to one task struct.  It is absolutely not a problem
> for a namespace to do get_pid(...) when it is initialized and put_pid(...)
> just before it is freed.
> 
> All of the mechanisms for using pids for something like this are already
> in place.
> 
> What we don't have is a fast pid to namespace transfer. But that is just
> an extra pointer in struct pid.  Really that is a trivial patch.
> Giving every namespace a pid pointer in struct pid takes a little more
> space then I would like but it is not a big deal.

I'm not sure I understand how you want to do this. 

Let me try : you would add a 'struct pid pid' field to all namespaces and
assign that 'pid' field  with the struct pid of the task creating the
namespace ? 

C.



More information about the Containers mailing list