![“设备上没有剩余空间”,cgroups v2 将空字符串写入“cpuset.cpus”](https://linux22.com/image/13663/%E2%80%9C%E8%AE%BE%E5%A4%87%E4%B8%8A%E6%B2%A1%E6%9C%89%E5%89%A9%E4%BD%99%E7%A9%BA%E9%97%B4%E2%80%9D%EF%BC%8Ccgroups%20v2%20%E5%B0%86%E7%A9%BA%E5%AD%97%E7%AC%A6%E4%B8%B2%E5%86%99%E5%85%A5%E2%80%9Ccpuset.cpus%E2%80%9D.png)
我在统一 cgroups v2 配置中使用 Linux 5.11。
下列的cgroups-v2.rst,我正在尝试重置非根 cgroup 的 cpuset 分配(以使其继承父级的 cpuset)。根据文档,这可以通过将空值写入cpuset.cpus
cgroup 来实现:
Cpuset Interface Files
~~~~~~~~~~~~~~~~~~~~~~
cpuset.cpus
<...>
An empty value indicates that the cgroup is using the same
setting as the nearest cgroup ancestor with a non-empty
"cpuset.cpus" or all the available CPUs if none is found.
然而,这是行不通的:
# pwd
/sys/fs/cgroup/machine.slice/[email protected]
# cat cpuset.cpus
0-31
# echo "" > cpuset.cpus
echo: write error: no space left on device
我究竟做错了什么?