From: "Song Bao Hua (Barry Song)" <song.bao.hua@hisilicon.com>
To: Valentin Schneider <valentin.schneider@arm.com>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Cc: "vincent.guittot@linaro.org" <vincent.guittot@linaro.org>,
"mgorman@suse.de" <mgorman@suse.de>,
"mingo@kernel.org" <mingo@kernel.org>,
"peterz@infradead.org" <peterz@infradead.org>,
"dietmar.eggemann@arm.com" <dietmar.eggemann@arm.com>,
"morten.rasmussen@arm.com" <morten.rasmussen@arm.com>,
"linuxarm@openeuler.org" <linuxarm@openeuler.org>,
"xuwei (O)" <xuwei5@huawei.com>,
"Liguozhu (Kenneth)" <liguozhu@hisilicon.com>,
"tiantao (H)" <tiantao6@hisilicon.com>,
wanghuiqiang <wanghuiqiang@huawei.com>,
"Zengtao (B)" <prime.zeng@hisilicon.com>,
Jonathan Cameron <jonathan.cameron@huawei.com>,
"guodong.xu@linaro.org" <guodong.xu@linaro.org>,
Meelis Roos <mroos@linux.ee>
Subject: RE: [RFC PATCH 2/2] Revert "sched/topology: Warn when NUMA diameter > 2"
Date: Mon, 8 Feb 2021 10:27:27 +0000 [thread overview]
Message-ID: <73c0ed52b665468cb0aa0086f85da60c@hisilicon.com> (raw)
In-Reply-To: <20210203155432.10293-3-valentin.schneider@arm.com>
> -----Original Message-----
> From: Valentin Schneider [mailto:valentin.schneider@arm.com]
> Sent: Thursday, February 4, 2021 4:55 AM
> To: linux-kernel@vger.kernel.org
> Cc: vincent.guittot@linaro.org; mgorman@suse.de; mingo@kernel.org;
> peterz@infradead.org; dietmar.eggemann@arm.com; morten.rasmussen@arm.com;
> linuxarm@openeuler.org; xuwei (O) <xuwei5@huawei.com>; Liguozhu (Kenneth)
> <liguozhu@hisilicon.com>; tiantao (H) <tiantao6@hisilicon.com>; wanghuiqiang
> <wanghuiqiang@huawei.com>; Zengtao (B) <prime.zeng@hisilicon.com>; Jonathan
> Cameron <jonathan.cameron@huawei.com>; guodong.xu@linaro.org; Song Bao Hua
> (Barry Song) <song.bao.hua@hisilicon.com>; Meelis Roos <mroos@linux.ee>
> Subject: [RFC PATCH 2/2] Revert "sched/topology: Warn when NUMA diameter > 2"
>
> The scheduler topology code can now figure out what to do with such
> topologies.
>
> This reverts commit b5b217346de85ed1b03fdecd5c5076b34fbb2f0b.
>
> Signed-off-by: Valentin Schneider <valentin.schneider@arm.com>
Yes, this is fine. I actually have seen some other problems we need
to consider.
The current code is probably well consolidated for machines with
2 hops or less. Thus, even after we fix the 3-hops span issue, I
can still see some other issue.
For example, if we change the sd flags and remove the SD_BALANCE
flags for the last hops in sd_init(), we are able to see large
score increase in unixbench.
if (sched_domains_numa_distance[tl->numa_level] > node_reclaim_distance ||
is_3rd_hops_domain(...)) {
sd->flags &= ~(SD_BALANCE_EXEC |
SD_BALANCE_FORK |
SD_WAKE_AFFINE);
}
So guess something needs to be tuned for machines with 3 hops or more.
But we need a kernel which has the fix of 3-hops issue before we can
do more work.
> ---
> kernel/sched/topology.c | 33 ---------------------------------
> 1 file changed, 33 deletions(-)
>
> diff --git a/kernel/sched/topology.c b/kernel/sched/topology.c
> index a8f69f234258..0fa41aab74e0 100644
> --- a/kernel/sched/topology.c
> +++ b/kernel/sched/topology.c
> @@ -688,7 +688,6 @@ cpu_attach_domain(struct sched_domain *sd, struct
> root_domain *rd, int cpu)
> {
> struct rq *rq = cpu_rq(cpu);
> struct sched_domain *tmp;
> - int numa_distance = 0;
>
> /* Remove the sched domains which do not contribute to scheduling. */
> for (tmp = sd; tmp; ) {
> @@ -720,38 +719,6 @@ cpu_attach_domain(struct sched_domain *sd, struct
> root_domain *rd, int cpu)
> sd->child = NULL;
> }
>
> - for (tmp = sd; tmp; tmp = tmp->parent)
> - numa_distance += !!(tmp->flags & SD_NUMA);
> -
> - /*
> - * FIXME: Diameter >=3 is misrepresented.
> - *
> - * Smallest diameter=3 topology is:
> - *
> - * node 0 1 2 3
> - * 0: 10 20 30 40
> - * 1: 20 10 20 30
> - * 2: 30 20 10 20
> - * 3: 40 30 20 10
> - *
> - * 0 --- 1 --- 2 --- 3
> - *
> - * NUMA-3 0-3 N/A N/A 0-3
> - * groups: {0-2},{1-3} {1-3},{0-2}
> - *
> - * NUMA-2 0-2 0-3 0-3 1-3
> - * groups: {0-1},{1-3} {0-2},{2-3} {1-3},{0-1} {2-3},{0-2}
> - *
> - * NUMA-1 0-1 0-2 1-3 2-3
> - * groups: {0},{1} {1},{2},{0} {2},{3},{1} {3},{2}
> - *
> - * NUMA-0 0 1 2 3
> - *
> - * The NUMA-2 groups for nodes 0 and 3 are obviously buggered, as the
> - * group span isn't a subset of the domain span.
> - */
> - WARN_ONCE(numa_distance > 2, "Shortest NUMA path spans too many nodes\n");
> -
> sched_domain_debug(sd, cpu);
>
> rq_attach_root(rq, rd);
> --
> 2.27.0
Thanks
Barry
next prev parent reply other threads:[~2021-02-08 10:39 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-02-03 15:54 [RFC PATCH 0/2] sched/topology: Get rid of overlapping groups Valentin Schneider
2021-02-03 15:54 ` [RFC PATCH 1/2] sched/topology: Get rid of NUMA " Valentin Schneider
2021-02-08 10:04 ` Song Bao Hua (Barry Song)
2021-02-08 11:47 ` Valentin Schneider
2021-02-09 0:12 ` Song Bao Hua (Barry Song)
2021-02-09 10:41 ` Valentin Schneider
2021-02-03 15:54 ` [RFC PATCH 2/2] Revert "sched/topology: Warn when NUMA diameter > 2" Valentin Schneider
2021-02-08 10:27 ` Song Bao Hua (Barry Song) [this message]
2021-02-03 15:54 ` [RFC PATCH 3/2] sched/topology: Alternative diameter >= 2 fixup 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=73c0ed52b665468cb0aa0086f85da60c@hisilicon.com \
--to=song.bao.hua@hisilicon.com \
--cc=dietmar.eggemann@arm.com \
--cc=guodong.xu@linaro.org \
--cc=jonathan.cameron@huawei.com \
--cc=liguozhu@hisilicon.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linuxarm@openeuler.org \
--cc=mgorman@suse.de \
--cc=mingo@kernel.org \
--cc=morten.rasmussen@arm.com \
--cc=mroos@linux.ee \
--cc=peterz@infradead.org \
--cc=prime.zeng@hisilicon.com \
--cc=tiantao6@hisilicon.com \
--cc=valentin.schneider@arm.com \
--cc=vincent.guittot@linaro.org \
--cc=wanghuiqiang@huawei.com \
--cc=xuwei5@huawei.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
all inboxes | Powered by JetHome®