----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/75158/#review226804 -----------------------------------------------------------
src/slave/containerizer/mesos/isolators/cgroups2/controllers/core.cpp Line 63 (original), 64-73 (patched) <https://reviews.apache.org/r/75158/#comment315110> hm.. rather than tokenizing here and in paths::cgroups2::containerId(), can't we just do string handling consistently? - Benjamin Mahler On Aug. 9, 2024, 5:48 p.m., Jason Zhou wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/75158/ > ----------------------------------------------------------- > > (Updated Aug. 9, 2024, 5:48 p.m.) > > > Review request for mesos and Benjamin Mahler. > > > Repository: mesos > > > Description > ------- > > Currently, our core controller usage() function try to read the cgroup > files in the argument cgroup. However, in our design for cgroups v2, > processes and threads live in the leaf child of a cgroup. Hence the > usage collection will not find the actual processes and threads for a > cgroup if it's not already specified as a leaf group. > > This patch adds a check to see if the argument cgroup is a leaf cgroup, > and will search for processes and threads in the leaf cgroup instead. > > > Diffs > ----- > > src/slave/containerizer/mesos/isolators/cgroups2/controllers/core.cpp > 54d7c89777f3a360e641692fd7d2184bbac74103 > > > Diff: https://reviews.apache.org/r/75158/diff/2/ > > > Testing > ------- > > CgroupsIsolatorTest.ROOT_CGROUPS_PidsAndTids is able to correctly find the > number of processes/threads after this and the subsequent patches are applied > > > Thanks, > > Jason Zhou > >