acquire_build_reservation_waiting

Function acquire_build_reservation_waiting 

Source
pub fn acquire_build_reservation_waiting(
    cli_label: &str,
    cpu_cap: Option<CpuCap>,
) -> Result<BuildReservation>
Expand description

Acquire a build reservation, joining the progress-aware host queue when perf-mode work temporarily owns too much LLC capacity.

Harness prebuilds use this variant because many independent CI invocations compile concurrently and have no source-tree lock to serialize them. The resolved CPU budget is a ceiling: this path immediately takes the largest non-empty placement that does not overlap an exact VM reservation, and derives Cargo/make parallelism from that actual placement. It joins the queue only while every compatible CPU is occupied, then repeats that largest-fit plan on each wake. Direct kernel builds (acquire_build_reservation) instead hold a fixed exact width, but they too wait work-conservingly on that width through the same host queue rather than giving up the lane under transient contention.