Skip to main content

xnuma_check_active

Function xnuma_check_active 

Source
pub(crate) fn xnuma_check_active(
    duty_sums: &[f64],
    allocs: &[usize],
    threshold: (f64, f64),
    threshold_delta: (f64, f64),
    growth_denied: &[bool],
    currently_active: &[bool],
) -> Vec<bool>
Expand description

Determine per-node migration source state with two-threshold hysteresis.

Each (layer, node) independently decides if it’s a migration source. Open (is_mig_src=true) requires all three:

  1. load/alloc > threshold.1 (significant load)
  2. surplus/alloc > delta.1 (significant imbalance)
  3. growth_denied (allocation can’t solve it)

Close (is_mig_src=false) when any one:

  1. load/alloc < threshold.0 (load dropped)
  2. surplus/alloc < delta.0 (imbalance resolved)
  3. !growth_denied (growth succeeded)