Function get_representative_pcpu

Source
fn get_representative_pcpu(
    vcpu_id: usize,
    vcpu_affinity: &Option<VcpuAffinity>,
) -> usize
Expand description

For vcpu_id, return the pcpu that it’s affined to. It’s considered the “representative” pcpu since there could be multiple pcpu’s affined to a single vcpu, so arbitrarily return the first pcpu we see. This “shouldn’t” be an issue since ideally all the affined pcpu’s have the same capacity, frequency, etc.