I just unmounted cgroup
version 1, leaving just a single cgroup2
mount on my system.
$ mount | grep -i cgroup
tmpfs on /sys/fs/cgroup type tmpfs (ro,nosuid,nodev,noexec,size=4096k,nr_inodes=1024,mode=755)
cgroup2 on /sys/fs/cgroup/unified type cgroup2 (rw,nosuid,nodev,noexec,relatime,nsdelegate)
I was under the impression everything in /sys/fs/cgroup
that was not /sys/fs/cgroup/unified
is an artifact of cgroup 1. How come these remain though after unmounting cgroup
version 1?
$ ls -lh
drwxr-xr-x 2 root root 40 Dec 25 18:57 blkio
lrwxrwxrwx 1 root root 11 Dec 25 18:57 cpu -> cpu,cpuacct
lrwxrwxrwx 1 root root 11 Dec 25 18:57 cpuacct -> cpu,cpuacct
drwxr-xr-x 2 root root 40 Dec 25 18:57 cpu,cpuacct
drwxr-xr-x 2 root root 40 Dec 25 18:57 cpuset
drwxr-xr-x 2 root root 40 Dec 25 18:57 devices
drwxr-xr-x 2 root root 40 Dec 25 18:57 freezer
drwxr-xr-x 2 root root 40 Dec 25 18:57 memory
lrwxrwxrwx 1 root root 16 Dec 25 18:57 net_cls -> net_cls,net_prio
drwxr-xr-x 2 root root 40 Dec 25 18:57 net_cls,net_prio
lrwxrwxrwx 1 root root 16 Dec 25 18:57 net_prio -> net_cls,net_prio
drwxr-xr-x 2 root root 40 Dec 25 18:57 perf_event
drwxr-xr-x 2 root root 40 Dec 25 18:57 pids
drwxr-xr-x 2 root root 40 Dec 25 18:57 rdma
drwxr-xr-x 2 root root 40 Dec 25 18:57 systemd
dr-xr-xr-x 13 root root 0 Dec 26 21:37 unified
Are these remaining temp dirs that are not kernel interfaces?
$ find . | grep -v unified
./freezer
./cpuset
./cpu
./cpuacct
./cpu,cpuacct
./rdma
./perf_event
./blkio
./memory
./devices
./net_prio
./net_cls
./net_cls,net_prio
./pids
./systemd
How does these empty directories work with cgroups
v1?