----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/68426/ -----------------------------------------------------------
Review request for mesos, Benjamin Mahler, Gilbert Song, and James Peach. Bugs: MESOS-8418 https://issues.apache.org/jira/browse/MESOS-8418 Repository: mesos Description ------- Prior to this patch, some of the cgroups helpers call `cgroups::verify` to make sure the hierarchy and cgroup are valid. This causes some performance issues for the agent because `cgroups::verify` will read the entire mount table, and mount table read is expensive if the mount table is large. See more details in MESOS-8418. In most of the cases, the verification has already been done when those cgroups helpers are called. Therefore, it is better to let the caller do the verification and make those cgroups helpers pure helpers. Also, the verification is subject to race anyway. The cgroups global state might change (e.g., operators modify the cgroups) after the verification is done, making the verification itself not that super useful. This patch refactored the cgroups helpers and moved the verifications to the callers. Diffs ----- src/linux/cgroups.hpp 282b8e783e8c70742e4388a19003382bc57db8d5 src/linux/cgroups.cpp 86b0306eee804732a55041d2d82c14db35ec5095 src/linux/systemd.cpp 2444ff4e432e61071c62e8e1ee94d62ac6b96c88 src/slave/containerizer/mesos/isolators/cgroups/cgroups.cpp 1444c0543540cf61e253579e9e49d8687bd4ed3a src/slave/containerizer/mesos/isolators/cgroups/subsystems/cpu.cpp 321671f18b72edec1f8ed00f0069b539a698c4af src/slave/containerizer/mesos/isolators/gpu/isolator.cpp d84f78c99eb118eba1a5bc3e74a2cf57556a325a src/slave/containerizer/mesos/linux_launcher.cpp e51352af12743cc35f09b9fbb7d770f0108f908c src/slave/main.cpp 489e87522588be259d382f588b66907ba29f1788 src/tests/containerizer/nested_mesos_containerizer_tests.cpp b80e40b6f4b18e076ebb3c1668f475286c337127 Diff: https://reviews.apache.org/r/68426/diff/1/ Testing ------- sudo make check Thanks, Jie Yu