All of lore.kernel.org
 help / color / mirror / Atom feed
From: Peter Zijlstra <peterz@infradead.org>
To: Tom Lendacky <thomas.lendacky@amd.com>
Cc: linux-kernel@vger.kernel.org, linux-tip-commits@vger.kernel.org,
	Tim Chen <tim.c.chen@linux.intel.com>,
	Barry Song <song.bao.hua@hisilicon.com>,
	x86@kernel.org
Subject: Re: [tip: sched/core] sched: Add cluster scheduler level for x86
Date: Wed, 20 Oct 2021 21:51:31 +0200	[thread overview]
Message-ID: <20211020195131.GT174703@worktop.programming.kicks-ass.net> (raw)
In-Reply-To: <9e7b0c92-5a3b-8099-8c69-83a9d62aced4@amd.com>

On Wed, Oct 20, 2021 at 08:12:51AM -0500, Tom Lendacky wrote:
> On 10/15/21 4:44 AM, tip-bot2 for Tim Chen wrote:
> > The following commit has been merged into the sched/core branch of tip:
> > 
> > Commit-ID:     66558b730f2533cc2bf2b74d51f5f80b81e2bad0
> > Gitweb:        https://git.kernel.org/tip/66558b730f2533cc2bf2b74d51f5f80b81e2bad0
> > Author:        Tim Chen <tim.c.chen@linux.intel.com>
> > AuthorDate:    Fri, 24 Sep 2021 20:51:04 +12:00
> > Committer:     Peter Zijlstra <peterz@infradead.org>
> > CommitterDate: Fri, 15 Oct 2021 11:25:16 +02:00
> > 
> > sched: Add cluster scheduler level for x86
> > 
> > There are x86 CPU architectures (e.g. Jacobsville) where L2 cahce is
> > shared among a cluster of cores instead of being exclusive to one
> > single core.
> > 
> > To prevent oversubscription of L2 cache, load should be balanced
> > between such L2 clusters, especially for tasks with no shared data.
> > On benchmark such as SPECrate mcf test, this change provides a boost
> > to performance especially on medium load system on Jacobsville.  on a
> > Jacobsville that has 24 Atom cores, arranged into 6 clusters of 4
> > cores each, the benchmark number is as follow:
> > 
> >   Improvement over baseline kernel for mcf_r
> >   copies		run time	base rate
> >   1		-0.1%		-0.2%
> >   6		25.1%		25.1%
> >   12		18.8%		19.0%
> >   24		0.3%		0.3%
> > 
> > So this looks pretty good. In terms of the system's task distribution,
> > some pretty bad clumping can be seen for the vanilla kernel without
> > the L2 cluster domain for the 6 and 12 copies case. With the extra
> > domain for cluster, the load does get evened out between the clusters.
> > 
> > Note this patch isn't an universal win as spreading isn't necessarily
> > a win, particually for those workload who can benefit from packing.
> > 
> > Signed-off-by: Tim Chen <tim.c.chen@linux.intel.com>
> > Signed-off-by: Barry Song <song.bao.hua@hisilicon.com>
> > Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
> > Link: https://lore.kernel.org/r/20210924085104.44806-4-21cnbao@gmail.com
> 
> I've bisected to this patch which now results in my EPYC systems issuing a
> lot of:
> 
> [    4.788480] BUG: arch topology borken
> [    4.789578]      the SMT domain not a subset of the CLS domain
> 
> messages (one for each CPU in the system).
> 
> I haven't had a chance to dig deeper and understand everything, does anyone
> have some quick insights/ideas?

Urgh, sorry about that. So this stuff uses cpu_l2c_id to build 'clusters',
basically CPUs that share L2, as a subset of the 'multi-core' topology,
which is all CPUs that share LLC (L3 typically).

Your EPYC seems to think the SMT group is not a strict subset of the L2.
The implication is that you have threads with different L2, which would
franky be quite 'exotic' if true :-)


If it does boot, what does something like:

  for i in /sys/devices/system/cpu/cpu*/topology/*{_id,_list}; do echo -n "${i}: " ; cat $i; done

produce?

I'll try and figure out how AMD sets l2c_id, that stuff is always a bit
of a maze.

  reply	other threads:[~2021-10-20 19:54 UTC|newest]

Thread overview: 76+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-24  8:51 [PATCH RESEND 0/3] Represent cluster topology and enable load balance between clusters Barry Song
2021-09-24  8:51 ` Barry Song
2021-09-24  8:51 ` [PATCH RESEND 1/3] topology: Represent clusters of CPUs within a die Barry Song
2021-09-24  8:51   ` Barry Song
2021-10-05 16:33   ` Valentin Schneider
2021-10-05 16:33     ` Valentin Schneider
2021-10-05 20:43     ` Barry Song
2021-10-05 20:43       ` Barry Song
2021-10-06 10:50       ` Barry Song
2021-10-06 10:50         ` Barry Song
2021-10-06 12:18         ` Peter Zijlstra
2021-10-06 12:18           ` Peter Zijlstra
2021-10-06 12:50           ` Barry Song
2021-10-06 12:50             ` Barry Song
2021-10-06 13:55             ` Peter Zijlstra
2021-10-06 13:55               ` Peter Zijlstra
2021-10-07 10:30               ` Barry Song
2021-10-07 10:30                 ` Barry Song
2021-10-07 10:35                 ` Peter Zijlstra
2021-10-07 10:35                   ` Peter Zijlstra
2021-10-06 13:49       ` Valentin Schneider
2021-10-06 13:49         ` Valentin Schneider
2021-10-15  9:44   ` [tip: sched/core] " tip-bot2 for Jonathan Cameron
2021-09-24  8:51 ` [PATCH RESEND 2/3] scheduler: Add cluster scheduler level in core and related Kconfig for ARM64 Barry Song
2021-09-24  8:51   ` Barry Song
2021-10-05  7:35   ` Peter Zijlstra
2021-10-05  7:35     ` Peter Zijlstra
2021-10-05  9:01     ` Barry Song
2021-10-05  9:01       ` Barry Song
2021-10-05 10:40       ` Peter Zijlstra
2021-10-05 10:40         ` Peter Zijlstra
2021-09-24  8:51 ` [PATCH RESEND 3/3] scheduler: Add cluster scheduler level for x86 Barry Song
2021-09-24  8:51   ` Barry Song
2021-10-15  9:44   ` [tip: sched/core] sched: " tip-bot2 for Tim Chen
2021-10-20 13:12     ` Tom Lendacky
2021-10-20 19:51       ` Peter Zijlstra [this message]
2021-10-20 20:08         ` Tom Lendacky
2021-10-20 20:25           ` Peter Zijlstra
2021-10-20 20:36             ` Peter Zijlstra
2021-10-20 20:40               ` Tom Lendacky
2021-10-20 20:40               ` Peter Zijlstra
2021-10-20 20:51                 ` Tom Lendacky
2021-10-21 10:32                 ` Barry Song
2021-10-21 10:54                   ` Barry Song
2021-10-21 13:22                   ` Peter Zijlstra
2021-10-21 22:23                     ` Song Bao Hua (Barry Song)
2021-10-22 13:31                 ` Tom Lendacky
2021-10-22 13:36                   ` Peter Zijlstra
2021-10-01 10:32 ` [PATCH RESEND 0/3] Represent cluster topology and enable load balance between clusters Barry Song
2021-10-01 10:32   ` Barry Song
2021-10-01 10:39   ` Vincent Guittot
2021-10-01 10:39     ` Vincent Guittot
2021-10-01 14:57     ` Peter Zijlstra
2021-10-01 14:57       ` Peter Zijlstra
2021-10-01 23:22       ` Tim Chen
2021-10-01 23:22         ` Tim Chen
2021-10-02  7:09         ` Barry Song
2021-10-02  7:09           ` Barry Song
2021-10-04 22:54           ` Tim Chen
2021-10-04 22:54             ` Tim Chen
2021-10-05  7:54             ` Peter Zijlstra
2021-10-05  7:54               ` Peter Zijlstra
2021-10-05  8:04           ` Peter Zijlstra
2021-10-05  8:04             ` Peter Zijlstra
2021-10-05  9:06             ` Barry Song
2021-10-05  9:06               ` Barry Song
2021-10-05  7:50         ` Peter Zijlstra
2021-10-05  7:50           ` Peter Zijlstra
2021-10-05  9:15           ` Barry Song
2021-10-05  9:15             ` Barry Song
2021-10-05 10:58             ` Peter Zijlstra
2021-10-05 10:58               ` Peter Zijlstra
2021-10-05 13:42           ` Valentin Schneider
2021-10-05 13:42             ` Valentin Schneider
2021-10-05 13:50             ` Valentin Schneider
2021-10-05 13:50               ` Valentin Schneider

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=20211020195131.GT174703@worktop.programming.kicks-ass.net \
    --to=peterz@infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-tip-commits@vger.kernel.org \
    --cc=song.bao.hua@hisilicon.com \
    --cc=thomas.lendacky@amd.com \
    --cc=tim.c.chen@linux.intel.com \
    --cc=x86@kernel.org \
    /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.