mesos-reviews mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Qian Zhang <zhang...@cn.ibm.com>
Subject Re: Review Request 49814: Implemented `CgroupsIsolatorProcess::create`.
Date Thu, 28 Jul 2016 07:06:18 GMT


> On July 25, 2016, 1:50 a.m., Jie Yu wrote:
> > src/slave/containerizer/mesos/isolators/cgroups/cgroups.cpp, lines 78-84
> > <https://reviews.apache.org/r/49814/diff/10/?file=1451604#file1451604line78>
> >
> >     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);
> >             
> >         ...
> >       }
> >     }
> >     ```
> 
> haosdent huang wrote:
>     Do we ask user to pass `cgroups/cpuacct` exactly in `isolation` flag eventually?

With the logic suggested by Jie, I think user does not need to specify `cgroups/cpuacct` in
`--isolation` flag, just `cgroups/cpu` should be enough.


- Qian


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/49814/#review143338
-----------------------------------------------------------


On July 25, 2016, 10:35 a.m., haosdent huang wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/49814/
> -----------------------------------------------------------
> 
> (Updated July 25, 2016, 10:35 a.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
> 
>


Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message