pub fn resize_cgroup_bw(
open_obj: &mut OpenObject,
nr_cgrp_max: u32,
tree_height_max: u32,
nr_llcs: usize,
) -> Result<()>Expand description
Size the lib/cgroup_bw (cpu.max) BPF maps for the running system.
Call once between opening and loading the skeleton. A BPF map’s
max_entries is fixed at load time, so every runtime-dependent size is set
here:
nr_cgrp_maxcaps the number of managed cgroups: it sizescbw_cgrp_mapand the two cgroup-id tables. The caller must mirror it to thenr_cgrp_maxrodata so the BPF admission gate matches the map sizes.tree_height_maxcaps the managed cgroup nesting depth: it sizestree_levels_map(a per-CPU per-level accumulator). The caller must mirror it to thetree_height_maxrodata.nr_llcssizescbw_cgrp_llc_map(one entry per LLC per tracked cgroup) tonr_cgrp_max * nr_llcs.