[CRIU] [PATCH 2/2] cg: Add ability to dump custom cgroup properties
Tycho Andersen
tycho.andersen at canonical.com
Fri Apr 15 09:27:52 PDT 2016
On Fri, Apr 15, 2016 at 04:31:01PM +0300, Cyrill Gorcunov wrote:
> On Fri, Apr 15, 2016 at 04:20:25PM +0300, Pavel Emelyanov wrote:
> > >
> > > With custom cgroups engine one simply need to pass JSON file with
> > > descriptor and criu will replace predefined cgroups.
> >
> > OK. Maybe it's worth pulling out the compiled-in lists of props into some
> > criu-cgroup-props.default file then?
>
> That's easy to add. The question is that we will require jansson library
> to be installed then. Would it be a problem, or you prefer some simplier
> format for predefined list?
At least for us building with jansson isn't a problem since it is
already in Ubuntu's main archive that is supported by canonical.
That said, (and this probably isn't really a problem for us either
when releasing, but it is worth considering) it would be potentially
hard to figure out where this separate file would live, especially
with custom/debug builds. To update it, we'd have to do a package
update anyway, so we'd be installing a whole new binary anyway, so I'm
not sure it buys us (ubuntu) anything.
The only other thing I can think of is just automatically traversing
each file in /sys/fs/cgroup. The problem with this is that if
something like the special cpuset props are introduced where we can't
restore them except in a special way, automatically restoring file
values might break on newer kernels.
Anyway, we could move to a separate json file or something if you
think that would be useful for some other case.
Tycho
More information about the CRIU
mailing list