From: Vincent Guittot <vincent.guittot@linaro.org>
To: Valentin Schneider <valentin.schneider@arm.com>
Cc: Thara Gopinath <thara.gopinath@linaro.org>,
Russell King - ARM Linux admin <linux@armlinux.org.uk>,
linux-kernel <linux-kernel@vger.kernel.org>
Subject: Re: v5.7: new core kernel option missing help text
Date: Fri, 5 Jun 2020 09:03:11 +0200 [thread overview]
Message-ID: <CAKfTPtCPSk8wAyVeFDeywbUF6qQcjKw2OsvweW3MLLLdOdK+oQ@mail.gmail.com> (raw)
In-Reply-To: <jhja71ij0xr.mognet@arm.com>
On Thu, 4 Jun 2020 at 17:38, Valentin Schneider
<valentin.schneider@arm.com> wrote:
>
>
> On 04/06/20 14:05, Thara Gopinath wrote:
> > On Thu, 4 Jun 2020 at 06:56, Valentin Schneider <valentin.schneider@arm.com>
> >>
> >> Right, s/defconfig/arch kconfig/ or somesuch.
> >>
> >
> > CPU_FREQ_THERMAL also has to be enabled for this to be effective.
> > Since arm64 defconfig enables CPU_FREQ_THERMAL (by enabling CPU_THERMAL),
> > it should be ok to enable it in arm64/Kconfig. (same with arm/Kconfig)
> >
> > Another option is to select the SCHED_THERMAL_PRESSURE when
> > CPU_FREQ_THERMAL
> > is enabled in drivers/thermal/Kconfig.
> >
>
> So interestingly while arch_set_thermal_pressure() (which just writes to a
> pcpu variable) is defined in sched/core.c, arch_scale_thermal_pressure()
> (which just returns aforementionned pcpu variable) is defined in
> arch_topology...
>
> I'm thinking at this point we might as well turn the
> arch_scale_thermal_pressure() stub into what arch_topology does. This would
> effectively let any architecture use thermal pressure, providing they use
> cpufreq cooling.
>
> If we want to keep changes contained to Kconfigs, for now I think the
> safest would be:
>
> ---
> diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
> index 16fbf74030fe..1e92080dc275 100644
> --- a/arch/arm/Kconfig
> +++ b/arch/arm/Kconfig
> @@ -46,6 +46,7 @@ config ARM
> select EDAC_ATOMIC_SCRUB
> select GENERIC_ALLOCATOR
> select GENERIC_ARCH_TOPOLOGY if ARM_CPU_TOPOLOGY
> + select SCHED_THERMAL_PRESSURE if GENERIC_ARCH_TOPOLOGY
I think that SCHED_THERMAL_PRESSURE depends on ARM_CPU_TOPOLOGY but
not on GENERIC_ARCH_TOPOLOGY.
ARM_CPU_TOPOLOGY is used to define arch_scale_thermal_pressure for arm
architecture
and we only use the header file of the generic arch_topology.h.
Function like arch_set_thermal_pressure() is in sched/core.c
> select GENERIC_ATOMIC64 if CPU_V7M || CPU_V6 || !CPU_32v6K || !AEABI
> select GENERIC_CLOCKEVENTS_BROADCAST if SMP
> select GENERIC_CPU_AUTOPROBE
> diff --git a/arch/arm64/Kconfig b/arch/arm64/Kconfig
> index 552d36cacc05..cc1944fbae51 100644
> --- a/arch/arm64/Kconfig
> +++ b/arch/arm64/Kconfig
> @@ -98,6 +98,7 @@ config ARM64
> select FRAME_POINTER
> select GENERIC_ALLOCATOR
> select GENERIC_ARCH_TOPOLOGY
> + select SCHED_THERMAL_PRESSURE
> select GENERIC_CLOCKEVENTS
> select GENERIC_CLOCKEVENTS_BROADCAST
> select GENERIC_CPU_AUTOPROBE
> diff --git a/init/Kconfig b/init/Kconfig
> index 74a5ac65644f..ba846f6e805b 100644
> --- a/init/Kconfig
> +++ b/init/Kconfig
> @@ -439,8 +439,11 @@ config HAVE_SCHED_AVG_IRQ
> depends on SMP
>
> config SCHED_THERMAL_PRESSURE
> - bool "Enable periodic averaging of thermal pressure"
> + def_bool n
> depends on SMP
> + depends on CPU_FREQ_THERMAL
> + help
> + <helpful thing here>
>
> config BSD_PROCESS_ACCT
> bool "BSD Process Accounting"
> ---
>
>
>
> > Warm Regards
> > Thara
next prev parent reply other threads:[~2020-06-05 7:03 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-06-03 17:31 v5.7: new core kernel option missing help text Russell King - ARM Linux admin
2020-06-03 18:00 ` Valentin Schneider
2020-06-03 18:45 ` Russell King - ARM Linux admin
2020-06-03 19:24 ` Vincent Guittot
2020-06-03 19:58 ` Russell King - ARM Linux admin
2020-06-03 20:22 ` Vincent Guittot
2020-06-03 20:25 ` Valentin Schneider
2020-06-04 0:48 ` Thara Gopinath
2020-06-04 9:26 ` Valentin Schneider
2020-06-04 9:29 ` Russell King - ARM Linux admin
2020-06-04 10:56 ` Valentin Schneider
[not found] ` <CALD-y_zQms4YQup2MgAfNhWSu=ewkhossHma2TKqfTcOFaG=uA@mail.gmail.com>
2020-06-04 15:38 ` Valentin Schneider
2020-06-04 22:22 ` Thara Gopinath
2020-06-05 7:03 ` Vincent Guittot [this message]
2020-06-05 9:46 ` Valentin Schneider
2020-06-05 8:15 ` Russell King - ARM Linux admin
2020-06-05 10:02 ` Valentin Schneider
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=CAKfTPtCPSk8wAyVeFDeywbUF6qQcjKw2OsvweW3MLLLdOdK+oQ@mail.gmail.com \
--to=vincent.guittot@linaro.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@armlinux.org.uk \
--cc=thara.gopinath@linaro.org \
--cc=valentin.schneider@arm.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;
as well as URLs for NNTP newsgroup(s).