All of lore.kernel.org
 help / color / mirror / Atom feed
From: Borislav Petkov <bp@alien8.de>
To: Huang Rui <ray.huang@amd.com>
Cc: Peter Zijlstra <peterz@infradead.org>,
	Sherry Hurwitz <sherry.hurwitz@amd.com>,
	tglx@linutronix.de, linux-kernel@vger.kernel.org,
	mingo@kernel.org, aherrmann@suse.com, jencce.kernel@gmail.com,
	Gang Long <gang.long@amd.com>
Subject: Re: [PATCH 2/3] x86/topology: Fix AMD core count
Date: Mon, 21 Mar 2016 14:57:34 +0100	[thread overview]
Message-ID: <20160321135734.GE15904@pd.tnic> (raw)
In-Reply-To: <20160321094611.GB26555@hr-amur2>

On Mon, Mar 21, 2016 at 05:46:12PM +0800, Huang Rui wrote:
> OK, maybe, we would better add a comment to explain here. :-)

Here's a start:

---
From: Borislav Petkov <bp@suse.de>
Date: Mon, 21 Mar 2016 14:53:05 +0100
Subject: [PATCH] x86/Documentation: Start documenting x86 topology

This should contain important aspects of how we represent the system
topology on x86. If people have questions about it and this file doesn't
answer it, then it must be updated.

Signed-off-by: Borislav Petkov <bp@suse.de>
---
 Documentation/x86/topology.txt | 34 ++++++++++++++++++++++++++++++++++
 1 file changed, 34 insertions(+)
 create mode 100644 Documentation/x86/topology.txt

diff --git a/Documentation/x86/topology.txt b/Documentation/x86/topology.txt
new file mode 100644
index 000000000000..828e953869d4
--- /dev/null
+++ b/Documentation/x86/topology.txt
@@ -0,0 +1,34 @@
+x86 Topology
+============
+
+This documents and clarifies the main aspects of x86 topology modelling
+and representation in the kernel. Update/change when doing changes to
+the respective code.
+
+Started by Borislav Petkov <bp@alien8.de>.
+
+The main aim of the topology facilities is to present adequate
+interfaces to code which needs to know/query/use the structure of the
+running system wrt threads, cores, nodes, etc.
+
+* cpuinfo_x86.x86_max_cores: the number of cores on a node, as reported
+by CPUID. Now, in order to accomodate both Intel and AMD, this variable
+means the following:
+
+- Intel: the number of cores in a processor. A core can have 1, 2 or
+more logical threads (hyperthreaded).
+
+- AMD: the number of cores in a processor. On a system where cores are
+clustered in groups of 2, 4 or more in compute units, this variable
+denotes the number of *compute units* on the node.
+
+In both cases, the number of scheduling threads is computed by doing:
+
+	x86_max_cores * smp_num_siblings
+
+This means:
+
+* smp_num_siblings: the number of siblings in a core. On AMD with
+compute units, this number is the number of compute unit siblings,
+i.e., compute unit cores in a single compute unit, according to their
+nomenclature.
-- 
2.7.3

-- 
Regards/Gruss,
    Boris.

ECO tip #101: Trim your mails when you reply.

  reply	other threads:[~2016-03-21 13:57 UTC|newest]

Thread overview: 59+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-03-18 15:03 [PATCH 0/3] x86 topology fixes Peter Zijlstra
2016-03-18 15:03 ` [PATCH 1/3] x86/topology: Fix logical pkg mapping Peter Zijlstra
2016-03-19  9:30   ` [tip:x86/urgent] x86/topology: Fix logical package mapping tip-bot for Peter Zijlstra
2016-03-18 15:03 ` [PATCH 2/3] x86/topology: Fix AMD core count Peter Zijlstra
2016-03-18 16:41   ` Borislav Petkov
2016-03-21  3:07     ` Huang Rui
2016-03-21  3:46       ` Huang Rui
2016-03-21  8:26         ` Borislav Petkov
2016-03-21  9:18           ` Huang Rui
2016-03-21  8:56         ` Thomas Gleixner
2016-03-21  8:21       ` Peter Zijlstra
2016-03-21  9:46         ` Huang Rui
2016-03-21 13:57           ` Borislav Petkov [this message]
2016-03-22  8:10             ` Sherry Hurwitz
2016-03-22 11:22               ` Borislav Petkov
2016-03-21  8:23       ` Borislav Petkov
2016-03-21 10:05         ` Huang Rui
2016-03-21 10:23           ` Borislav Petkov
2016-03-19  9:24   ` Thomas Gleixner
2016-03-19 15:56     ` Borislav Petkov
2016-03-20 10:39     ` Peter Zijlstra
2016-03-20 11:04       ` Borislav Petkov
2016-03-20 12:32         ` Peter Zijlstra
2016-03-20 12:46           ` Peter Zijlstra
2016-03-20 13:09             ` Borislav Petkov
2016-03-20 17:08               ` Peter Zijlstra
2016-03-20 18:46                 ` Borislav Petkov
2016-03-29  8:49             ` [tip:x86/urgent] perf/x86/amd: Cleanup Fam10h NB event constraints tip-bot for Peter Zijlstra
2016-03-22  7:56   ` [PATCH 2/3] x86/topology: Fix AMD core count Huang Rui
2016-03-18 15:03 ` [PATCH 3/3] x86/topology: Fix Intel HT disable Peter Zijlstra
2016-03-19  9:31   ` [tip:x86/urgent] " tip-bot for Peter Zijlstra
  -- strict thread matches above, loose matches on Subject: below --
2016-03-16  6:48 4.5.0+ panic when setup loop device Xiong Zhou
2016-03-16 15:26 ` Thomas Gleixner
2016-03-17  1:56   ` Xiong Zhou
2016-03-17  9:52     ` Peter Zijlstra
2016-03-17  9:56       ` Peter Zijlstra
2016-03-17 10:21       ` Thomas Gleixner
2016-03-17 10:26         ` Peter Zijlstra
2016-03-17 11:39           ` Thomas Gleixner
2016-03-17 11:51             ` Peter Zijlstra
2016-03-17 11:57               ` Borislav Petkov
2016-03-17 12:01               ` Thomas Gleixner
2016-03-17 16:42                 ` Jens Axboe
2016-03-17 18:26                   ` Jens Axboe
2016-03-17 20:20                     ` Thomas Gleixner
2016-03-17 20:23                       ` Jens Axboe
2016-03-17 20:30                         ` Thomas Gleixner
2016-03-17 20:41                           ` Jens Axboe
2016-03-18  2:31             ` Xiong Zhou
2016-03-18  4:11       ` Mike Galbraith
2016-03-18  7:51         ` Peter Zijlstra
2016-03-18 10:15         ` Peter Zijlstra
2016-03-18 12:39           ` Mike Galbraith
2016-03-18 13:32             ` Peter Zijlstra
2016-03-18 14:07               ` Mike Galbraith
2016-03-18 11:55         ` Thomas Gleixner
2016-03-18 12:39           ` Mike Galbraith
2016-03-19  9:31           ` [tip:x86/urgent] x86/topology: Use total_cpus not nr_cpu_ids for logical packages tip-bot for Thomas Gleixner
2016-03-29  8:48       ` [tip:x86/urgent] x86/topology: Fix AMD core count tip-bot for Peter Zijlstra

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=20160321135734.GE15904@pd.tnic \
    --to=bp@alien8.de \
    --cc=aherrmann@suse.com \
    --cc=gang.long@amd.com \
    --cc=jencce.kernel@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@kernel.org \
    --cc=peterz@infradead.org \
    --cc=ray.huang@amd.com \
    --cc=sherry.hurwitz@amd.com \
    --cc=tglx@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.