sched/isolation: Warn about missing isolcpus mask
Valentin Schneider
reviewerPATCH 1/1 sched/isolation: Warn about missing isolcpus mask
Since an empty string is a valid cpulist, this cmdline option does not trigger any warnings:
isolcpus=domain,
housekeeping_setup() just carries on and we end up with the housekeeping mask being all CPUs in the system.
Check that there *is* a cpulist and that it isn't empty.
Signed-off-by Valentin Schneider <[email protected]>
--- kernel/sched/isolation.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
kernel/sched/isolation.c +2 -1
@@ -120,7 +120,8 @@ static int __init housekeeping_setup(char *str, unsigned long flags) }alloc_bootmem_cpumask_var (&non_housekeeping_mask); -if (cpulist_parse (str, non_housekeeping_mask) <0 ) { +if (cpulist_parse (str, non_housekeeping_mask) <0 || +cpumask_empty (non_housekeeping_mask)) {pr_warn ("Housekeeping: nohz_full= or isolcpus= incorrect CPU range\n" ); goto free_non_housekeeping_mask; }
Signature · 1 line
2.43.0
Quoted 11 lines · Valentin Schneider
Since an empty string is a valid cpulist, this cmdline option does not trigger any warnings:
isolcpus=domain,
housekeeping_setup()just carries on and we end up with the housekeeping mask being all CPUs in the system.Check that there *is* a cpulist and that it isn't empty.
Signed-off-by Valentin Schneider <[email protected]>