> On March 15, 2014, 1:06 a.m., Vinod Kone wrote:
> > src/slave/main.cpp, lines 168-169
> > <https://reviews.apache.org/r/19248/diff/1/?file=520091#file520091line168>
> >
> >     Doesn't moving the process to a cgroup move all its threads? Not sure 
> > if this patch landed: http://lwn.net/Articles/421282/
> >     
> >     
> >     One disadvantage of doing it main is that we can't write tests :(

I'm not sure on the status of the linked patch but I testing on a Linux 3.4 
kernel and it did not move all threads so the code explicitly moves all threads 
for the process. Attempting to move a thread that is already in a cgroup isn't 
an error so this will work on kernels with the patch.


- Ian


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


On March 18, 2014, 5:58 p.m., Ian Downes wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/19248/
> -----------------------------------------------------------
> 
> (Updated March 18, 2014, 5:58 p.m.)
> 
> 
> Review request for mesos and Vinod Kone.
> 
> 
> Bugs: MESOS-327
>     https://issues.apache.org/jira/browse/MESOS-327
> 
> 
> Repository: mesos-git
> 
> 
> Description
> -------
> 
> This functionality is intended to support monitoring of the slave's 
> resources, specifically memory and cpu. This is done by moving the slave into 
> a cpuacct and memory cgroup under 
> $cgroups_hierarchy/{cpuacct,memory}/$cgroups_root/slave.
> 
> cgroup statistics will be of the slave itself plus any child process that 
> isn't moved to another cgroup, e.g., mesos-fetcher will be accounted but 
> executors will not.
> 
> 
> Diffs
> -----
> 
>   3rdparty/libprocess/3rdparty/stout/Makefile.am 
> df149ddc8669b0c541361922631f4f3958bd096d 
>   3rdparty/libprocess/3rdparty/stout/include/stout/os.hpp 
> 901e5550c82c12934a6b9c3154f030c677e41a38 
>   3rdparty/libprocess/3rdparty/stout/include/stout/os/permissions.hpp 
> ba8463cc152701d6eb1deba8d1561688ecf5b7b5 
>   bin/mesos-slave-flags.sh.in 8c936aa06e994a87a8b09b31c907868bf9be38c7 
>   configure.ac 9a6de87fa6523bf8137f5d74ea0b7c6cbd947d3a 
>   docs/getting-started.md d7ced76125c6aba0d7e1a0f4ca8165652b17af0d 
>   src/Makefile.am 0775a0df293e945d41c7ba90fd1bbb503ae22f9e 
>   src/java/generated/org/apache/mesos/MesosNativeLibrary.java.in 
> 668647fdfc0e203fcde59263256659ba14e29960 
>   src/linux/cgroups.hpp 6056e3ae59ed813d75b1bb46b276872530155ec7 
>   src/linux/cgroups.cpp eff15af417f3827b4a1f73770b98dc9fccbc397e 
>   src/local/local.cpp 2cfdf49c9eb92302502eb50c623f9606977b88b6 
>   src/master/detector.cpp 8b10061de12a35ad6624db594dc4ec36502b2420 
>   src/master/flags.hpp 024f86d93824a20ce42c28b8264576f1cb715d0e 
>   src/master/http.cpp 72d8e91013cd6a9c52a6d1ffdf517a52c4567bb7 
>   src/master/main.cpp f12f20a1eabd163c4f35056bf01f28f3edd408a9 
>   src/master/master.hpp 0c7c5204c31087f12c4e98028f90c1b941eab7c7 
>   src/master/master.cpp 6da776699beb6f449e8160dcb6a125d94c1ab437 
>   src/master/registrar.hpp 98bfa1e83b7e6d28e011444a665155e31922446c 
>   src/master/registrar.cpp cbb67bd17402692d3bb81fe58baea952897c56d1 
>   src/slave/containerizer/containerizer.cpp 
> faf3d0cf97aafd88eab82ae39e2255b1eb4ce294 
>   src/slave/containerizer/isolators/cgroups/cpushare.cpp 
> 11665dbe88e3920fd9d8a2259987611d49e85462 
>   src/slave/flags.hpp c9a627bc405a48da5d5ef9a90355970151fd6149 
>   src/slave/slave.cpp d8d3e0fa54972201d72b2650ec0ba922a4912d54 
>   src/tests/cluster.hpp 40d9f8c18307aead2374396710f9a82466e3a716 
>   src/tests/environment.cpp feeca042265eede40e87db3ee5ab89be04509a90 
>   src/tests/registrar_tests.cpp 41836aeaf94e1b21e040b9e8ecf71e0b5a351f8e 
>   src/tests/state_tests.cpp d0e084070c566ee7d751a8e1279772e05b966145 
> 
> Diff: https://reviews.apache.org/r/19248/diff/
> 
> 
> Testing
> -------
> 
> 
> Thanks,
> 
> Ian Downes
> 
>

Reply via email to