mesos-reviews mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From haosdent huang <haosd...@gmail.com>
Subject Re: Review Request 45363: Add `MemorySubsystem` for cgroups unified isolator.
Date Sun, 19 Jun 2016 16:31:32 GMT


> On June 12, 2016, 1:09 p.m., Qian Zhang wrote:
> > src/slave/containerizer/mesos/isolators/cgroups/subsystem.cpp, lines 674-677
> > <https://reviews.apache.org/r/45363/diff/8/?file=1347662#file1347662line674>
> >
> >     I see here we call `lambda::bind()`, but in the original `cgroups/mem` isolator,
we call defer():
> >     https://github.com/apache/mesos/blob/0.28.2/src/slave/containerizer/mesos/isolators/cgroups/mem.cpp#L605:L609
> >     
> >     That means `MemorySubsystem::oomWaited()` will be executed in a separate thread.
So my concern is there may be some multi-thread race condition issue for your way, e.g., what
if `MemorySubsystem::oomWaited()` is triggered after the container exits (i.e, we have cleaned
it up)? I think in the original `cgroups/mem` isolator, we have already considered this issue,
please refer to this comment for details:
> >     https://github.com/apache/mesos/blob/0.28.2/src/slave/containerizer/mesos/isolators/cgroups/mem.cpp#L634:L637
> 
> haosdent huang wrote:
>     For
>     ```
>         // It is likely that process exited is executed before this
>         // function (e.g.  The kill and OOM events happen at the same
>         // time, and the process exit event arrives first.) Therefore, we
>         // should not report a fatal error here.
>     ```
>     It is because eventfd would be triggered when hierarchy destruction. It should be
fixed in https://reviews.apache.org/r/46299/

I try to avoid to make `Subsystem` extends from `Process` before, but I think it should be
necessary, let me update here.


- haosdent


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


On June 19, 2016, 10:31 a.m., haosdent huang wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/45363/
> -----------------------------------------------------------
> 
> (Updated June 19, 2016, 10:31 a.m.)
> 
> 
> Review request for mesos, Gilbert Song, Guangya Liu, Ian Downes, Jie Yu, Kevin Klues,
and Qian Zhang.
> 
> 
> Bugs: MESOS-5045
>     https://issues.apache.org/jira/browse/MESOS-5045
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> Add `MemorySubsystem` for cgroups unified isolator.
> 
> 
> Diffs
> -----
> 
>   src/slave/containerizer/mesos/isolators/cgroups/cgroups.cpp PRE-CREATION 
>   src/slave/containerizer/mesos/isolators/cgroups/subsystem.hpp PRE-CREATION 
>   src/slave/containerizer/mesos/isolators/cgroups/subsystem.cpp PRE-CREATION 
> 
> Diff: https://reviews.apache.org/r/45363/diff/
> 
> 
> Testing
> -------
> 
> 
> Thanks,
> 
> haosdent huang
> 
>


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