From: "Chen, Yu C" <yu.c.chen@intel.com>
To: Peter Zijlstra <peterz@infradead.org>, Kyle Meyer <kyle.meyer@hpe.com>
Cc: <tim.c.chen@linux.intel.com>, <bp@alien8.de>,
<dave.hansen@linux.intel.com>, <mingo@redhat.com>,
<tglx@kernel.org>, <vinicius.gomes@intel.com>,
<brgerst@gmail.com>, <hpa@zytor.com>, <kprateek.nayak@amd.com>,
<linux-kernel@vger.kernel.org>, <patryk.wlazlyn@linux.intel.com>,
<rafael.j.wysocki@intel.com>, <russ.anderson@hpe.com>,
<x86@kernel.org>, <zhao1.liu@intel.com>
Subject: Re: [PATCH v2] sched/topology: Check average distances to remote packages
Date: Wed, 25 Feb 2026 23:39:54 +0800 [thread overview]
Message-ID: <eebeb874-af87-418c-94b5-430df8804fe8@intel.com> (raw)
In-Reply-To: <20260225123052.GN3016024@noisy.programming.kicks-ass.net>
On 2/25/2026 8:30 PM, Peter Zijlstra wrote:
> On Tue, Feb 24, 2026 at 07:43:10PM -0600, Kyle Meyer wrote:
>
[ ... ]
>
> And it also shows that using REMOTE_DISTANCE (20) was completely random
> and 'wrong'.
>
> So per 4d6dd05d07d0 ("sched/topology: Fix sched domain build error for GNR, CWF in SNC-3 mode")
>
> Tim's original crazy SNC-3 SLIT table was:
>
> node distances:
> node 0 1 2 3 4 5
> 0: 10 15 17 21 28 26
> 1: 15 10 15 23 26 23
> 2: 17 15 10 26 23 21
> 3: 21 28 26 10 15 17
> 4: 23 26 23 15 10 15
> 5: 26 23 21 17 15 10
>
> And per:
>
> https://lore.kernel.org/lkml/20250825075642.GQ3245006@noisy.programming.kicks-ass.net/
>
> My suggestion was to average the off-trace clusters to restore sanity.
>
In above example, the node distances become:
"Eg. since (21+28+26+23+26+23+26+23+21)/9 ~ 24, you end up with:
node 0 1 2 3 4 5
0: 10 15 17 24 24 24
1: 15 10 15 24 24 24
2: 17 15 10 24 24 24
3: 24 24 24 10 15 17
4: 24 24 24 15 10 15
5: 24 24 24 17 15 10
"
> +
> +static int slit_cluster_distance(int i, int j)
> +{
> + static int u = 0;
> + long d = 0;
> + int x, y;
> +
> + if (!u)
> + u = slit_cluster_size();
> +
> + /*
> + * Is this a unit cluster on the trace?
> + */
> + if ((i / u) == (j / u))
> + return node_distance(i, j);
the u is 3 in above example, because slit_cluster_size()
found that node0, node1 and node2 are in the same biggest
symmetric cluster. Not sure if I understand it correctly,
here we will treat node4 and node5 as the same cluster,
but without checking whether node_distance(4, 5) and
node_distance(5,4) are the same. If node_dist(4,5)!=node_dist(5,4),
will we keep it as it is?
thanks,
Chenyu
next prev parent reply other threads:[~2026-02-25 15:40 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-02-05 0:24 [PATCH v2] sched/topology: Check average distances to remote packages Kyle Meyer
2026-02-23 16:42 ` Kyle Meyer
2026-02-23 17:03 ` Peter Zijlstra
2026-02-25 1:43 ` Kyle Meyer
2026-02-25 9:05 ` Chen, Yu C
2026-02-25 12:30 ` Peter Zijlstra
2026-02-25 13:36 ` Peter Zijlstra
2026-02-25 15:39 ` Chen, Yu C [this message]
2026-02-25 15:44 ` Peter Zijlstra
2026-02-25 16:32 ` Peter Zijlstra
2026-02-25 16:40 ` Peter Zijlstra
2026-02-25 21:37 ` Tim Chen
2026-02-25 22:30 ` Peter Zijlstra
2026-02-25 22:54 ` Peter Zijlstra
2026-02-25 22:55 ` Tim Chen
2026-02-25 23:29 ` Kyle Meyer
2026-02-26 18:14 ` Tim Chen
2026-02-25 16:41 ` Kyle Meyer
2026-02-25 16:49 ` 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=eebeb874-af87-418c-94b5-430df8804fe8@intel.com \
--to=yu.c.chen@intel.com \
--cc=bp@alien8.de \
--cc=brgerst@gmail.com \
--cc=dave.hansen@linux.intel.com \
--cc=hpa@zytor.com \
--cc=kprateek.nayak@amd.com \
--cc=kyle.meyer@hpe.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=patryk.wlazlyn@linux.intel.com \
--cc=peterz@infradead.org \
--cc=rafael.j.wysocki@intel.com \
--cc=russ.anderson@hpe.com \
--cc=tglx@kernel.org \
--cc=tim.c.chen@linux.intel.com \
--cc=vinicius.gomes@intel.com \
--cc=x86@kernel.org \
--cc=zhao1.liu@intel.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox