----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/24316/#review49621 -----------------------------------------------------------
src/linux/cgroups.cpp <https://reviews.apache.org/r/24316/#comment86848> Hum, this diff seems to be problematic. Have you rebased to master? src/linux/cgroups.cpp <https://reviews.apache.org/r/24316/#comment86849> Let's not put the fall-back logic into this utility function. The fall-back logic should be done at a higher level (i.e., in the memory isolator). How about returning a Result<Bytes> for this function: isSome() -> the value of memsw.limit_in_bytes isNone() -> memory.memsw.limit_in_bytes is not supported isError() -> other errors. src/linux/cgroups.cpp <https://reviews.apache.org/r/24316/#comment86850> return None(); src/linux/cgroups.cpp <https://reviews.apache.org/r/24316/#comment86851> Similarly, return Result<Nothing> here. src/linux/cgroups.cpp <https://reviews.apache.org/r/24316/#comment86852> return None() src/slave/containerizer/isolators/cgroups/mem.cpp <https://reviews.apache.org/r/24316/#comment86854> No need to include this headers as 'Flags' is already in function signatures. src/slave/containerizer/isolators/cgroups/mem.cpp <https://reviews.apache.org/r/24316/#comment86855> This doesn't seem to be right... What's the purpose of calling memsw_limit_in_bytes and save the return value to a temp variable inside the if scope? src/slave/flags.hpp <https://reviews.apache.org/r/24316/#comment86853> Set default to true ... - Jie Yu On Aug. 5, 2014, 4:05 p.m., Anton Lindström wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/24316/ > ----------------------------------------------------------- > > (Updated Aug. 5, 2014, 4:05 p.m.) > > > Review request for mesos. > > > Bugs: MESOS-1662 > https://issues.apache.org/jira/browse/MESOS-1662 > > > Repository: mesos-git > > > Description > ------- > > Changed memory.limit_in_bytes to memory.memsw.limit_in_bytes where memory is > limited. This makes Mesos limit both memory and swap as described in the Jira > ticket. > > Using --limit-swap, it's possible to use memory.memsw.limit_in_bytes. If it > doesn't exist it will fallback on memory.limit_in_bytes. > > > Diffs > ----- > > src/linux/cgroups.hpp c571e915fec461485d2015f58e6e828b00ea089a > src/linux/cgroups.cpp ccb86cf172c3c97513b16b90756d7bc12aad278f > src/slave/containerizer/isolators/cgroups/mem.cpp > e8d1e35a1acdb3beb03a91cfd734a59417657b20 > src/slave/flags.hpp 5ea2f38df5a777f275136b7849d77cb461a32f8d > > Diff: https://reviews.apache.org/r/24316/diff/ > > > Testing > ------- > > make check > > > Thanks, > > Anton Lindström > >
