Skip to content

Commit 065c999

Browse files
nickygerritseneldering
authored andcommitted
Make sure to enable memory and cpuset cgroup in v2
1 parent 0e133bf commit 065c999

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

doc/manual/install-judgehost.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -179,8 +179,8 @@ Optionally the timings can be made more stable by not letting the OS schedule
179179
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

182-
You have now configured the system to use cgroups. On systems with
183-
cgroups v1, you need to run::
182+
You have now configured the system to use cgroups. To create
183+
the actual cgroups that DOMjudge will use you need to run::
184184

185185
sudo systemctl enable create-cgroups --now
186186

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)