lkml.org 
[lkml]   [2019]   [Jun]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v2] kernel/isolation: Assert that a housekeeping CPU comes up at boot time
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.

\
 
 \ /
  Last update: 2019-06-25 03:13    [W:0.059 / U:2.944 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site