Skip to content

Commit 4f0f2a4

Browse files
authored
Support reading cpu.max from cgroups v2 (#125)
1 parent 354348c commit 4f0f2a4

File tree

7 files changed

+300
-115
lines changed

7 files changed

+300
-115
lines changed

Diff for: fixtures/cgroups2/cgroups/ceil/cpu.max

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
150000 100000

Diff for: fixtures/cgroups2/cgroups/good/cpu.max

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
600000 100000

Diff for: fixtures/cgroups2/cgroups/zero-period/cpu.max

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
600000 0

Diff for: fixtures/cgroups2/proc/cgroups/cgroup

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
12::/
2+
3::/user.slice

Diff for: fixtures/cgroups2/proc/cgroups/cgroup_multi

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
12::/
2+
11:cpu,cpuacct:/
3+
3::/user.slice

Diff for: fixtures/cgroups2/proc/cgroups/mountinfo

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
1 0 8:1 / / rw,noatime shared:1 - ext4 /dev/sda1 rw,errors=remount-ro,data=reordered
2+
2 1 0:1 / /dev rw,relatime shared:2 - devtmpfs udev rw,size=10240k,nr_inodes=16487629,mode=755
3+
3 1 0:2 / /proc rw,nosuid,nodev,noexec,relatime shared:3 - proc proc rw
4+
4 1 0:3 / /sys rw,nosuid,nodev,noexec,relatime shared:4 - sysfs sysfs rw
5+
5 4 0:4 / /sys/fs/cgroup rw,nosuid,nodev,noexec,relatime shared:5 - cgroup2 cgroup2 rw,nsdelegate,memory_recursiveprot

0 commit comments

Comments
 (0)