> On Aug. 6, 2015, 4:47 a.m., Alexander Rojas wrote:
> > src/tests/containerizer/memory_test_helper.cpp, lines 79-87
> > <https://reviews.apache.org/r/37065/diff/3/?file=1033300#file1033300line79>
> >
> >     After reading the man pages, `mlock()` exists in Linux too and frankly 
> > it looks safer to use than `mlockall()`. 
> >     
> >     `mlock()` will only lock the memory passed to the call in the physical 
> > memory while `mlockall()` will lock every new allocation after we made this 
> > call (and that includes stack, heap and code sections) until we make a 
> > `munlockall()` call, which we don't.

It does exist on Linux, it just doesn't realiably work for our use case on 
Ubuntu. I am aware of the difference of mlock() and mlockall(), in the context 
of the OOM test it does not really mattter because these are short lived test 
processes that are either getting killed or are going away.


> On Aug. 6, 2015, 4:47 a.m., Alexander Rojas wrote:
> > src/tests/containerizer/memory_test_helper.cpp, lines 75-76
> > <https://reviews.apache.org/r/37065/diff/3/?file=1033300#file1033300line75>
> >
> >     Not a big fan of explain how something will be used in the method 
> > description. What if we remove references to `mlockall()` and `mlock()` 
> > here. Something a long the lines of:
> >     
> >     > This helper allocates memory and locks it to the physical memory so 
> > it won't get swapped by the OS.

I've removed references to `mlockall()` and `mlock()`.


- Artem


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


On Aug. 6, 2015, 10:34 a.m., Artem Harutyunyan wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/37065/
> -----------------------------------------------------------
> 
> (Updated Aug. 6, 2015, 10:34 a.m.)
> 
> 
> Review request for mesos, Benjamin Hindman and Michael Park.
> 
> 
> Bugs: MESOS-3197
>     https://issues.apache.org/jira/browse/MESOS-3197
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> See summary.
> 
> 
> Diffs
> -----
> 
>   src/tests/containerizer/memory_test_helper.cpp 
> 5e40b747f4266e7532baf8fd02ea5db0955124d2 
> 
> Diff: https://reviews.apache.org/r/37065/diff/
> 
> 
> Testing
> -------
> 
> make check
> 
> 
> Thanks,
> 
> Artem Harutyunyan
> 
>

Reply via email to