All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andrew Cooper <andrew.cooper3@citrix.com>
To: speck@linutronix.de
Subject: [MODERATED] Re: [patch V4 13/13] x86/apic: Ignore secondary threads if nosmt=force
Date: Thu, 28 Jun 2018 23:19:00 +0100	[thread overview]
Message-ID: <1bca3675-86eb-15df-bcfe-2ee36167f15c@citrix.com> (raw)
In-Reply-To: <9a4cea33-05a7-b6d9-7f49-692603bd047f@linux.intel.com>

[-- Attachment #1: Type: text/plain, Size: 2113 bytes --]

On 28/06/2018 23:13, speck for Dave Hansen wrote:
> On 06/20/2018 01:19 PM, speck for Thomas Gleixner wrote:
>> +	/*
>> +	 * If SMT is force disabled and the APIC ID belongs to
>> +	 * a secondary thread, ignore it.
>> +	 */
>> +	if (apic_id_disabled(apicid)) {
>> +		pr_info_once("Ignoring secondary SMT threads\n");
>> +		return -EINVAL;
>> +	}
> Thomas, this boottime-disable stuff just ends up ignoring the
> hyperthread and leaves it alone, right?

Yes

>
> Some Intel folks pointed out a few problems with this.  One is with
> machine checks.  If one thread is booted and has CR4.MCE=1, but the
> other never gets booted and still has CR4.MCE=0, things go boom
> (everything goes to shutdown state) if a machine check happens.
>
> We've traditionally pretended that this does not happen because folks
> don't tend to turn off CPUs they've paid for via things like maxcpus= in
> the real world.
>
> Ashok Raj and Tony Luck were evidently looking at this at some point,
> but it got tricky and decided it wasn't worth the trouble.
>
> It makes me think we should either scrap or recommend against "nosmt=force".
>
> Some relevant SDM language:
>
>> Because the logical processors within a physical package are tightly
>> coupled with respect to shared hardware resources, both logical
>> processors are notified of machine check errors that occur within a
>> given physical processor. If machine-check exceptions are enabled
>> when a fatal error is reported, all the logical processors within a
>> physical package are dispatched to the machine-check exception
>> handler. If machine-check exceptions are disabled, the logical
>> processors enter the shutdown state and assert the IERR# signal. When
>> enabling machine-check exceptions, the MCE flag in control register
>> CR4 should be set for each logical processor.

So what you're saying is that we need to boot all the threads, including
MCE setup etc, then leave them alone (mwait/deep C states?) so they
avoid causing a shutdown?

If so, I've got quite a lot of extra work to do in Xen...

~Andrew


  reply	other threads:[~2018-06-28 22:19 UTC|newest]

Thread overview: 33+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-06-20 20:19 [patch V4 00/13] SMT control knobs Thomas Gleixner
2018-06-20 20:19 ` [patch V4 01/13] sched/smt: Update sched_smt_present at runtime Thomas Gleixner
2018-06-20 20:19 ` [patch V4 02/13] x86/smp: Provide topology_is_primary_thread() Thomas Gleixner
2018-06-27 13:56   ` [MODERATED] " Josh Poimboeuf
2018-06-27 15:54     ` Thomas Gleixner
2018-06-27 16:20       ` [MODERATED] " Josh Poimboeuf
2018-06-27 16:52         ` Thomas Gleixner
2018-06-20 20:19 ` [patch V4 03/13] cpu/hotplug: Make bringup/teardown of smp threads symmetric Thomas Gleixner
2018-06-20 20:19 ` [patch V4 04/13] cpu/hotplug: Split do_cpu_down() Thomas Gleixner
2018-06-20 20:19 ` [patch V4 05/13] cpu/hotplug: Provide knobs to control SMT Thomas Gleixner
2018-06-20 23:05   ` [MODERATED] " Greg KH
2018-06-21  6:08     ` Thomas Gleixner
2018-06-20 20:19 ` [patch V4 06/13] x86/cpu: Remove the pointless CPU printout Thomas Gleixner
2018-06-20 20:19 ` [patch V4 07/13] x86/cpu/AMD: Remove the pointless detect_ht() call Thomas Gleixner
2018-06-20 20:19 ` [patch V4 08/13] x86/cpu/common: Provide detect_ht_early() Thomas Gleixner
2018-06-20 20:19 ` [patch V4 09/13] x86/cpu/topology: Provide detect_extended_topology_early() Thomas Gleixner
2018-06-20 20:19 ` [patch V4 10/13] x86/cpu/intel: Evaluate smp_num_siblings early Thomas Gleixner
2018-06-20 20:19 ` [patch V4 11/13] x86/CPU/AMD: Do not check CPUID max ext level before parsing SMP info Thomas Gleixner
2018-06-20 20:19 ` [patch V4 12/13] x86/cpu/AMD: Evaluate smp_num_siblings early Thomas Gleixner
2018-06-20 20:19 ` [patch V4 13/13] x86/apic: Ignore secondary threads if nosmt=force Thomas Gleixner
2018-06-20 21:44   ` [MODERATED] " Linus Torvalds
2018-06-28 22:13   ` Dave Hansen
2018-06-28 22:19     ` Andrew Cooper [this message]
2018-06-28 22:23     ` Luck, Tony
2018-06-28 22:29       ` Andrew Cooper
2018-06-29  8:26     ` [MODERATED] " Borislav Petkov
2018-06-29 17:01       ` Luck, Tony
2018-06-29 17:08         ` Linus Torvalds
2018-06-29 18:36           ` Thomas Gleixner
2018-06-29  8:50     ` Thomas Gleixner
2018-06-29 16:48       ` [MODERATED] " Dave Hansen
2018-06-20 20:53 ` [patch V4 00/13] SMT control knobs Thomas Gleixner
2018-06-21 11:52 ` [MODERATED] " Ingo Molnar

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=1bca3675-86eb-15df-bcfe-2ee36167f15c@citrix.com \
    --to=andrew.cooper3@citrix.com \
    --cc=speck@linutronix.de \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.