Hello,
I am using the following call to update cpuset.cpus to “0-3” (on lxc v4.0.6)
char *name = containers[i];
c = lxc_container_new(name, LXC_PATH);
if (NULL != c) {
if (!c->set_cgroup_item(c, "cpuset.cpus", str_max_cpuset)) {
res = -1;
sm_error("Failed to assign '%s' value to 'cpuset.cpus' for '%s'",str_max_cpuset, name);
}
lxc_container_put(c);
}
but only “cpuset.cpus” under payload path was updated the “cpuset.cpus” under monitor path was kept to 0.
Which lxc api is used to change the cpuset for the container manager? or we have to use echo "0-3" > /sys/fs/cgroup/cpuset/lxc.monitor.MyContainer1/cpuset.cpus, is there really an advantage to modify cpuset for the monitor?
At boot time both payload and monitor are set to 0-3 but after resuming from suspend we have to restore the value to “0-3”(because after resume both cpuset for payload and monitor are set to 0). I succeeded to do it for payload through lxc api but it is not the case for monitor