From 89b11a7a71bb6badf8e6f66ead81fde85931b22a Mon Sep 17 00:00:00 2001 From: "Alexander M. Merritt" Date: Tue, 17 Nov 2026 18:37:29 -0500 Subject: [PATCH] feat(control): limit a zone's CPU time A zone's vCPU count is a whole number because the guest kernel sees it, so a client cannot ask for a fraction of a CPU, such as the 250m a Kubernetes pod limit often holds. cpu_limit_millicpus asks the hypervisor to hold the zone to that share of physical CPU time instead, whatever its vCPU count. The field is optional because UpdateZoneResources replaces a zone's resources as a whole. A client built before the field leaves it unset, and that has to keep the zone's limit, not remove it. Signed-off-by: Alexander M. Merritt --- protect/control/v1/common.proto | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/protect/control/v1/common.proto b/protect/control/v1/common.proto index 293ad11..dabef60 100644 --- a/protect/control/v1/common.proto +++ b/protect/control/v1/common.proto @@ -83,6 +83,11 @@ message ZoneResourcesSpec { uint32 target_cpus = 4; VcpuAffinitiesSpecSet cpus_affinities_set = 8; ZoneResourceAdjustmentPolicy adjustment_policy = 5; + // CPU time the zone may use, in thousandths of one physical CPU; unset or 0 + // means no limit. In UpdateZoneResources, unset keeps the zone's limit and 0 + // removes it. At most max_cpus * 1000; a zone created without vCPU counts + // gets enough vCPUs for its limit. + optional uint32 cpu_limit_millicpus = 9; } message KernelModuleParameter {