Io.controller cgroups v2 on Jetson Nano


Sorry if this is the wrong forum category!

I was wondering if anyone had been successful in using Linux cgroups v2 on a Jetson Nano, specifically using io controllers. I’ve enabled cgroups v2 by adding

cgroup_no_v1=all systemd.unified_cgroup_hierarchy=1

to the APPEND line in /boot/extlinux/extlinux.conf

I’m running an older kernel. The output of cat /proc/version is

Linux version 4.9.140-tegra (buildbrain@mobile-u64-911) (gcc version 7.3.1 20180425 [linaro-7.3-2018.05 revision d29120a424ecfbc167ef90065c0eeb7f91977701] (Linaro GCC 7.3-2018.05) ) #1 SMP PREEMPT Tue Jul 16 17:04:49 PDT 2019

This configuration succeeds in creating a unified cgroup v2 hierarchy at /sys/fs/cgroup

cat /sys/fs/cgroup/cgroup.controllers shows

io memory pids

I created a subdirectory, /sys/fs/cgroup/user.slice/user-1000.slice/limited_io, and enabled io controllers for the corresponding cgroup.

E.g., in that directory, cat cgroup.subtree_control shows
io memory pids

I only see files io.max and io.stat, not io.latency or io.pressure, which is too bad, because I want to use io.latency.

I can put limits in io.max, e.g., after doing so, cat io.max shows

179:0 rbps=max wbps=1048756 riops=max wiops=max
8:0 rbps=max wbps=1048756 riops=max wiops=max

I’ve created a child directory /sys/fs/cgroup/user.slice/user-1000.slice/limited_io/tasks, and I can move a process into
/sys/fs/cgroup/user.slice/user-1000.slice/limited_io/tasks/cgroup.procs, e.g.,
sudo echo 6543 > /sys/fs/cgroup/user.slice/user-1000.slice/limited_io/tasks/cgroup.procs

But now I’ve encountered a more serious problem. If I put a process that performs I/O into this cgroup, the kernel typically crashes within a few hours. There are no warnings in /var/logs/kern.log, /var/logs/syslog, or /var/logs/lastlog. It’s just a hard crash.

I was wondering if anyone had seen this before, or whether there’s anything obviously wrong about the way I’ve tried to use cgroups v2 here.

Thanks in advance for any guidance!

Bruce Maggs