linuxdockercgroups

CGROUP, Not found the cpu.weight in /sys/fs/cgroup/


I can't find /sys/fs/cgroup/cpu.weight, I only have cpu.pressure and cpu.stat and without the `cweight my minikube on docker doesn't work. How can I configure it?

cat /sys/fs/cgroup/cgroup.controllers
cpuset cpu io memory hugetlb pids rdma misc
ls -l /sys/fs/cgroup/
drwxr-xr-x root root 0 B Mon Apr  4 10:01:43 2022  ananicy_test_cgroup2
.r--r--r-- root root 0 B Mon Apr  4 10:01:43 2022  cgroup.controllers
.rw-r--r-- root root 0 B Mon Apr  4 10:01:43 2022  cgroup.max.depth
.rw-r--r-- root root 0 B Mon Apr  4 10:01:43 2022  cgroup.max.descendants
.rw-r--r-- root root 0 B Mon Apr  4 10:01:43 2022  cgroup.procs
.r--r--r-- root root 0 B Mon Apr  4 10:01:43 2022  cgroup.stat
.rw-r--r-- root root 0 B Sun Apr  3 11:22:32 2022  cgroup.subtree_control
.rw-r--r-- root root 0 B Mon Apr  4 10:01:43 2022  cgroup.threads
.rw-r--r-- root root 0 B Mon Apr  4 10:01:43 2022  cpu.pressure
.r--r--r-- root root 0 B Mon Apr  4 10:01:43 2022  cpu.stat
.r--r--r-- root root 0 B Mon Apr  4 10:01:43 2022  cpuset.cpus.effective
.r--r--r-- root root 0 B Mon Apr  4 10:01:43 2022  cpuset.mems.effective
drwxr-xr-x root root 0 B Sun Apr  3 11:22:32 2022  dev-binderfs.mount
drwxr-xr-x root root 0 B Sun Apr  3 11:22:32 2022  dev-hugepages.mount
drwxr-xr-x root root 0 B Sun Apr  3 11:22:32 2022  dev-mqueue.mount
drwxr-xr-x root root 0 B Mon Apr  4 10:02:21 2022  Example
drwxr-xr-x root root 0 B Sun Apr  3 11:22:50 2022  hostcritical.slice
drwxr-xr-x root root 0 B Mon Apr  4 10:01:43 2022  init.scope
.rw-r--r-- root root 0 B Mon Apr  4 10:01:43 2022  io.cost.model
.rw-r--r-- root root 0 B Mon Apr  4 10:01:43 2022  io.cost.qos
.rw-r--r-- root root 0 B Mon Apr  4 10:01:43 2022  io.pressure
.rw-r--r-- root root 0 B Mon Apr  4 10:01:43 2022  io.prio.class
.r--r--r-- root root 0 B Mon Apr  4 10:01:43 2022  io.stat
drwxr-xr-x root root 0 B Sun Apr  3 11:22:32 2022  machine.slice
.r--r--r-- root root 0 B Mon Apr  4 10:01:43 2022  memory.numa_stat
.rw-r--r-- root root 0 B Mon Apr  4 10:01:43 2022  memory.pressure
.r--r--r-- root root 0 B Mon Apr  4 10:01:43 2022  memory.stat
.r--r--r-- root root 0 B Mon Apr  4 10:01:43 2022  misc.capacity
drwxr-xr-x root root 0 B Sun Apr  3 11:22:48 2022  proc-sys-fs-binfmt_misc.mount
drwxr-xr-x root root 0 B Sun Apr  3 11:22:32 2022  sys-fs-fuse-connections.mount
drwxr-xr-x root root 0 B Sun Apr  3 11:22:32 2022  sys-kernel-config.mount
drwxr-xr-x root root 0 B Sun Apr  3 11:22:32 2022  sys-kernel-debug.mount
drwxr-xr-x root root 0 B Sun Apr  3 11:22:32 2022  sys-kernel-tracing.mount
drwxr-xr-x root root 0 B Mon Apr  4 09:18:13 2022  system.slice
drwxr-xr-x root root 0 B Sun Apr  3 11:22:50 2022  unevictable.slice
drwxr-xr-x root root 0 B Sun Apr  3 11:24:39 2022  user.slice

I already tried to do this,
sudo echo "+cpu" >> /sys/fs/cgroup/cgroup.subtree_control and it does not work.


Solution

  • Ok, the problem is the kernel version (linux-tkg-pds), the original version is:

    
    $ pacman -Qi linux-tkg-pds
    Nombre                    : linux-tkg-pds
    Versión                   : 5.17.1-249
    ...
    

    I'm install the package linux

    $ pacman -Qi linux
    Nombre                    : linux
    Versión                   : 5.17.1.arch1-1
    ...