> On Oct. 16, 2012, 8:23 p.m., Jie Yu wrote:
> > src/linux/cgroups.cpp, line 769
> > <https://reviews.apache.org/r/7620/diff/1/?file=177249#file177249line769>
> >
> >     I am wondering why using "trim" here? That will break one unit test I 
> > think.
> 
> Benjamin Hindman wrote:
>     This was done in cgroups_isolation_module.cpp, and like the 
> cloneCpusetCpusMem, I realized that everyone would want/have to do this. In 
> general there were a few places where a leading '/' was expected (like in 
> this call to getCgroups) and other places where it was unnecessary. But at 
> the end of the day I didn't like returning cgroup names with the '/' prefix 
> because it could be mistaken for a directory starting at '/' (root). When the 
> path is not prefixed with '/' it makes it more clear that this is a relative 
> "path". Also, I fixed the unit tests in https://reviews.apache.org/r/7622.
>     
>     The one downside to this was that it doesn't return the "root" cgroup 
> (i.e., '/'), but since we weren't returning this anyway I decided I decided 
> it wasn't a big deal. This might need to change in the future though.
>     
>     Our documentation for most (all?) of the public functions expects 
> "relative" paths to the cgroups (from the hierarchy). If we were going to be 
> strict about that then I suppose we would be expecting './' when referring to 
> the "root" cgroup and we should thus always be returning './' for that 
> cgroup. Thoughts?

Sounds good to me. Thanks for clarifying it.

> it doesn't return the "root" cgroup (i.e., '/')
I agree with you. I don't think this is a problem because we can always find 
the root cgroup if we want.


- Jie


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


On Oct. 26, 2012, 6:10 p.m., Benjamin Hindman wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/7620/
> -----------------------------------------------------------
> 
> (Updated Oct. 26, 2012, 6:10 p.m.)
> 
> 
> Review request for mesos, Vinod Kone, Jie Yu, and Ben Mahler.
> 
> 
> Description
> -------
> 
> See summary.
> 
> 
> Diffs
> -----
> 
>   src/linux/cgroups.hpp f0e343d9348075484fa5a4be739a5cef8b9dea21 
>   src/linux/cgroups.cpp 58e9fec193cf0da39fdbee3ee1891fd716a63bbb 
>   third_party/libprocess/include/stout/path.hpp 
> e64f8a01d004c5e6513880ed2a1a85d4ec4f9e8b 
> 
> Diff: https://reviews.apache.org/r/7620/diff/
> 
> 
> Testing
> -------
> 
> make check
> 
> 
> Thanks,
> 
> Benjamin Hindman
> 
>

Reply via email to