Merge pull request #906 from hodgesds/layered-verifier-fix

scx_layered: Fix verifier issue when tracing
This commit is contained in:
Daniel Hodges 2024-11-07 14:51:15 +00:00 committed by GitHub
commit d7e1f697e0
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -398,7 +398,7 @@ static void initialize_budgets(u64 refresh_intvl_ns)
layer_weight_dur = (HI_FALLBACK_DSQ_WEIGHT * slice_ns * refresh_intvl_ns) /
layer_weight_sum;
initialize_budget(costc, budget_id, (s64)layer_weight_dur);
if (cpu == 0 && llc_id == 0)
if (cpu == 0 && llc_id == 0 && budget_id < MAX_GLOBAL_BUDGETS)
trace("COST CPU DSQ[%d][%d] budget %lld",
cpu, budget_id, costc->budget[budget_id]);
}