Linux-ARM-Kernel Archive on lore.kernel.org
 help / color / Atom feed
* [PATCH] ARM: config: multi_v7 Use schedutil cpufreq
@ 2020-02-29 21:02 Linus Walleij
  2020-03-02  4:22 ` Viresh Kumar
  0 siblings, 1 reply; 6+ messages in thread
From: Linus Walleij @ 2020-02-29 21:02 UTC (permalink / raw)
  To: arm, soc
  Cc: Viresh Kumar, Linus Walleij, Rafael J . Wysocki, linux-arm-kernel

The multi v7 config is using the ondemand governor by default,
but the schedutil is mature and enabled by default in other
defconfigs, let's encourage schedutil as governor but keep
ondemand as compiled-in instead of the other way around.

Cc: Rafael J. Wysocki <rjw@rjwysocki.net>
Cc: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
---
ARM SoC folks: if you agree please apply this directly. I think
putting this in the multi v7 as default is a good way to
actively encourage this governor, unless Viresh or Rafael
objects.
---
 arch/arm/configs/multi_v7_defconfig | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/arch/arm/configs/multi_v7_defconfig b/arch/arm/configs/multi_v7_defconfig
index 017d65f86eba..beec2c8d76aa 100644
--- a/arch/arm/configs/multi_v7_defconfig
+++ b/arch/arm/configs/multi_v7_defconfig
@@ -100,11 +100,11 @@ CONFIG_KEXEC=y
 CONFIG_EFI=y
 CONFIG_CPU_FREQ=y
 CONFIG_CPU_FREQ_STAT=y
-CONFIG_CPU_FREQ_DEFAULT_GOV_ONDEMAND=y
+CONFIG_CPU_FREQ_DEFAULT_GOV_SCHEDUTIL=y
 CONFIG_CPU_FREQ_GOV_POWERSAVE=m
 CONFIG_CPU_FREQ_GOV_USERSPACE=m
 CONFIG_CPU_FREQ_GOV_CONSERVATIVE=m
-CONFIG_CPU_FREQ_GOV_SCHEDUTIL=y
+CONFIG_CPU_FREQ_GOV_ONDEMAND=y
 CONFIG_CPUFREQ_DT=y
 CONFIG_ARM_IMX6Q_CPUFREQ=y
 CONFIG_ARM_RASPBERRYPI_CPUFREQ=y
-- 
2.24.1


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] ARM: config: multi_v7 Use schedutil cpufreq
  2020-02-29 21:02 [PATCH] ARM: config: multi_v7 Use schedutil cpufreq Linus Walleij
@ 2020-03-02  4:22 ` Viresh Kumar
  2020-03-25 16:27   ` Arnd Bergmann
  0 siblings, 1 reply; 6+ messages in thread
From: Viresh Kumar @ 2020-03-02  4:22 UTC (permalink / raw)
  To: Linus Walleij; +Cc: soc, arm, Rafael J . Wysocki, linux-arm-kernel

On 29-02-20, 22:02, Linus Walleij wrote:
> The multi v7 config is using the ondemand governor by default,
> but the schedutil is mature and enabled by default in other
> defconfigs, let's encourage schedutil as governor but keep
> ondemand as compiled-in instead of the other way around.
> 
> Cc: Rafael J. Wysocki <rjw@rjwysocki.net>
> Cc: Viresh Kumar <viresh.kumar@linaro.org>
> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
> ---
> ARM SoC folks: if you agree please apply this directly. I think
> putting this in the multi v7 as default is a good way to
> actively encourage this governor, unless Viresh or Rafael
> objects.
> ---
>  arch/arm/configs/multi_v7_defconfig | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/arch/arm/configs/multi_v7_defconfig b/arch/arm/configs/multi_v7_defconfig
> index 017d65f86eba..beec2c8d76aa 100644
> --- a/arch/arm/configs/multi_v7_defconfig
> +++ b/arch/arm/configs/multi_v7_defconfig
> @@ -100,11 +100,11 @@ CONFIG_KEXEC=y
>  CONFIG_EFI=y
>  CONFIG_CPU_FREQ=y
>  CONFIG_CPU_FREQ_STAT=y
> -CONFIG_CPU_FREQ_DEFAULT_GOV_ONDEMAND=y
> +CONFIG_CPU_FREQ_DEFAULT_GOV_SCHEDUTIL=y
>  CONFIG_CPU_FREQ_GOV_POWERSAVE=m
>  CONFIG_CPU_FREQ_GOV_USERSPACE=m
>  CONFIG_CPU_FREQ_GOV_CONSERVATIVE=m
> -CONFIG_CPU_FREQ_GOV_SCHEDUTIL=y
> +CONFIG_CPU_FREQ_GOV_ONDEMAND=y
>  CONFIG_CPUFREQ_DT=y
>  CONFIG_ARM_IMX6Q_CPUFREQ=y
>  CONFIG_ARM_RASPBERRYPI_CPUFREQ=y

FWIW, I have tried something similar for arm64 earlier.

https://lore.kernel.org/lkml/af12e002bc165844101830c0eb00e283b536a879.1510813288.git.viresh.kumar@linaro.org/

-- 
viresh

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] ARM: config: multi_v7 Use schedutil cpufreq
  2020-03-02  4:22 ` Viresh Kumar
@ 2020-03-25 16:27   ` Arnd Bergmann
  2020-03-26 22:08     ` Linus Walleij
  0 siblings, 1 reply; 6+ messages in thread
From: Arnd Bergmann @ 2020-03-25 16:27 UTC (permalink / raw)
  To: Viresh Kumar
  Cc: Linus Walleij, arm-soc, Rafael J . Wysocki, SoC Team, Linux ARM

On Mon, Mar 2, 2020 at 5:22 AM Viresh Kumar <viresh.kumar@linaro.org> wrote:
>
> On 29-02-20, 22:02, Linus Walleij wrote:
> > The multi v7 config is using the ondemand governor by default,
> > but the schedutil is mature and enabled by default in other
> > defconfigs, let's encourage schedutil as governor but keep
> > ondemand as compiled-in instead of the other way around.
> >
> > Cc: Rafael J. Wysocki <rjw@rjwysocki.net>
> > Cc: Viresh Kumar <viresh.kumar@linaro.org>
> > Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
> > ---
> > ARM SoC folks: if you agree please apply this directly. I think
> > putting this in the multi v7 as default is a good way to
> > actively encourage this governor, unless Viresh or Rafael
> > objects.
> > ---
>
> FWIW, I have tried something similar for arm64 earlier.
>
> https://lore.kernel.org/lkml/af12e002bc165844101830c0eb00e283b536a879.1510813288.git.viresh.kumar@linaro.org/

I've dropped this one and not applied it for now after rereading the old thread.
If there is a broader agreement on what the default should be, please
collect more Acks and we can apply whatever you come up with.

       Arnd

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] ARM: config: multi_v7 Use schedutil cpufreq
  2020-03-25 16:27   ` Arnd Bergmann
@ 2020-03-26 22:08     ` Linus Walleij
  2020-03-27  5:07       ` Viresh Kumar
  2020-03-27  8:06       ` Vincent Guittot
  0 siblings, 2 replies; 6+ messages in thread
From: Linus Walleij @ 2020-03-26 22:08 UTC (permalink / raw)
  To: Arnd Bergmann, Vincent Guittot
  Cc: Viresh Kumar, SoC Team, arm-soc, Rafael J . Wysocki, Linux ARM

On Wed, Mar 25, 2020 at 5:28 PM Arnd Bergmann <arnd@arndb.de> wrote:
> On Mon, Mar 2, 2020 at 5:22 AM Viresh Kumar <viresh.kumar@linaro.org> wrote:

> > FWIW, I have tried something similar for arm64 earlier.
> >
> > https://lore.kernel.org/lkml/af12e002bc165844101830c0eb00e283b536a879.1510813288.git.viresh.kumar@linaro.org/
>
> I've dropped this one and not applied it for now after rereading the old thread.
> If there is a broader agreement on what the default should be, please
> collect more Acks and we can apply whatever you come up with.

I think there is a more compelling argument: if I understand correctly
the energy aware scheduling and HMP on big.LITTLE only works
correctly if schedutil is used as cpufreq governor (correct Vincent, Viresh?)

That would make the default multi_v7 unusable (or misbehaving)
on e.g. Vexpress TC2.

Thus I suspect the Vexpress and other machines using HMP
and big.LITTLE should just select
CPU_FREQ_DEFAULT_GOV_SCHEDUTIL in their Kconfig.

That will of course make it percolate up to multi_v7 by default
as well.

If more magic configs are necessary to select to make a TC2
work properly I'd like to know these as well so we can just select
them all by default also for these targets.

Yours,
Linus Walleij

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] ARM: config: multi_v7 Use schedutil cpufreq
  2020-03-26 22:08     ` Linus Walleij
@ 2020-03-27  5:07       ` Viresh Kumar
  2020-03-27  8:06       ` Vincent Guittot
  1 sibling, 0 replies; 6+ messages in thread
From: Viresh Kumar @ 2020-03-27  5:07 UTC (permalink / raw)
  To: Linus Walleij
  Cc: Arnd Bergmann, Rafael J . Wysocki, SoC Team, arm-soc, Linux ARM

On 26-03-20, 23:08, Linus Walleij wrote:
> On Wed, Mar 25, 2020 at 5:28 PM Arnd Bergmann <arnd@arndb.de> wrote:
> > On Mon, Mar 2, 2020 at 5:22 AM Viresh Kumar <viresh.kumar@linaro.org> wrote:
> 
> > > FWIW, I have tried something similar for arm64 earlier.
> > >
> > > https://lore.kernel.org/lkml/af12e002bc165844101830c0eb00e283b536a879.1510813288.git.viresh.kumar@linaro.org/
> >
> > I've dropped this one and not applied it for now after rereading the old thread.
> > If there is a broader agreement on what the default should be, please
> > collect more Acks and we can apply whatever you come up with.
> 
> I think there is a more compelling argument: if I understand correctly
> the energy aware scheduling and HMP on big.LITTLE only works
> correctly if schedutil is used as cpufreq governor (correct Vincent, Viresh?)
> 
> That would make the default multi_v7 unusable (or misbehaving)
> on e.g. Vexpress TC2.
> 
> Thus I suspect the Vexpress and other machines using HMP
> and big.LITTLE should just select
> CPU_FREQ_DEFAULT_GOV_SCHEDUTIL in their Kconfig.
> 
> That will of course make it percolate up to multi_v7 by default
> as well.
> 
> If more magic configs are necessary to select to make a TC2
> work properly I'd like to know these as well so we can just select
> them all by default also for these targets.

I always agreed that schedutil must be selected as default governor
instead of ondemand and I still want to get my arm64 patch merged :)

And yes, schedutil will work the best for big LITTLE stuff.

-- 
viresh

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] ARM: config: multi_v7 Use schedutil cpufreq
  2020-03-26 22:08     ` Linus Walleij
  2020-03-27  5:07       ` Viresh Kumar
@ 2020-03-27  8:06       ` Vincent Guittot
  1 sibling, 0 replies; 6+ messages in thread
From: Vincent Guittot @ 2020-03-27  8:06 UTC (permalink / raw)
  To: Linus Walleij
  Cc: Arnd Bergmann, Viresh Kumar, Rafael J . Wysocki, SoC Team,
	arm-soc, Linux ARM

On Thu, 26 Mar 2020 at 23:08, Linus Walleij <linus.walleij@linaro.org> wrote:
>
> On Wed, Mar 25, 2020 at 5:28 PM Arnd Bergmann <arnd@arndb.de> wrote:
> > On Mon, Mar 2, 2020 at 5:22 AM Viresh Kumar <viresh.kumar@linaro.org> wrote:
>
> > > FWIW, I have tried something similar for arm64 earlier.
> > >
> > > https://lore.kernel.org/lkml/af12e002bc165844101830c0eb00e283b536a879.1510813288.git.viresh.kumar@linaro.org/
> >
> > I've dropped this one and not applied it for now after rereading the old thread.
> > If there is a broader agreement on what the default should be, please
> > collect more Acks and we can apply whatever you come up with.
>
> I think there is a more compelling argument: if I understand correctly
> the energy aware scheduling and HMP on big.LITTLE only works
> correctly if schedutil is used as cpufreq governor (correct Vincent, Viresh?)

EAS is disabled while building scheduler toology if schedutil is not
the cpufreq governor

Quoting from kernel/sched/topology.c:
/*
 * EAS can be used on a root domain if it meets all the following conditions:
 *    1. an Energy Model (EM) is available;
 *    2. the SD_ASYM_CPUCAPACITY flag is set in the sched_domain hierarchy.
 *    3. no SMT is detected.
 *    4. the EM complexity is low enough to keep scheduling overheads low;
 *    5. schedutil is driving the frequency of all CPUs of the rd;
 *



>
> That would make the default multi_v7 unusable (or misbehaving)
> on e.g. Vexpress TC2.
>
> Thus I suspect the Vexpress and other machines using HMP
> and big.LITTLE should just select
> CPU_FREQ_DEFAULT_GOV_SCHEDUTIL in their Kconfig.
>
> That will of course make it percolate up to multi_v7 by default
> as well.
>
> If more magic configs are necessary to select to make a TC2
> work properly I'd like to know these as well so we can just select
> them all by default also for these targets.
>
> Yours,
> Linus Walleij

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, back to index

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-02-29 21:02 [PATCH] ARM: config: multi_v7 Use schedutil cpufreq Linus Walleij
2020-03-02  4:22 ` Viresh Kumar
2020-03-25 16:27   ` Arnd Bergmann
2020-03-26 22:08     ` Linus Walleij
2020-03-27  5:07       ` Viresh Kumar
2020-03-27  8:06       ` Vincent Guittot

Linux-ARM-Kernel Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/linux-arm-kernel/0 linux-arm-kernel/git/0.git
	git clone --mirror https://lore.kernel.org/linux-arm-kernel/1 linux-arm-kernel/git/1.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-arm-kernel linux-arm-kernel/ https://lore.kernel.org/linux-arm-kernel \
		linux-arm-kernel@lists.infradead.org
	public-inbox-index linux-arm-kernel

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.infradead.lists.linux-arm-kernel


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git