[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CANn89iL+CHRi1HJ6Mp4u=ECnfAXV2qxXZj_BsQuv+uwheAfDDw@mail.gmail.com>
Date: Tue, 19 Apr 2022 08:51:54 -0700
From: Eric Dumazet <edumazet@...gle.com>
To: Thomas Gleixner <tglx@...utronix.de>
Cc: LKML <linux-kernel@...r.kernel.org>,
"the arch/x86 maintainers" <x86@...nel.org>,
"Rafael J. Wysocki" <rafael@...nel.org>, linux-pm@...r.kernel.org,
"Paul E. McKenney" <paulmck@...nel.org>
Subject: Re: [patch 00/10] x86/cpu: Consolidate APERF/MPERF code
On Fri, Apr 15, 2022 at 12:19 PM Thomas Gleixner <tglx@...utronix.de> wrote:
>
> APERF/MPERF is utilized in two ways:
>
> 1) Ad hoc readout of CPU frequency which requires IPIs
>
> 2) Frequency scale calculation for frequency invariant scheduling which
> reads APERF/MPERF on every tick.
>
> These are completely independent code parts. Eric observed long latencies
> when reading /proc/cpuinfo which reads out CPU frequency via #1 and
> proposed to replace the per CPU single IPI with a broadcast IPI.
>
> While this makes the latency smaller, it is not necessary at all because #2
> samples APERF/MPERF periodically, except on idle or isolated NOHZ full CPUs
> which are excluded from IPI already.
>
> It could be argued that not all APERF/MPERF capable systems have the
> required BIOS information to enable frequency invariance support, but in
> practice most of them do. So the APERF/MPERF sampling can be made
> unconditional and just the frequency scale calculation for the scheduler
> excluded.
>
> The following series consolidates that.
>
Thanks a lot for working on that Thomas.
I am not sure I will be able to backport this to a Google prodkernel,
as I guess there will be many merge conflicts.
Do you have by any chance this work available in a git branch ?
Thanks.
> Thanks,
>
> tglx
> ---
> arch/x86/include/asm/cpu.h | 2
> arch/x86/include/asm/topology.h | 17 -
> arch/x86/kernel/acpi/cppc.c | 28 --
> arch/x86/kernel/cpu/aperfmperf.c | 474 +++++++++++++++++++++++++++++++--------
> arch/x86/kernel/cpu/proc.c | 2
> arch/x86/kernel/smpboot.c | 358 -----------------------------
> fs/proc/cpuinfo.c | 6
> include/linux/cpufreq.h | 1
> 8 files changed, 405 insertions(+), 483 deletions(-)
>
>
Powered by blists - more mailing lists