[CRIU] [PATCH 1/2] cg: Add ability to dump custom cgroup properties

Cyrill Gorcunov gorcunov at gmail.com
Wed Apr 27 13:26:27 PDT 2016


On Wed, Apr 27, 2016 at 10:17:48PM +0300, Cyrill Gorcunov wrote:
> We have some common predefined properties such as "cpuset.cpus" and etc gathered
> in @cgp_predefined set, but there might be situation when only predefined ones
> are not enough, so add ability to specify properties via --cgroup-props
> and/or --cgroup-props-file options.
> 
> For example one may pass
> 
>   --cgroup-props "\"cpu\": [\"cpu.shares\", \"cpu.cfs_period_us\"]"
> 
> to dump custom properties for cpu controller.
> 
> The description is implemented in almost valid yaml, probably we will
> need to support the various forms, but oneline is enough for now.
> 
> Depending if --cgroup-props-ignore-default option passed the
> new properties either merged with predefined or substitute
> them.
> 
> Signed-off-by: Cyrill Gorcunov <gorcunov at openvz.org>

You know, guys, maybe it would be more convenient to define
strategy inside --cgroup-props, like

 --cgroup-props cpu: [strategy: merge, properties: [cpu.shares, cpu.cfs_period_us]]
 --cgroup-props cpu: [strategy: replace, properties: [cpu.shares, cpu.cfs_period_us]]

?


More information about the CRIU mailing list