Files
Strata/include/strata/kernels
Niko1221 9e52144fc9 CPU pool: read the tightest cgroup CPU quota up to the mount's root
The container CPU quota that caps the default worker count was read from
the root of the cgroup mount only. That is the process's own group when the
container has its own cgroup namespace, but not for a systemd service or
scope, an older runtime, or a limit set on a parent group: there the mount
shows the host's tree and the limit sits in the group or above it.

container_cpu_quota() now reads /proc/self/cgroup and takes the smallest
quota from the process's group up to the root, for cgroup v2 (cpu.max) and
v1 (cpu.cfs_quota_us / cpu.cfs_period_us), as the memory guard already does.
A mount that is the container's own group reads as before.

cgroup_cpu_test runs it against a fake cgroup tree: own namespace, a limit
on a parent, a tighter and a looser group limit, a missing path, v1, and a
hybrid system.
2026-11-13 17:21:27 +01:00
..