Skip to content

Commit

Permalink
#15 Use effective_cpus and effective_mems as default for cpuset cgroup
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
MatejKafka committed Apr 28, 2021
1 parent 6ae3a54 commit 1eaceed
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/cgroup_setup.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
}
}
Expand Down

0 comments on commit 1eaceed

Please sign in to comment.