lkml.org 
[lkml]   [2019]   [Jul]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [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

\
 
 \ /
  Last update: 2019-07-22 11:43    [W:0.055 / U:0.300 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site