diff options
author | Vic Yang <victoryang@google.com> | 2019-02-20 17:54:16 +0000 |
---|---|---|
committer | Gerrit Code Review <noreply-gerritcodereview@google.com> | 2019-02-20 17:54:16 +0000 |
commit | 1cae1b0f811781fa18f754ade9f97bf84d8a2e30 (patch) | |
tree | 1a1ed719397498c97128f03154c119f730d95f6f /libprocessgroup/processgroup.cpp | |
parent | 86f38d56b8c9e8a6d79d7f0871214b3a8002c9db (diff) | |
parent | ab8d6ab62dfd72e8f5112afdd6e6e3dd6eca19e2 (diff) |
Merge "libprocessgroup: Fix memcg path for apps"
Diffstat (limited to 'libprocessgroup/processgroup.cpp')
-rw-r--r-- | libprocessgroup/processgroup.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/libprocessgroup/processgroup.cpp b/libprocessgroup/processgroup.cpp index e9dec1261c..8505e61465 100644 --- a/libprocessgroup/processgroup.cpp +++ b/libprocessgroup/processgroup.cpp @@ -200,7 +200,7 @@ void removeAllProcessGroups() { cgroups.push_back(path); } if (CgroupGetControllerPath("memory", &path)) { - cgroups.push_back(path); + cgroups.push_back(path + "/apps"); } for (std::string cgroup_root_path : cgroups) { @@ -317,6 +317,7 @@ static int KillProcessGroup(uid_t uid, int initialPid, int signal, int retries) CgroupGetControllerPath("cpuacct", &cpuacct_path); CgroupGetControllerPath("memory", &memory_path); + memory_path += "/apps"; const char* cgroup = (!access(ConvertUidPidToPath(cpuacct_path.c_str(), uid, initialPid).c_str(), F_OK)) @@ -380,6 +381,7 @@ int createProcessGroup(uid_t uid, int initialPid, bool memControl) { std::string cgroup; if (isMemoryCgroupSupported() && (memControl || UsePerAppMemcg())) { CgroupGetControllerPath("memory", &cgroup); + cgroup += "/apps"; } else { CgroupGetControllerPath("cpuacct", &cgroup); } |