From: Mel Gorman <mgorman@techsingularity.net>
To: Giovanni Gherdovich <ggherdovich@suse.cz>
Cc: Peter Zijlstra <peterz@infradead.org>,
Borislav Petkov <bp@alien8.de>, Ingo Molnar <mingo@redhat.com>,
"Rafael J . Wysocki" <rjw@rjwysocki.net>,
Viresh Kumar <viresh.kumar@linaro.org>,
Jon Grimm <Jon.Grimm@amd.com>,
Nathan Fontenot <Nathan.Fontenot@amd.com>,
Yazen Ghannam <Yazen.Ghannam@amd.com>,
Thomas Lendacky <Thomas.Lendacky@amd.com>,
Suthikulpanit Suravee <Suravee.Suthikulpanit@amd.com>,
Pu Wen <puwen@hygon.cn>, Juri Lelli <juri.lelli@redhat.com>,
Vincent Guittot <vincent.guittot@linaro.org>,
Dietmar Eggemann <dietmar.eggemann@arm.com>,
Michael Larabel <Michael@phoronix.com>,
x86@kernel.org, linux-pm@vger.kernel.org,
linux-kernel@vger.kernel.org, linux-acpi@vger.kernel.org
Subject: Re: [PATCH v2 1/1] x86,sched: On AMD EPYC set freq_max = max_boost in schedutil invariant formula
Date: Tue, 26 Jan 2021 09:31:40 +0000 [thread overview]
Message-ID: <20210126093140.GB3592@techsingularity.net> (raw)
In-Reply-To: <1611652167.11983.65.camel@suse.cz>
On Tue, Jan 26, 2021 at 10:09:27AM +0100, Giovanni Gherdovich wrote:
> On Mon, 2021-01-25 at 11:06 +0100, Peter Zijlstra wrote:
> > On Fri, Jan 22, 2021 at 09:40:38PM +0100, Giovanni Gherdovich wrote:
> > > 1. PROBLEM DESCRIPTION (over-utilization and schedutil)
> > >
> > > The problem happens on CPU-bound workloads spanning a large number of cores.
> > > In this case schedutil won't select the maximum P-State. Actually, it's
> > > likely that it will select the minimum one.
> > >
> > > A CPU-bound workload puts the machine in a state generally called
> > > "over-utilization": an increase in CPU speed doesn't result in an increase of
> > > capacity. The fraction of time tasks spend on CPU becomes constant regardless
> > > of clock frequency (the tasks eat whatever we throw at them), and the PELT
> > > invariant util goes up and down with the frequency (i.e. it's not invariant
> > > anymore).
> > > v5.10 v5.11-rc4
> > > ~~~~~~~~~~~~~~~~~~~~~~~~
> > > CPU activity (mpstat) 80-90% 80-90%
> > > schedutil requests (tracepoint) always P0 mostly P2
> > > CPU frequency (HW feedback) ~2.2 GHz ~1.5 GHz
> > > PELT root rq util (tracepoint) ~825 ~450
> > >
> > > mpstat shows that the workload is CPU-bound and usage doesn't change with
> >
> > So I'm having trouble with calling a 80%-90% workload CPU bound, because
> > clearly there's a ton of idle time.
>
> Yes you're right. There is considerable idle time and calling it CPU-bound is
> a bit of a stretch.
>
> Yet I don't think I'm completely off the mark. The busy time is the same with
> the machine running at 1.5 GHz and at 2.2 GHz (it just takes longer to
> finish). To me it seems like the CPU is the bottleneck, with some overhead on
> top.
>
I think this is an important observation because while the load may not
be fully CPU-bound, it's still at the point where race-to-idle by running
at a higher frequency is relevant. During the busy time, the results
(and Michael's testing) indicate that the higher frequency may still be
justified. I agree that there is a "a 'problem' between schedutil and
cpufreq, they don't use the same f_max at all times", fixing that mid
-rc may not be appropriate because it's a big change in an rc window.
So, should this patch be merged for 5.11 as a stopgap, fix up
schedutil/cpufreq and then test both AMD and Intel chips reporting the
correct max non-turbo and max-turbo frequencies? That would give time to
give some testing in linux-next before merging to reduce the chance
something else falls out.
--
Mel Gorman
SUSE Labs
next prev parent reply other threads:[~2021-01-26 9:43 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-01-22 20:40 [PATCH v2 0/1] AMD EPYC: fix schedutil perf regression (freq-invariance) Giovanni Gherdovich
2021-01-22 20:40 ` [PATCH v2 1/1] x86,sched: On AMD EPYC set freq_max = max_boost in schedutil invariant formula Giovanni Gherdovich
2021-01-25 10:04 ` Peter Zijlstra
2021-01-26 9:28 ` Giovanni Gherdovich
2021-01-26 10:02 ` Peter Zijlstra
2021-02-02 18:45 ` Rafael J. Wysocki
2021-02-02 19:11 ` Rafael J. Wysocki
2021-02-03 9:56 ` Giovanni Gherdovich
2021-02-02 18:40 ` Rafael J. Wysocki
2021-01-25 10:06 ` Peter Zijlstra
2021-01-26 9:09 ` Giovanni Gherdovich
2021-01-26 9:31 ` Mel Gorman [this message]
2021-01-26 10:05 ` Peter Zijlstra
[not found] ` <1611933781.15858.48.camel@suse.cz>
2021-02-02 14:17 ` Giovanni Gherdovich
2021-02-02 18:21 ` Peter Zijlstra
2021-02-02 18:29 ` Rafael J. Wysocki
2021-02-02 19:00 ` Rafael J. Wysocki
2021-02-02 18:59 ` Rafael J. Wysocki
2021-02-02 19:26 ` Rafael J. Wysocki
2021-02-03 8:39 ` Giovanni Gherdovich
2021-02-03 13:40 ` Rafael J. Wysocki
2021-02-03 9:12 ` Giovanni Gherdovich
2021-02-03 6:04 ` Viresh Kumar
2021-01-24 22:30 ` [PATCH v2 0/1] AMD EPYC: fix schedutil perf regression (freq-invariance) Michael Larabel
2021-01-25 8:34 ` Peter Zijlstra
2021-01-26 9:01 ` Giovanni Gherdovich
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=20210126093140.GB3592@techsingularity.net \
--to=mgorman@techsingularity.net \
--cc=Jon.Grimm@amd.com \
--cc=Michael@phoronix.com \
--cc=Nathan.Fontenot@amd.com \
--cc=Suravee.Suthikulpanit@amd.com \
--cc=Thomas.Lendacky@amd.com \
--cc=Yazen.Ghannam@amd.com \
--cc=bp@alien8.de \
--cc=dietmar.eggemann@arm.com \
--cc=ggherdovich@suse.cz \
--cc=juri.lelli@redhat.com \
--cc=linux-acpi@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=peterz@infradead.org \
--cc=puwen@hygon.cn \
--cc=rjw@rjwysocki.net \
--cc=vincent.guittot@linaro.org \
--cc=viresh.kumar@linaro.org \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).