Unverified Commit 854d13e2 by Stéphane Graber Committed by GitHub

Merge pull request #2641 from brauner/2018-09-23/cgroup_scoping_fixes

cgfsng: copy parent's cpu settings for monitor too
parents 3c97aeb8 f8390327
...@@ -586,8 +586,7 @@ static bool cg_legacy_handle_cpuset_hierarchy(struct hierarchy *h, char *cgname) ...@@ -586,8 +586,7 @@ static bool cg_legacy_handle_cpuset_hierarchy(struct hierarchy *h, char *cgname)
} }
} }
clonechildrenpath = clonechildrenpath = must_make_path(cgpath, "cgroup.clone_children", NULL);
must_make_path(cgpath, "cgroup.clone_children", NULL);
/* unified hierarchy doesn't have clone_children */ /* unified hierarchy doesn't have clone_children */
if (!file_exists(clonechildrenpath)) { if (!file_exists(clonechildrenpath)) {
free(clonechildrenpath); free(clonechildrenpath);
...@@ -1201,6 +1200,11 @@ static bool monitor_create_path_for_hierarchy(struct hierarchy *h, char *cgname) ...@@ -1201,6 +1200,11 @@ static bool monitor_create_path_for_hierarchy(struct hierarchy *h, char *cgname)
if (dir_exists(h->monitor_full_path)) if (dir_exists(h->monitor_full_path))
return true; return true;
if (!cg_legacy_handle_cpuset_hierarchy(h, cgname)) {
ERROR("Failed to handle legacy cpuset controller");
return false;
}
ret = mkdir_p(h->monitor_full_path, 0755); ret = mkdir_p(h->monitor_full_path, 0755);
if (ret < 0) { if (ret < 0) {
ERROR("Failed to create cgroup \"%s\"", h->monitor_full_path); ERROR("Failed to create cgroup \"%s\"", h->monitor_full_path);
......
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