[CRIU] [PATCH 2/7] cgroup: add support for cgroup namespaces

Tycho Andersen tycho.andersen at canonical.com
Sun Feb 21 10:51:26 PST 2016


Hi Pavel,

On Thu, Feb 18, 2016 at 11:40:44PM +0300, Pavel Emelyanov wrote:
> >  message cg_member_entry {
> > -	required string name	= 1;
> > -	required string path	= 2;
> > +	required string name		= 1;
> > +	required string path		= 2;
> > +	optional string cgns_prefix	= 3;
> 
> Same as for parasite args -- maybe it's more efficient to to save prefix lenght as int here?

So I played around with this for the parasite args case, and I think
it's still better to do it the way it was before, because we send back
the whole page anyway, and we actually need the /paths/ in hand to
compute cgns prefixes, because we can't assume that they have the same
prefix, so lengths is not enough (e.g. one task in /foo and it's child
task in /bar; the prefix lengths after unshare() will both be 3, but
they're not in the same cgroup).

However, we can do it in the images, since at that point we have
compared the prefixes and we know they're the same. So I'll send out a
revised set which uses the prefix length here, but still does things
the old way for the parasite bits.

Tycho


More information about the CRIU mailing list