Skip to content

Commit 0ed11cc

Browse files
Make sure to enable memory and cpuset cgroup in v2
1 parent 514d9f4 commit 0ed11cc

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

doc/manual/install-judgehost.rst

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -180,8 +180,7 @@ any other tasks on the same CPU core the judgedaemon is using:
180180
``GRUB_CMDLINE_LINUX_DEFAULT="quiet cgroup_enable=memory swapaccount=1 isolcpus=2"``
181181

182182
You have now configured the system to use cgroups. To create
183-
the actual cgroups that DOMjudge will use, on systems with cgroups v1, you need
184-
to run::
183+
the actual cgroups that DOMjudge will use you need to run::
185184

186185
sudo systemctl enable create-cgroups --now
187186

judge/create_cgroups.in

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,8 @@ CGROUPBASE="/sys/fs/cgroup"
1212
# We do not need to do any of this with cgroup v2.
1313
fs_type=$(awk '$2 == "/sys/fs/cgroup" {print $3}' /proc/mounts)
1414
if [ "$fs_type" = "cgroup2" ]; then
15-
echo "cgroup v2 detected, skipping cgroup creation" >&2
15+
echo "+memory" >> /sys/fs/cgroup/cgroup.subtree_control
16+
echo "+cpuset" >> /sys/fs/cgroup/cgroup.subtree_control
1617
exit 0
1718
fi
1819

0 commit comments

Comments
 (0)