Messages in this thread | | | Date | Mon, 20 Jul 2015 17:02:40 +0200 | From | Joerg Roedel <> | Subject | Re: [PATCH] x86/smpboot: Check for cpu_active on cpu initialization |
| |
On Mon, Jul 20, 2015 at 04:46:19PM +0200, Borislav Petkov wrote: > On Thu, Jul 16, 2015 at 11:17:17AM +0200, Joerg Roedel wrote: > > The reason is that the cpu_active bit for the new CPU > > becomes visible significantly later than the cpu_online bit. > > I see > > void set_cpu_online(unsigned int cpu, bool online) > { > if (online) { > cpumask_set_cpu(cpu, to_cpumask(cpu_online_bits)); > cpumask_set_cpu(cpu, to_cpumask(cpu_active_bits)); > } else { > > which is called in start_secondary(). > > Do you mean that setting the bit in cpu_active_mask gets delayed soo > much? Because it comes right after setting the bit in cpu_online_mask.
Yes, cpu_active becomes either set a lot later in a KVM guest, when the host decides to preempt the vCPU right after setting cpu_online, but before cpu_active is set, or on bare-metal.
I have seen a report where this happens on bare metal, when the change to the cpu_active bit becomes visible on the other CPU significantly later than the the cpu_online bit. This happened on a pretty big machine with 88 cores.
Joerg
| |