From 1eaceed606f23ce40833d69100ff5a55157d66fd Mon Sep 17 00:00:00 2001 From: Matej Kafka Date: Tue, 27 Apr 2021 00:54:06 +0200 Subject: [PATCH] #15 Use effective_cpus and effective_mems as default for cpuset cgroup If I understand correctly, this __should__ be enough to fix issue #15, but it's possible that there are some problems I'm not aware of. --- src/cgroup_setup.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/cgroup_setup.cpp b/src/cgroup_setup.cpp index 9911808d..ea6f673e 100644 --- a/src/cgroup_setup.cpp +++ b/src/cgroup_setup.cpp @@ -66,8 +66,8 @@ static void handle_cgroup_exc(stringstream &commands, cpuset_path = "/sys/fs/cgroup/cpuset" + path.substr(8) + "/" + demos_cg_name; // Read settings from correct cpuset cgroup string cpuset_parent = "/sys/fs/cgroup/cpuset" + path.substr(8); - ifstream(cpuset_parent + "/cpuset.cpus") >> cpus; - ifstream(cpuset_parent + "/cpuset.mems") >> mems; + ifstream(cpuset_parent + "/cpuset.effective_cpus") >> cpus; + ifstream(cpuset_parent + "/cpuset.effective_mems") >> mems; } } }