[PATCH 7/7] rteval: Warn when all CPUs isolated and loads have no CPUs
John Kacur <[email protected]> Thu, 30 Apr 2026 15:31:44 -0400
| Newsgroups | org.kernel.vger.linux-rt-users |
|---|---|
| Message-ID | <[email protected]> |
Add a warning when all online CPUs are isolated (via isolcpus boot parameter) and the loads cpulist is empty. This edge case occurs when a user isolates all CPUs but doesn't explicitly specify where loads should run, resulting in loads having no CPUs available. The warning guides users to specify --loads-cpulist explicitly in this rare configuration. Example scenario that triggers the warning: - Boot parameter: isolcpus=0-15 (all CPUs) - Command: rteval --cpusets -d 60s (no explicit CPU lists) - Result: Loads default cpulist would be empty The warning appears as: "All CPUs are isolated and loads have no CPUs assigned. Specify --loads-cpulist explicitly to choose where loads should run." Assisted-by: Claude Sonnet 4.5 <[email protected]> Signed-off-by: John Kacur <[email protected]> --- rteval-cmd | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/rteval-cmd b/rteval-cmd index 37db9e5e2ce2..c48c3d89b82e 100755 --- a/rteval-cmd +++ b/rteval-cmd @@ -477,6 +477,15 @@ if __name__ == '__main__': tmplist = [cpu for cpu in tmplist if cpu not in housekeeping_cpus] msrcfg.cpulist = collapse_cpulist(tmplist) + # Warn if all CPUs are isolated and loads have no CPUs + if not ldcfg.cpulist: + isolated_cpus = SysTopology().isolated_cpus() + online_cpus = SysTopology().online_cpus() + if isolated_cpus and set(isolated_cpus) == set(online_cpus): + logger.log(Log.WARN, + "All CPUs are isolated and loads have no CPUs assigned. " + "Specify --loads-cpulist explicitly to choose where loads should run.") + if ldcfg_cpulist_present: logger.log(Log.DEBUG, f"loads cpulist: {ldcfg.cpulist}") # if --onlyload is specified msrcfg.cpulist is unused -- 2.54.0