Lines Matching refs:CGROUP_ROOT
24 CGROUP_ROOT=$(mount -t cgroup2 | head -1 | awk '{print $3}')
25 if [[ -z "$CGROUP_ROOT" ]]; then
26 CGROUP_ROOT=/dev/cgroup/memory
27 mount -t cgroup2 none $CGROUP_ROOT
30 echo "+hugetlb +memory" >$CGROUP_ROOT/cgroup.subtree_control
32 CGROUP_ROOT=$(mount -t cgroup | grep ",hugetlb" | awk '{print $3}')
33 if [[ -z "$CGROUP_ROOT" ]]; then
34 CGROUP_ROOT=/dev/cgroup/memory
35 mount -t cgroup memory,hugetlb $CGROUP_ROOT
56 rmdir "$CGROUP_ROOT"/a/b 2>/dev/null
57 rmdir "$CGROUP_ROOT"/a 2>/dev/null
58 rmdir "$CGROUP_ROOT"/test1 2>/dev/null
76 actual_a="$(cat "$CGROUP_ROOT"/a/memory.$usage_file)"
88 actual_a_hugetlb="$(cat "$CGROUP_ROOT"/a/hugetlb.${MB}MB.$usage_file)"
104 actual_b="$(cat "$CGROUP_ROOT"/a/b/memory.$usage_file)"
116 actual_b_hugetlb="$(cat "$CGROUP_ROOT"/a/b/hugetlb.${MB}MB.$usage_file)"
130 mkdir "$CGROUP_ROOT"/a
133 echo "+hugetlb +memory" >$CGROUP_ROOT/a/cgroup.subtree_control
135 echo 0 >$CGROUP_ROOT/a/cpuset.mems
136 echo 0 >$CGROUP_ROOT/a/cpuset.cpus
139 mkdir "$CGROUP_ROOT"/a/b
142 echo 0 >$CGROUP_ROOT/a/b/cpuset.mems
143 echo 0 >$CGROUP_ROOT/a/b/cpuset.cpus
156 echo $$ >$CGROUP_ROOT/$cgroup/cgroup.procs
158 echo 0 >$CGROUP_ROOT/$cgroup/cpuset.mems
159 echo 0 >$CGROUP_ROOT/$cgroup/cpuset.cpus
160 echo $$ >"$CGROUP_ROOT/$cgroup/tasks"
164 echo $$ >$CGROUP_ROOT/cgroup.procs
166 echo $$ >"$CGROUP_ROOT/tasks"
182 mkdir $CGROUP_ROOT/test1
188 rmdir $CGROUP_ROOT/test1
189 mkdir $CGROUP_ROOT/test1
214 rmdir "$CGROUP_ROOT"/a/b
239 rmdir "$CGROUP_ROOT"/a/b
253 umount $CGROUP_ROOT
254 rm -rf $CGROUP_ROOT