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



src/linux/cgroups.hpp
<https://reviews.apache.org/r/20137/#comment72695>

    What does this return? That is, what does the uint64_t represent and can we 
either add a comment (if it's useful) or convert it to Nothing() if it's an 
artifact of the listening technique?
    
    The name here might be a bit opaque. 'cgroups::memory::listen' doesn't 
really tell us what we're listening for.
    
    What about 'cgroups::memory::oomListen'? You'll notice the other methods 
here were named with snake case, this was to directly match the control file 
names.



src/linux/cgroups.cpp
<https://reviews.apache.org/r/20137/#comment72694>

    We should add a check for the format we expect:
    
    if (pairs.count("oom_kill_disable") != 1 ||
        pairs["oom_kill_disable"].empty()) {
      return Errror(...);
    }



src/slave/containerizer/isolators/cgroups/mem.cpp
<https://reviews.apache.org/r/20137/#comment72696>

    It's a bit unfortunate that the code is not that clear without the 
comments. We're passing 'true' into something called 'oom_control' which 
doesn't really tell us that we're enabling the oom killer. Seems like this is a 
place where the direct mapping from control names to function names is a bit 
unfortunate.
    
    I guess this is ok for now.


- Ben Mahler


On April 8, 2014, 10:17 p.m., Ian Downes wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/20137/
> -----------------------------------------------------------
> 
> (Updated April 8, 2014, 10:17 p.m.)
> 
> 
> Review request for mesos, Ben Mahler and Vinod Kone.
> 
> 
> Bugs: MESOS-1178
>     https://issues.apache.org/jira/browse/MESOS-1178
> 
> 
> Repository: mesos-git
> 
> 
> Description
> -------
> 
> Added cgroups::memory::oom_control and cgroups::memory::listen.
> 
> cgroups::memory::oom_control will not write to the control file unless it 
> needs to change the state.
> 
> 
> Diffs
> -----
> 
>   src/linux/cgroups.hpp 5a5735721fb9f051eee661edb08d1cdaa163d0f3 
>   src/linux/cgroups.cpp 8202c282f580d027a60ded2081962e96e4860f60 
>   src/slave/containerizer/isolators/cgroups/mem.cpp 
> 9e9c55e37f499898196b61cc586cb0e49feabf56 
>   src/tests/cgroups_tests.cpp 6ba9de622953e158feadaa9950618b0b13c9e832 
> 
> Diff: https://reviews.apache.org/r/20137/diff/
> 
> 
> Testing
> -------
> 
> make check
> 
> 
> Thanks,
> 
> Ian Downes
> 
>

Reply via email to