All of lore.kernel.org
 help / color / mirror / Atom feed
From: Linus Torvalds <torvalds@linux-foundation.org>
To: speck@linutronix.de
Subject: [MODERATED] Re: [patch V2 12/12] x86/apic: Ignore secondary threads if nosmt=force
Date: Wed, 6 Jun 2018 12:59:19 -0700 (PDT)	[thread overview]
Message-ID: <alpine.LFD.2.21.999.1806061245350.12980@i7.lan> (raw)
In-Reply-To: <20180606192807.929619226@linutronix.de>



On Wed, 6 Jun 2018, speck for Thomas Gleixner wrote:
> 
> nosmt=force makes the APIC detection code ignore the secondary SMT siblings
> completely, so they even do not show up as possible CPUs. This is more or
> less equivalent to disabling SMT in the BIOS.

So if we go down this route, I do think it should be very clearly 
documented that the BIOS disable can (and does) end up having resource 
allocation advantages that we cannot do in software later on.

The intel optimization manual is not very clear on what the partitioning 
rules are.

I find:

  "In general, the buffers for staging instructions between major pipe 
   stages  are partitioned. These buffers include µop queues after the  
   execution trace cache, the queues after the register rename stage, the
   reorder buffer which stages instructions for retirement, and the load 
   and store buffers.

   In the case of load and store buffers, partitioning also provided an 
   easier implementation to maintain memory ordering for each logical 
   processor and detect memory ordering violations"

but some of that partitioning may be relaxed if the HT thread is "not 
active":

  "In Intel microarchitecture code name Sandy Bridge, the micro-op queue 
   is statically partitioned to provide 28 entries for each logical 
   processor,  irrespective of software executing in single thread or 
   multiple threads. If one logical processor is not active in Intel 
   microarchitecture code name Ivy Bridge, then a single thread executing 
   on that processor  core can use the 56 entries in the micro-op queue"

but I do not know what "not active" means, and how dynamic it is. Some of 
that partitioning may be entirely static and depend on the early BIOS 
disabling of HT, and even if we park the cores, the resources will just be 
wasted.

From the above, it does sound like even if some of the instruction queues 
may be relaxed when one thread is idle (if that is what "not active") 
means, load and store buffers may be entirely statically partitioned. 

So I would really wanmt to have a big note along with the

  "This is more or less equivalent to disabling SMT in the BIOS"

because on some loads it might be a case of "less equivalent" than not.

               Linus

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

Thread overview: 48+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-06-06 19:27 [patch V2 00/12] cpu/hotplug: SMT control Thomas Gleixner
2018-06-06 19:27 ` [patch V2 01/12] sched/smt: Update sched_smt_present at runtime Thomas Gleixner
2018-06-11 18:35   ` [MODERATED] " Konrad Rzeszutek Wilk
2018-06-15 13:17     ` Thomas Gleixner
2018-06-21 11:22     ` [MODERATED] " Peter Zijlstra
2018-06-06 19:27 ` [patch V2 02/12] x86/smp: Provide topology_is_primary_thread() Thomas Gleixner
2018-06-11 19:32   ` [MODERATED] " Konrad Rzeszutek Wilk
2018-06-11 20:15     ` Konrad Rzeszutek Wilk
2018-06-12 10:27       ` Andrew Cooper
2018-06-12  8:05     ` Thomas Gleixner
2018-06-12 10:31       ` [MODERATED] " Andrew Cooper
2018-06-12 20:02         ` Konrad Rzeszutek Wilk
2018-06-06 19:27 ` [patch V2 03/12] cpu/hotplug: Make bringup/teardown of smp threads symmetric Thomas Gleixner
2018-06-11 20:55   ` [MODERATED] " Konrad Rzeszutek Wilk
2018-06-06 19:27 ` [patch V2 04/12] cpu/hotplug: Split do_cpu_down() Thomas Gleixner
2018-06-11 20:56   ` [MODERATED] " Konrad Rzeszutek Wilk
2018-06-06 19:27 ` [patch V2 05/12] cpu/hotplug: Provide knob to control SMT Thomas Gleixner
2018-06-11 21:22   ` [MODERATED] " Konrad Rzeszutek Wilk
2018-06-20 20:00   ` Dave Hansen
2018-06-20 20:11     ` Thomas Gleixner
2018-06-20 20:25   ` [MODERATED] " Dave Hansen
2018-06-20 20:52     ` Thomas Gleixner
2018-06-06 19:27 ` [patch V2 06/12] x86/cpu: Remove the pointless CPU printout Thomas Gleixner
2018-06-11 21:23   ` [MODERATED] " Konrad Rzeszutek Wilk
2018-06-06 19:27 ` [patch V2 07/12] x86/cpu/AMD: Remove the pointless detect_ht() call Thomas Gleixner
2018-06-11 21:24   ` [MODERATED] " Konrad Rzeszutek Wilk
2018-06-06 19:27 ` [patch V2 08/12] x86/cpu/common: Provide detect_ht_early() Thomas Gleixner
2018-06-12 20:22   ` [MODERATED] " Konrad Rzeszutek Wilk
2018-06-06 19:27 ` [patch V2 09/12] x86/cpu/topology: Provide detect_extended_topology_early() Thomas Gleixner
2018-06-12 20:33   ` [MODERATED] " Konrad Rzeszutek Wilk
2018-06-06 19:27 ` [patch V2 10/12] x86/cpu/intel: Evaluate smp_num_siblings early Thomas Gleixner
2018-06-12 20:44   ` [MODERATED] " Konrad Rzeszutek Wilk
2018-06-15 14:02     ` Thomas Gleixner
2018-06-06 19:27 ` [patch V2 11/12] x86/cpu/AMD: " Thomas Gleixner
2018-06-06 19:27 ` [patch V2 12/12] x86/apic: Ignore secondary threads if nosmt=force Thomas Gleixner
2018-06-06 19:59   ` Linus Torvalds [this message]
2018-06-06 21:50     ` Thomas Gleixner
2018-06-12 20:51   ` [MODERATED] " Konrad Rzeszutek Wilk
2018-06-15 14:11     ` Thomas Gleixner
2018-06-06 23:16 ` [MODERATED] Re: [patch V2 00/12] cpu/hotplug: SMT control Andi Kleen
2018-06-07  6:50   ` Thomas Gleixner
2018-06-07  7:42     ` [MODERATED] " Jiri Kosina
2018-06-07 20:36       ` Andi Kleen
2018-06-07 20:42     ` Andi Kleen
2018-06-07 15:30 ` Konrad Rzeszutek Wilk
2018-06-07 15:43   ` Thomas Gleixner
2018-06-08 17:51 ` [MODERATED] " Josh Poimboeuf
2018-06-11 19:40 ` Jiri Kosina

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=alpine.LFD.2.21.999.1806061245350.12980@i7.lan \
    --to=torvalds@linux-foundation.org \
    --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.