----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/49814/#review143338 -----------------------------------------------------------
src/slave/containerizer/mesos/isolators/cgroups/cgroups.cpp (lines 78 - 84) <https://reviews.apache.org/r/49814/#comment209128> I just realize that the old `cgroups/cpu` isolator actually handles two subsystems: cpu and cpuacct. Therefore, I suggest we use the following logic: ``` // Multipmap: isolator name -> subsystem name. multihashmap<string, string> table = { {"cpu", "cpu"}, {"cpu", "cpuacct"}, {"mem", "memory"}, ... }; foreach (const string& _isolator?...) { if (!strings::startsWith(_isolator, "cgroups/")) { continue; } string isolator = strings::remove( isolator, "cgroups/", strings::mode::PREFIX); foreach (const string& subsystemName, table.get(isolator)) { if (hierarchies.contains(subsystemName)) { continue; } Try<string> hierarchy = cgroups::prepare( flags.cgroups_hierarchy, subsystemName, flags.cgroups_root); ... } } ``` - Jie Yu On July 24, 2016, 12:52 p.m., haosdent huang wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/49814/ > ----------------------------------------------------------- > > (Updated July 24, 2016, 12:52 p.m.) > > > Review request for mesos, Gilbert Song, Jie Yu, Qian Zhang, and Zhengju Sha. > > > Bugs: MESOS-5041 > https://issues.apache.org/jira/browse/MESOS-5041 > > > Repository: mesos > > > Description > ------- > > Implemented `CgroupsIsolatorProcess::create`. > > > Diffs > ----- > > src/slave/containerizer/mesos/isolators/cgroups/cgroups.cpp > 4a9f55bf3b217405bf90943f27a976422877a99e > > Diff: https://reviews.apache.org/r/49814/diff/ > > > Testing > ------- > > > Thanks, > > haosdent huang > >
