From: Frederic Weisbecker <frederic@kernel.org>
To: Nicholas Piggin <npiggin@gmail.com>
Cc: Peter Zijlstra <peterz@infradead.org>,
linux-kernel@vger.kernel.org, Ingo Molnar <mingo@redhat.com>,
Qais Yousef <qais.yousef@arm.com>
Subject: Re: [PATCH v2] kernel/isolation: Assert that a housekeeping CPU comes up at boot time
Date: Tue, 25 Jun 2019 03:11:18 +0200 [thread overview]
Message-ID: <20190625011117.GC17497@lerouge> (raw)
In-Reply-To: <20190625001720.19439-1-npiggin@gmail.com>
On Tue, Jun 25, 2019 at 10:17:20AM +1000, Nicholas Piggin wrote:
> +static int __init housekeeping_verify_smp(void)
> +{
> + int cpu;
> +
> + if (!housekeeping_flags)
> + return 0;
> +
> + /*
> + * Early housekeeping setup is done before CPUs come up, and there are
> + * a range of options scattered around that can restrict which CPUs
> + * come up. It is possible to pass in a combination of housekeeping
> + * and SMP arguments that result in housekeeping assigned to an
> + * offline CPU.
> + *
> + * Check that condition here after SMP comes up, and give a useful
> + * error message rather than an obscure non deterministic crash or
> + * hang later.
> + */
> + for_each_online_cpu(cpu) {
> + if (cpumask_test_cpu(cpu, housekeeping_mask))
> + return 0;
> + }
> + panic("Housekeeping: nohz_full= or isolcpus= resulted in no online CPUs for housekeeping.\n");
Ok let's keep the panic. But let's simplify and spare long iterations off boot load:
if (!cpumask_intersects(cpu_online_mask, housekeeping_mask))
panic(...);
Thanks.
next prev parent reply other threads:[~2019-06-25 1:11 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-06-25 0:17 [PATCH v2] kernel/isolation: Assert that a housekeeping CPU comes up at boot time Nicholas Piggin
2019-06-25 1:11 ` Frederic Weisbecker [this message]
2019-06-25 9:27 ` Qais Yousef
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20190625011117.GC17497@lerouge \
--to=frederic@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=npiggin@gmail.com \
--cc=peterz@infradead.org \
--cc=qais.yousef@arm.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox