From: "Rafael J. Wysocki" <rafael@kernel.org>
To: Giovanni Gherdovich <ggherdovich@suse.cz>
Cc: "Rafael J. Wysocki" <rjw@rjwysocki.net>,
"Rafael J. Wysocki" <rafael@kernel.org>,
Borislav Petkov <bp@alien8.de>, Ingo Molnar <mingo@redhat.com>,
Peter Zijlstra <peterz@infradead.org>,
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>,
Mel Gorman <mgorman@techsingularity.net>, 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>,
"the arch/x86 maintainers" <x86@kernel.org>,
Linux PM <linux-pm@vger.kernel.org>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
ACPI Devel Maling List <linux-acpi@vger.kernel.org>
Subject: Re: [PATCH v3 1/1] x86,sched: On AMD EPYC set freq_max = max_boost in schedutil invariant formula
Date: Thu, 4 Feb 2021 14:55:19 +0100 [thread overview]
Message-ID: <CAJZ5v0iDeeeO=WeB2xRyVSyuhP7VLTaXPX6G1YN10_8Lq-bLtg@mail.gmail.com> (raw)
In-Reply-To: <1612446586.7566.20.camel@suse.cz>
On Thu, Feb 4, 2021 at 2:49 PM Giovanni Gherdovich <ggherdovich@suse.cz> wrote:
>
> On Wed, 2021-02-03 at 19:25 +0100, Rafael J. Wysocki wrote:
> > [cut]
> >
> > So below is a prototype of an alternative fix for the issue at hand.
> >
> > I can't really test it here, because there's no _CPC in the ACPI tables of my
> > test machines, so testing it would be appreciated. However, AFAICS these
> > machines are affected by the performance issue related to the scale-invariance
> > when they are running acpi-cpufreq, so what we are doing here is not entirely
> > sufficient.
> >
> > It looks like the scale-invariance code should ask the cpufreq driver about
> > the maximum frequency and note that cpufreq drivers may be changed on the
> > fly.
> >
> > What the patch below does is to add an extra entry to the frequency table for
> > each CPU to represent the maximum "boost" frequency, so as to cause that
> > frequency to be used as cpuinfo.max_freq.
> >
> > The reason why I think it is better to extend the frequency tables instead
> > of simply increasing the frequency for the "P0" entry is because the latter
> > may cause "turbo" frequency to be asked for less often.
> >
> > ---
> > drivers/cpufreq/acpi-cpufreq.c | 107 ++++++++++++++++++++++++++++++++++++-----
> > 1 file changed, 95 insertions(+), 12 deletions(-)
>
> Hello Rafael,
>
> thanks for looking at this. Your patch is indeed cleaner than the one I proposed.
>
> Preliminary testing is favorable; more tests are running.
>
> Results from your patch are in the fourth column below; the performance from
> v5.10 looks restored.
>
> I'll follow up once the tests I queued are completed.
Thank you!
> TEST : Intel Open Image Denoise, www.openimagedenoise.org
> INVOCATION : ./denoise -hdr memorial.pfm -out out.pfm -bench 200 -threads $NTHREADS
> CPU : MODEL : 2x AMD EPYC 7742
> FREQUENCY TABLE : P2: 1.50 GHz
> P1: 2.00 GHz
> P0: 2.25 GHz
> MAX BOOST : 3.40 GHz
>
> Results: threads, msecs (ratio). Lower is better.
>
> v5.10 v5.11-rc4 v5.11-rc4-ggherdov v5.11-rc6-rafael
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> 1 1069.85 (1.00) 1071.84 (1.00) 1070.42 (1.00) 1069.12 (1.00)
> 2 542.24 (1.00) 544.40 (1.00) 544.48 (1.00) 540.81 (1.00)
> 4 278.00 (1.00) 278.44 (1.00) 277.72 (1.00) 277.79 (1.00)
> 8 149.81 (1.00) 149.61 (1.00) 149.87 (1.00) 149.51 (1.00)
> 16 79.01 (1.00) 79.31 (1.00) 78.94 (1.00) 79.02 (1.00)
> 24 58.01 (1.00) 58.51 (1.01) 58.15 (1.00) 57.84 (1.00)
> 32 46.58 (1.00) 48.30 (1.04) 46.66 (1.00) 46.70 (1.00)
> 48 37.29 (1.00) 51.29 (1.38) 37.27 (1.00) 38.10 (1.02)
> 64 34.01 (1.00) 49.59 (1.46) 33.71 (0.99) 34.51 (1.01)
> 80 31.09 (1.00) 44.27 (1.42) 31.33 (1.01) 31.11 (1.00)
> 96 28.56 (1.00) 40.82 (1.43) 28.47 (1.00) 28.65 (1.00)
> 112 28.09 (1.00) 40.06 (1.43) 28.63 (1.02) 28.38 (1.01)
> 120 28.73 (1.00) 39.78 (1.38) 28.14 (0.98) 28.16 (0.98)
> 128 28.93 (1.00) 39.60 (1.37) 29.38 (1.02) 28.55 (0.99)
prev parent reply other threads:[~2021-02-04 13:58 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-02-03 13:53 [PATCH v3 0/1] AMD EPYC: fix schedutil perf regression (freq-invariance) Giovanni Gherdovich
2021-02-03 13:53 ` [PATCH v3 1/1] x86,sched: On AMD EPYC set freq_max = max_boost in schedutil invariant formula Giovanni Gherdovich
2021-02-03 14:11 ` Rafael J. Wysocki
2021-02-03 18:25 ` Rafael J. Wysocki
2021-02-03 23:35 ` Michael Larabel
2021-02-04 13:40 ` Rafael J. Wysocki
2021-02-04 23:04 ` Michael Larabel
2021-02-05 11:42 ` Rafael J. Wysocki
2021-02-04 13:49 ` Giovanni Gherdovich
2021-02-04 13:55 ` Rafael J. Wysocki [this message]
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='CAJZ5v0iDeeeO=WeB2xRyVSyuhP7VLTaXPX6G1YN10_8Lq-bLtg@mail.gmail.com' \
--to=rafael@kernel.org \
--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=mgorman@techsingularity.net \
--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).