Commit 9af8795f by Christian Brauner Committed by Stéphane Graber

cgroups: handle non-existent isolcpus file

If the file "/sys/devices/system/cpu/isolated" doesn't exist, we can't just simply bail. We still need to check whether we need to copy the parents cpu settings. Signed-off-by: 's avatarChristian Brauner <christian.brauner@canonical.com>
parent 312953a7
...@@ -454,6 +454,18 @@ static bool filter_and_set_cpus(char *path, bool am_initialized) ...@@ -454,6 +454,18 @@ static bool filter_and_set_cpus(char *path, bool am_initialized)
if (!file_exists(__ISOL_CPUS)) { if (!file_exists(__ISOL_CPUS)) {
/* This system doesn't expose isolated cpus. */ /* This system doesn't expose isolated cpus. */
DEBUG("Path: "__ISOL_CPUS" to read isolated cpus from does not exist.\n"); DEBUG("Path: "__ISOL_CPUS" to read isolated cpus from does not exist.\n");
cpulist = posscpus;
/* No isolated cpus but we weren't already initialized by
* someone. We should simply copy the parents cpuset.cpus
* values.
*/
if (!am_initialized) {
DEBUG("Copying cpuset of parent cgroup.");
goto copy_parent;
}
/* No isolated cpus but we were already initialized by someone.
* Nothing more to do for us.
*/
goto on_success; goto on_success;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment