[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <alpine.DEB.2.21.1907221137090.1782@nanos.tec.linutronix.de>
Date: Mon, 22 Jul 2019 11:41:29 +0200 (CEST)
From: Thomas Gleixner <tglx@...utronix.de>
To: Pingfan Liu <kernelfans@...il.com>
cc: x86@...nel.org, "Peter Zijlstra (Intel)" <peterz@...radead.org>,
Rik van Riel <riel@...riel.com>,
Josh Poimboeuf <jpoimboe@...hat.com>,
Ingo Molnar <mingo@...nel.org>, Jiri Kosina <jkosina@...e.cz>,
Mukesh Ojha <mojha@...eaurora.org>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
Andy Lutomirski <luto@...capital.net>,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH] smp: force all cpu to boot once under maxcpus option
On Wed, 10 Jul 2019, Pingfan Liu wrote:
>
> +static inline bool maxcpus_allowed(unsigned int cpu)
> +{
> + /* maxcpus only takes effect during system bootup */
> + if (smp_boot_done)
> + return true;
> + if (num_online_cpus() < setup_max_cpus)
> + return true;
> + /*
> + * maxcpus should allow cpu to set CR4.MCE asap, otherwise the set may
> + * be deferred indefinitely.
> + */
> + if (!per_cpu(cpuhp_state, cpu).booted_once)
> + return true;
As this is a x86 only issue, you cannot inflict this magic on every
architecture.
Aside of that this does not solve the problem at all because smp_init()
still does:
for_each_present_cpu(cpu) {
if (num_online_cpus() >= setup_max_cpus)
break;
if (!cpu_online(cpu))
cpu_up(cpu);
}
So the remaining CPUs are not onlined at all.
Thanks,
tglx
Powered by blists - more mailing lists