----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/45363/#review137168 -----------------------------------------------------------
src/slave/containerizer/mesos/isolators/cgroups/subsystem.cpp (lines 674 - 677) <https://reviews.apache.org/r/45363/#comment202323> 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 - Qian Zhang On April 16, 2016, 6:22 p.m., haosdent huang wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/45363/ > ----------------------------------------------------------- > > (Updated April 16, 2016, 6:22 p.m.) > > > Review request for mesos, Gilbert Song, Guangya Liu, Ian Downes, Jie Yu, and > Kevin Klues. > > > 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 > >
