From: Vincent Guittot <vincent.guittot@linaro.org>
To: linux@armlinux.org.uk, catalin.marinas@arm.com, will@kernel.org,
paul.walmsley@sifive.com, palmer@dabbelt.com,
aou@eecs.berkeley.edu, sudeep.holla@arm.com,
gregkh@linuxfoundation.org, rafael@kernel.org, mingo@redhat.com,
peterz@infradead.org, juri.lelli@redhat.com,
dietmar.eggemann@arm.com, rostedt@goodmis.org,
bsegall@google.com, mgorman@suse.de, bristot@redhat.com,
vschneid@redhat.com, viresh.kumar@linaro.org,
lukasz.luba@arm.com, ionela.voinescu@arm.com,
pierre.gondois@arm.com, linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org, linux-riscv@lists.infradead.org,
linux-pm@vger.kernel.org
Cc: conor.dooley@microchip.com, suagrfillet@gmail.com,
ajones@ventanamicro.com, lftan@kernel.org,
Vincent Guittot <vincent.guittot@linaro.org>
Subject: [PATCH v2 0/6] consolidate and cleanup CPU capacity
Date: Mon, 9 Oct 2023 12:36:15 +0200 [thread overview]
Message-ID: <20231009103621.374412-1-vincent.guittot@linaro.org> (raw)
This is the 1st part of consolidating how the max compute capacity is
used in the scheduler and how we calculate the frequency for a level of
utilization.
Fix some unconsistancy when computing frequency for an utilization. There
can be a mismatch between energy model and schedutil.
Next step will be to make a difference between the original
max compute capacity of a CPU and what is currently available when
there is a capping applying forever (i.e. seconds or more).
Changes since v1:
- Fix typos
- Added changes in cpufreq to use arch_scale_freq_ref() when calling
arch_set_freq_scale (patch 3).
- arch_scale_freq_ref() is always defined and returns 0 (as proposed
by Ionela) when not defined by the arch. This simplifies the code with
the addition of patch 3.
- Simplify Energy Model which always uses arch_scale_freq_ref(). The
latter returns 0 when not defined by arch instead of last item of the
perf domain. This is not a problem because the function is only defined
for compilation purpose in this case and we don't care about the
returned value. (patch 5)
- Added changes in cppc cpufreq to set capacity_ref_freq (patch 6)
- Added reviewed tag for patch 1 which got a minor change but not for
others as I did some changes which could make previous reviewed tag
no more relevant.
Vincent Guittot (6):
sched: consolidate and cleanup access to CPU's max compute capacity
topology: add a new arch_scale_freq_reference
cpufreq: use the fixed and coherent frequency for scaling capacity
cpufreq/schedutil: use a fixed reference frequency
energy_model: use a fixed reference frequency
cpufreq/cppc: set the frequency used for capacity computation
Documentation/scheduler/sched-capacity.rst | 13 +++++-----
arch/arm/include/asm/topology.h | 1 +
arch/arm64/include/asm/topology.h | 1 +
arch/riscv/include/asm/topology.h | 1 +
drivers/base/arch_topology.c | 29 +++++++++++-----------
drivers/cpufreq/cppc_cpufreq.c | 18 ++++++++++++++
drivers/cpufreq/cpufreq.c | 4 +--
include/linux/arch_topology.h | 7 ++++++
include/linux/cpufreq.h | 9 +++++++
include/linux/energy_model.h | 14 ++++++++---
kernel/sched/core.c | 2 +-
kernel/sched/cpudeadline.c | 2 +-
kernel/sched/cpufreq_schedutil.c | 26 +++++++++++++++++--
kernel/sched/deadline.c | 4 +--
kernel/sched/fair.c | 18 ++++++--------
kernel/sched/rt.c | 2 +-
kernel/sched/sched.h | 6 -----
kernel/sched/topology.c | 7 ++++--
18 files changed, 113 insertions(+), 51 deletions(-)
--
2.34.1
next reply other threads:[~2023-10-09 10:36 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-10-09 10:36 Vincent Guittot [this message]
2023-10-09 10:36 ` [PATCH v2 1/6] sched: consolidate and cleanup access to CPU's max compute capacity Vincent Guittot
2023-10-09 11:01 ` Ingo Molnar
2023-10-09 10:36 ` [PATCH v2 2/6] topology: add a new arch_scale_freq_reference Vincent Guittot
2023-10-11 10:27 ` Pierre Gondois
2023-10-11 13:48 ` Vincent Guittot
2023-10-18 11:06 ` Lukasz Luba
2023-10-09 10:36 ` [PATCH v2 3/6] cpufreq: use the fixed and coherent frequency for scaling capacity Vincent Guittot
2023-10-09 11:01 ` Viresh Kumar
2023-10-18 11:16 ` Lukasz Luba
2023-10-09 10:36 ` [PATCH v2 4/6] cpufreq/schedutil: use a fixed reference frequency Vincent Guittot
2023-10-18 11:21 ` Lukasz Luba
2023-10-09 10:36 ` [PATCH v2 5/6] energy_model: " Vincent Guittot
2023-10-18 9:16 ` Lukasz Luba
2023-10-09 10:36 ` [PATCH v2 6/6] cpufreq/cppc: set the frequency used for capacity computation Vincent Guittot
2023-10-11 10:27 ` Pierre Gondois
2023-10-11 14:25 ` Vincent Guittot
2023-10-16 12:12 ` Ionela Voinescu
2023-10-16 15:32 ` Vincent Guittot
2023-10-17 9:02 ` Ionela Voinescu
2023-10-17 13:41 ` Vincent Guittot
2023-10-18 11:27 ` [PATCH v2 0/6] consolidate and cleanup CPU capacity Lukasz Luba
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=20231009103621.374412-1-vincent.guittot@linaro.org \
--to=vincent.guittot@linaro.org \
--cc=ajones@ventanamicro.com \
--cc=aou@eecs.berkeley.edu \
--cc=bristot@redhat.com \
--cc=bsegall@google.com \
--cc=catalin.marinas@arm.com \
--cc=conor.dooley@microchip.com \
--cc=dietmar.eggemann@arm.com \
--cc=gregkh@linuxfoundation.org \
--cc=ionela.voinescu@arm.com \
--cc=juri.lelli@redhat.com \
--cc=lftan@kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=linux-riscv@lists.infradead.org \
--cc=linux@armlinux.org.uk \
--cc=lukasz.luba@arm.com \
--cc=mgorman@suse.de \
--cc=mingo@redhat.com \
--cc=palmer@dabbelt.com \
--cc=paul.walmsley@sifive.com \
--cc=peterz@infradead.org \
--cc=pierre.gondois@arm.com \
--cc=rafael@kernel.org \
--cc=rostedt@goodmis.org \
--cc=suagrfillet@gmail.com \
--cc=sudeep.holla@arm.com \
--cc=viresh.kumar@linaro.org \
--cc=vschneid@redhat.com \
--cc=will@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