Re: [patch] PID namespaces

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Ingo Molnar
Date: Sunday, November 4, 2007 - 3:38 am

(changed the Subject line)

* Linus Torvalds <torvalds@linux-foundation.org> wrote:


the difference to NFS is that for PID namespaces we do have a single 
trusted kernel that fully controls all the domains so there's no obvious 
"hard barrier of trust" that people could perceive as a showstopper.

We've got a global kernel and unlike other namespaces there's (almost) 
no "directed allocation" done of specific PIDs (unlike files, socket 
addresses or fds). So the PID is a cookie that is 99.9% shaped _by the 
kernel already_. [there are a few exceptions but those are much less 
problematic than the lack of global PIDs is] So we might as well shape 
the cookies in a way that keeps them global. What is the technological 
reason for not keeping PIDs globally unique? We've cited a good number 
of reasons why it's desirable - it's a pretty damn useful cookie for 
identifying tasks. (it's also very scalable - PID -> task lookup is 
completely lockless.)

I.e. keep the namespace functionality but use a modulo 1.000.000 base 
for the PIDs so that it all looks nicer to the user. Minimal visibility 
difference but maximum compatibility. (The resulting limits are 
reasonable: 1 million tasks per container and 4 million containers on a 
single 32-bit box.) We could still restrict cross-namespace API use but 
all the cases where a global PID is desirable would still all work. I 
might be missing something obvious though.

The reason why i bring this up now is because 2.6.24 is an 
all-or-nothing flag day for this detail. Once it's out there we wont 
realistically be able to change any of these details. (And in general 
i'm very supportive of the containers concept - a year ago at the KS i 
was one of the very few proponents of quickly merging containers into 
the kernel.)

	Ingo
-
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[patch] PID namespace design bug, workaround, Ingo Molnar, (Thu Nov 1, 7:43 am)
Re: [patch] PID namespace design bug, workaround, Pavel Emelyanov, (Thu Nov 1, 7:51 am)
Re: [patch] PID namespace design bug, workaround, Ulrich Drepper, (Thu Nov 1, 7:53 am)
Re: [patch] PID namespace design bug, workaround, Peter Zijlstra, (Thu Nov 1, 7:56 am)
Re: [patch] PID namespace design bug, workaround, Ulrich Drepper, (Thu Nov 1, 7:56 am)
Re: [patch] PID namespace design bug, workaround, Pavel Emelyanov, (Thu Nov 1, 8:02 am)
Re: [patch] PID namespace design bug, workaround, Pavel Emelyanov, (Thu Nov 1, 8:05 am)
Re: [patch] PID namespace design bug, workaround, Ingo Molnar, (Thu Nov 1, 8:05 am)
Re: [patch] PID namespace design bug, workaround, Pavel Emelyanov, (Thu Nov 1, 8:06 am)
Re: [patch] PID namespace design bug, workaround, Ingo Molnar, (Thu Nov 1, 8:17 am)
Re: [patch] PID namespace design bug, workaround, Pavel Emelyanov, (Thu Nov 1, 8:30 am)
Re: [patch] PID namespace design bug, workaround, Dave Hansen, (Thu Nov 1, 9:12 am)
Re: [patch] PID namespace design bug, workaround, Theodore Tso, (Thu Nov 1, 11:57 am)
Re: [patch] PID namespace design bug, workaround, Ingo Molnar, (Thu Nov 1, 12:53 pm)
Re: [patch] PID namespace design bug, workaround, Ulrich Drepper, (Thu Nov 1, 5:21 pm)
Re: [patch] PID namespace design bug, workaround, Ulrich Drepper, (Thu Nov 1, 5:23 pm)
Re: [patch] PID namespace design bug, workaround, Pavel Emelyanov, (Fri Nov 2, 12:55 am)
Re: [patch] PID namespace design bug, workaround, Andrew Morton, (Fri Nov 2, 1:04 am)
Re: [patch] PID namespace design bug, workaround, Pavel Emelyanov, (Fri Nov 2, 1:14 am)
Re: [patch] PID namespace design bug, workaround, Ulrich Drepper, (Fri Nov 2, 7:05 am)
Re: [patch] PID namespace design bug, workaround, Pavel Emelyanov, (Fri Nov 2, 7:21 am)
Re: [patch] PID namespace design bug, workaround, Ulrich Drepper, (Fri Nov 2, 8:34 am)
Re: [patch] PID namespace design bug, workaround, Pavel Emelyanov, (Fri Nov 2, 8:58 am)
Re: [patch] PID namespace design bug, workaround, Dave Hansen, (Fri Nov 2, 10:30 am)
Re: [patch] PID namespace design bug, workaround, Linus Torvalds, (Fri Nov 2, 10:39 am)
Re: [patch] PID namespace design bug, workaround, Theodore Tso, (Fri Nov 2, 2:39 pm)
Re: [patch] PID namespace design bug, workaround, Nicholas Miell, (Fri Nov 2, 9:02 pm)
Re: [patch] PID namespace design bug, workaround, Ulrich Drepper, (Fri Nov 2, 9:34 pm)
Re: [patch] PID namespace design bug, workaround, Ingo Molnar, (Sat Nov 3, 1:12 pm)
Re: [patch] PID namespace design bug, workaround, Linus Torvalds, (Sat Nov 3, 3:40 pm)
Re: [patch] PID namespace design bug, workaround, Arjan van de Ven, (Sat Nov 3, 4:55 pm)
Re: [patch] PID namespace design bug, workaround, Eric W. Biederman, (Sun Nov 4, 12:17 am)
Re: [patch] PID namespaces, Ingo Molnar, (Sun Nov 4, 3:38 am)
Re: [patch] PID namespaces, Dave Hansen, (Sun Nov 4, 1:12 pm)
Re: [patch] PID namespaces, Denys Vlasenko, (Mon Nov 5, 7:47 am)
Re: [patch] PID namespace design bug, workaround, Pavel Emelyanov, (Tue Nov 6, 12:49 am)
Futexes and network filesystems., Er ic W. Biederman, (Tue Nov 20, 3:53 pm)
Re: Futexes and network filesystems., Kyle Moffett, (Tue Nov 20, 11:16 pm)
Re: Futexes and network filesystems., Eric W. Biederman, (Tue Nov 20, 11:30 pm)