From: "Song Bao Hua (Barry Song)" <song.bao.hua@hisilicon.com>
To: Meelis Roos <mroos@linux.ee>,
"valentin.schneider@arm.com" <valentin.schneider@arm.com>,
"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>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Cc: "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>
Subject: RE: [PATCH v2] sched/topology: fix the issue groups don't span domain->span for NUMA diameter > 2
Date: Wed, 3 Feb 2021 21:31:15 +0000 [thread overview]
Message-ID: <c7f231bf830b4c94adb6a34cc8a4b930@hisilicon.com> (raw)
In-Reply-To: <d3ec7706-6560-70dd-d968-26460ce0c666@linux.ee>
> -----Original Message-----
> From: Meelis Roos [mailto:mroos@linux.ee]
> Sent: Thursday, February 4, 2021 12:58 AM
> To: Song Bao Hua (Barry Song) <song.bao.hua@hisilicon.com>;
> valentin.schneider@arm.com; vincent.guittot@linaro.org; mgorman@suse.de;
> mingo@kernel.org; peterz@infradead.org; dietmar.eggemann@arm.com;
> morten.rasmussen@arm.com; linux-kernel@vger.kernel.org
> Cc: 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
> Subject: Re: [PATCH v2] sched/topology: fix the issue groups don't span
> domain->span for NUMA diameter > 2
>
> 03.02.21 13:12 Barry Song wrote:
> > kernel/sched/topology.c | 85 +++++++++++++++++++++++++----------------
> > 1 file changed, 53 insertions(+), 32 deletions(-)
> >
> > diff --git a/kernel/sched/topology.c b/kernel/sched/topology.c
> > index 5d3675c7a76b..964ed89001fe 100644
> > --- a/kernel/sched/topology.c
> > +++ b/kernel/sched/topology.c
>
> This one still works on the Sun X4600-M2, on top of v5.11-rc6-55-g3aaf0a27ffc2.
>
>
> Performance-wise - is the some simple benhmark to run to meaure the impact?
> Compared to what - 5.10.0 or the kernel with the warning?
Hi Meelis,
Thanks for retesting.
Comparing to the kernel with the warning is enough. As I mentioned here:
https://lore.kernel.org/lkml/20210115203632.34396-1-song.bao.hua@hisilicon.com/
I have seen two major issues the broken sched_group has:
* in load_balance() and find_busiest_group()
kernel is calculating the avg_load and group_type by:
sum(load of cpus within sched_domain)
------------------------------------
capacity of the whole sched_group
since sched_group isn't a subset of sched_domain, so the load of
the problematic group is severely underestimated.
sched_domain
+----------------------------------+
| |
| +-------------------------------------------+
| | +-------+ +------+ | |
| | | cpu0 | | cpu1 | | |
| | +-------+ +------+ | |
+----------------------------------+ |
| |
| +-------+ +-------+ |
| |cpu2 | |cpu3 | |
| +-------+ +-------+ |
| |
+-------------------------------------------+
problematic sched_group
For the above example, kernel will divide "the sum load of
cpu0 and cpu1" by "the capacity of the whole group including
cpu0,1,2 and 3".
* in select_task_rq_fair() and find_idlest_group()
Kernel could push a forked/exec-ed task to the outside of the
sched_domain, but still inside the sched_group. For the above
diagram, while kernel wants to find the idlest cpu in the
sched_domain, it can result in picking cpu2 or cpu3.
I guess these two issues can potentially affect many benchmarks.
Our team have seen 5% unixbench score increase with the fix in
some machines though the real impact might be case-by-case.
>
> drop caches and time the build time of linux kernel with make -j64?
>
> --
> Meelis Roos
Thanks
Barry
next prev parent reply other threads:[~2021-02-03 21:32 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-02-03 11:12 Barry Song
2021-02-03 11:57 ` Meelis Roos
2021-02-03 21:31 ` Song Bao Hua (Barry Song) [this message]
2021-02-09 12:55 ` Peter Zijlstra
2021-02-09 20:58 ` Song Bao Hua (Barry Song)
2021-02-10 11:21 ` Peter Zijlstra
2021-02-10 12:27 ` Song Bao Hua (Barry Song)
2021-02-11 19:55 ` Valentin Schneider
2021-02-18 9:17 ` [Linuxarm] " Song Bao Hua (Barry Song)
2021-02-18 12:40 ` Valentin Schneider
2021-02-18 22:07 ` Song Bao Hua (Barry Song)
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=c7f231bf830b4c94adb6a34cc8a4b930@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
Powered by JetHome