Hey,
On Tue, Feb 10, 2015 at 11:02:40PM -0600, Eric W. Biederman wrote: > A slightly off topic comment, for where this thread has gone but > relevant if we are talking about cgroup namespaces. > > If don't implement compatibility with existing userspace, they get a > nack. A backwards-incompatible change should figure out how to remove > the need for any namespaces. > > Because that is what namespaces are about backwards compatibility. Are you claiming that namespaces are soley about backwards compatibility? ie. to trick userland into scoping without letting it notice? That's a very restricted view and namespaces do provide further isolation capabilties in addition to what can be achieved otherwise and it is logical to collect simliar funtionalities there. Thanks. -- tejun -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [hidden email] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/ |
Tejun Heo <[hidden email]> writes:
> Hey, > > On Tue, Feb 10, 2015 at 11:02:40PM -0600, Eric W. Biederman wrote: >> A slightly off topic comment, for where this thread has gone but >> relevant if we are talking about cgroup namespaces. >> >> If don't implement compatibility with existing userspace, they get a >> nack. A backwards-incompatible change should figure out how to remove >> the need for any namespaces. >> >> Because that is what namespaces are about backwards compatibility. > > Are you claiming that namespaces are soley about backwards > compatibility? ie. to trick userland into scoping without letting it > notice? That's a very restricted view and namespaces do provide > further isolation capabilties in addition to what can be achieved > otherwise and it is logical to collect simliar funtionalities there. In principle a namespace is an additional layer of indirection from names to objects. A namespace does not invent new kinds of objects. A namespace takes things that were previously global and gives them a scope. In princple after name resolution a namespace should impose no overhead. In general namespaces are not necessary if your scope of names already has hierarchy. Which means that new interfaces can almost always be designed in such a way that you can support containers without needing to add any special namespace support. Which typically results in more flexible and useful APIs for everyone, with no real code cost. Further in the cgroup namespace patchset I looked at a while ago, the only reason for having a cgroup namespace was to provide a measure of backwards compatibility with existing userspace. I expect removing the /proc/<pid>/cgroup file and replacing it with something in cgroupfs itself would serve just as well if backwards compatibility is not the objective. Or possibly replacincg /proc/<pid>/cgroup into a magic symlink onto somewhere in the unified cgroupfs itself. I just don't see any point in doing weird silly namespace things to keep existing userspace working when the existing userspace won't work. As such if a namespace doesn't implement compatibility with the existing userspace it gets my nack. Eric -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [hidden email] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/ |
Hey,
On Wed, Feb 11, 2015 at 12:29:20AM -0600, Eric W. Biederman wrote: > In general namespaces are not necessary if your scope of names > already has hierarchy. Which means that new interfaces can almost > always be designed in such a way that you can support containers without > needing to add any special namespace support. Which typically results > in more flexible and useful APIs for everyone, with no real code cost. Sure, and cgroup ns support isn't doing anything weird there. Just bind mounting a subhierarchy is enough for the core features. The ns part is dealing with things which can't easily be tied to such hierarchical scoping like path reported under through proc and even handling that can be achieved by, for example, marking delegation points in cgroup proper and forcing tasks beyond that point to consider that as its origin when determining the path to report. However, note that something like that is inherently similar to what's being provided by other namespaces. It is true that it can be implemented outside namespace facility proper but that doesn't automatically make that the right choice and it's more likely to be worse - we'd be introducing a different way to perform about the same thing. So, the argument that adding namespace interface except for backward compatibility doesn't seem to hold water. Like it or not, namespace is serving as a platform for certain type of features and we'd be foolish to not to consider putting a related feature together there and I fail to see a valid technical argument as of yet. > Further in the cgroup namespace patchset I looked at a while ago, the > only reason for having a cgroup namespace was to provide a measure of > backwards compatibility with existing userspace. I expect removing the > /proc/<pid>/cgroup file and replacing it with something in cgroupfs > itself would serve just as well if backwards compatibility is not the > objective. Or possibly replacincg /proc/<pid>/cgroup into a magic > symlink onto somewhere in the unified cgroupfs itself. No matter what we do, we'd still need to mark the delegation point somehow; otherwise, there's no way to produce a scoped identifier. This isn't really about backward compatibility but rather the feature to scope a subhierarcy properly. > I just don't see any point in doing weird silly namespace things to keep > existing userspace working when the existing userspace won't work. If it's too different from existing namespaces, sure, doing something is definitely an option but is it? > As such if a namespace doesn't implement compatibility with the existing > userspace it gets my nack. Hmmm.... I don't think making the proposed NS support to work across all hierarchies including the traditional multiple ones would be too difficult. That should work then, right? Thanks. -- tejun -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [hidden email] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/ |
In reply to this post by Tejun Heo-2
Quoting Tejun Heo ([hidden email]):
> Hey, > > On Tue, Feb 10, 2015 at 11:02:40PM -0600, Eric W. Biederman wrote: > > A slightly off topic comment, for where this thread has gone but > > relevant if we are talking about cgroup namespaces. > > > > If don't implement compatibility with existing userspace, they get a > > nack. A backwards-incompatible change should figure out how to remove > > the need for any namespaces. > > > > Because that is what namespaces are about backwards compatibility. > > Are you claiming that namespaces are soley about backwards > compatibility? ie. to trick userland into scoping without letting it > notice? That's a very restricted view and namespaces do provide > further isolation capabilties in addition to what can be achieved > otherwise and it is logical to collect simliar funtionalities there. We absolutely would love to use cgroup namespaces to run older userspace in containers. I don't know that it's actually possible to do both that and use unified hierarchy at the same time though, which is unfortunate. So an Ubuntu 12.04 container will never, afaics, be able to run inside an ubuntu 16.04 host that is using unified hierarchy, without using backported newer versions of lxc (etc) in the container. -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [hidden email] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/ |
On Wed, Feb 11, 2015 at 05:00:23PM +0100, Serge E. Hallyn wrote:
> We absolutely would love to use cgroup namespaces to run older > userspace in containers. I don't know that it's actually possible > to do both that and use unified hierarchy at the same time though, > which is unfortunate. So an Ubuntu 12.04 container will never, afaics, > be able to run inside an ubuntu 16.04 host that is using unified > hierarchy, without using backported newer versions of lxc (etc) in > the container. So, the constraint there are the controllers. A controller can't be attached to two hierarchies at the same time for obvious reasons, so regardless of NS, you can't use the same controller on a unified hierarchy *and* a traditional hierarchy. NS doesn't adds or substracts from the situation. If you decide to attach a controller to a traditional hierarchy, that's where it's gonna be available. If you attach it to the unified hierarchy, the same story. Thanks. -- tejun -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [hidden email] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/ |
Quoting Tejun Heo ([hidden email]):
> On Wed, Feb 11, 2015 at 05:00:23PM +0100, Serge E. Hallyn wrote: > > We absolutely would love to use cgroup namespaces to run older > > userspace in containers. I don't know that it's actually possible > > to do both that and use unified hierarchy at the same time though, > > which is unfortunate. So an Ubuntu 12.04 container will never, afaics, > > be able to run inside an ubuntu 16.04 host that is using unified > > hierarchy, without using backported newer versions of lxc (etc) in > > the container. > > So, the constraint there are the controllers. A controller can't be > attached to two hierarchies at the same time for obvious reasons, so > regardless of NS, you can't use the same controller on a unified > hierarchy *and* a traditional hierarchy. NS doesn't adds or > substracts from the situation. If you decide to attach a controller > to a traditional hierarchy, that's where it's gonna be available. If > you attach it to the unified hierarchy, the same story. Right, exactly. thanks, -serge -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [hidden email] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/ |
Free forum by Nabble | Edit this page |