Skip to content

Commit

Permalink
Support reading cpu.max from cgroups v2
Browse files Browse the repository at this point in the history
  • Loading branch information
OrionNebula committed Sep 27, 2022
1 parent 354348c commit 4f5bf8b
Show file tree
Hide file tree
Showing 7 changed files with 300 additions and 115 deletions.
1 change: 1 addition & 0 deletions fixtures/cgroups2/cgroups/ceil/cpu.max
@@ -0,0 +1 @@
150000 100000
1 change: 1 addition & 0 deletions fixtures/cgroups2/cgroups/good/cpu.max
@@ -0,0 +1 @@
600000 100000
1 change: 1 addition & 0 deletions fixtures/cgroups2/cgroups/zero-period/cpu.max
@@ -0,0 +1 @@
600000 0
2 changes: 2 additions & 0 deletions fixtures/cgroups2/proc/cgroups/cgroup
@@ -0,0 +1,2 @@
12::/
3::/user.slice
3 changes: 3 additions & 0 deletions fixtures/cgroups2/proc/cgroups/cgroup_multi
@@ -0,0 +1,3 @@
12::/
11:cpu,cpuacct:/
3::/user.slice
5 changes: 5 additions & 0 deletions fixtures/cgroups2/proc/cgroups/mountinfo
@@ -0,0 +1,5 @@
1 0 8:1 / / rw,noatime shared:1 - ext4 /dev/sda1 rw,errors=remount-ro,data=reordered
2 1 0:1 / /dev rw,relatime shared:2 - devtmpfs udev rw,size=10240k,nr_inodes=16487629,mode=755
3 1 0:2 / /proc rw,nosuid,nodev,noexec,relatime shared:3 - proc proc rw
4 1 0:3 / /sys rw,nosuid,nodev,noexec,relatime shared:4 - sysfs sysfs rw
5 4 0:4 / /sys/fs/cgroup rw,nosuid,nodev,noexec,relatime shared:5 - cgroup2 cgroup2 rw,nsdelegate,memory_recursiveprot

0 comments on commit 4f5bf8b

Please sign in to comment.