> On Aug. 5, 2014, 5:37 p.m., Jie Yu wrote: > > src/linux/cgroups.cpp, line 1925 > > <https://reviews.apache.org/r/24316/diff/1/?file=652057#file652057line1925> > > > > 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.
We've avoiding ever having a Result<Nothing> return type because what is the difference between None() and Some(Nothing())? Seems very confusing? - Ben ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/24316/#review49621 ----------------------------------------------------------- On Aug. 7, 2014, 9:09 p.m., Anton Lindström wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/24316/ > ----------------------------------------------------------- > > (Updated Aug. 7, 2014, 9:09 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 9dfba6eb9059728386d053f8c2e92edab0caa295 > src/linux/cgroups.cpp 39a4874ee0030110d7a61f1b73653af116d66549 > src/slave/containerizer/isolators/cgroups/mem.hpp > 6869ed4a9fa9a1a719e695ac83aeec88ead0efc0 > src/slave/containerizer/isolators/cgroups/mem.cpp > e8160efc4f5baa06470a8a3c774bf97d5b9e83cc > src/slave/flags.hpp 841de2364085c66e4272734d5b11dbf8efa845a5 > > Diff: https://reviews.apache.org/r/24316/diff/ > > > Testing > ------- > > make check > > > Thanks, > > Anton Lindström > >