[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20240110114610.1941474-1-vschneid@redhat.com>
Date: Wed, 10 Jan 2024 12:46:10 +0100
From: Valentin Schneider <vschneid@...hat.com>
To: linux-kernel@...r.kernel.org
Cc: Ingo Molnar <mingo@...hat.com>,
Peter Zijlstra <peterz@...radead.org>,
Juri Lelli <juri.lelli@...hat.com>,
Vincent Guittot <vincent.guittot@...aro.org>,
Dietmar Eggemann <dietmar.eggemann@....com>,
Steven Rostedt <rostedt@...dmis.org>,
Ben Segall <bsegall@...gle.com>,
Mel Gorman <mgorman@...e.de>,
Daniel Bristot de Oliveira <bristot@...hat.com>,
Frederic Weisbecker <frederic@...nel.org>
Subject: [PATCH] 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 <vschneid@...hat.com>
---
kernel/sched/isolation.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/kernel/sched/isolation.c b/kernel/sched/isolation.c
index 373d42c707bc5..aa20cd1702199 100644
--- a/kernel/sched/isolation.c
+++ b/kernel/sched/isolation.c
@@ -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;
}
--
2.43.0
Powered by blists - more mailing lists