This reverts commit
328ec5e8e4f00790cb91f81ff53f2cdd42d0106f.
Revert the logic to rely on the leaf cgroup node's subtree_control file
to examine the enabled controllers, this breaks the cgroup v2's no
internal process constraint and fallback to the original idea of relying
upon on leaf cgroup nodes, parent subtree_control to examine the enabled
controllers.
Signed-off-by: Kamalesh Babulal <kamalesh.babulal@oracle.com>
Signed-off-by: Tom Hromatka <tom.hromatka@oracle.com>
(cherry picked from commit
f15c995d56be0c13b03ea9ca43919cca261be9b6)
void InitChildDir(const char dirname[])
{
char tmp_path[FILENAME_MAX] = {0};
- FILE *f;
int ret;
/* create the directory */
PARENT_DIR, dirname);
ret = mkdir(tmp_path, MODE);
ASSERT_EQ(ret, 0);
-
- snprintf(tmp_path, FILENAME_MAX - 1,
- "%s/%s/cgroup.subtree_control", PARENT_DIR, dirname);
-
- f = fopen(tmp_path, "w");
- ASSERT_NE(f, nullptr);
- fprintf(f, "cpu io memory pids\n");
- fclose(f);
}
void InitMountTable(void)