2023-06-08 18:15:58

by Mario Limonciello

[permalink] [raw]
Subject: [PATCH] cpufreq: amd-pstate: Set default governor to schedutil

The Kconfig currently defaults the governor to schedutil on x86_64
only when intel-pstate and SMP have been selected.

If the kernel is built only with amd-pstate, the default governor
should also be schedutil.

Cc: Sun Peng (Leo) Li <[email protected]>
Signed-off-by: Mario Limonciello <[email protected]>
---
drivers/cpufreq/Kconfig | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/cpufreq/Kconfig b/drivers/cpufreq/Kconfig
index 2c839bd2b051..a1c51abddbc5 100644
--- a/drivers/cpufreq/Kconfig
+++ b/drivers/cpufreq/Kconfig
@@ -38,7 +38,7 @@ choice
prompt "Default CPUFreq governor"
default CPU_FREQ_DEFAULT_GOV_USERSPACE if ARM_SA1110_CPUFREQ
default CPU_FREQ_DEFAULT_GOV_SCHEDUTIL if ARM64 || ARM
- default CPU_FREQ_DEFAULT_GOV_SCHEDUTIL if X86_INTEL_PSTATE && SMP
+ default CPU_FREQ_DEFAULT_GOV_SCHEDUTIL if (X86_INTEL_PSTATE || X86_AMD_PSTATE) && SMP
default CPU_FREQ_DEFAULT_GOV_PERFORMANCE
help
This option sets which CPUFreq governor shall be loaded at
--
2.34.1



2023-06-09 22:27:25

by Leo Li

[permalink] [raw]
Subject: Re: [PATCH] cpufreq: amd-pstate: Set default governor to schedutil



On 6/8/23 05:53, Mario Limonciello wrote:
> The Kconfig currently defaults the governor to schedutil on x86_64
> only when intel-pstate and SMP have been selected.
>
> If the kernel is built only with amd-pstate, the default governor
> should also be schedutil.
>
> Cc: Sun Peng (Leo) Li <[email protected]>
> Signed-off-by: Mario Limonciello <[email protected]>

Reviewed-by: Leo Li <[email protected]>

Thanks!

> ---
> drivers/cpufreq/Kconfig | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/cpufreq/Kconfig b/drivers/cpufreq/Kconfig
> index 2c839bd2b051..a1c51abddbc5 100644
> --- a/drivers/cpufreq/Kconfig
> +++ b/drivers/cpufreq/Kconfig
> @@ -38,7 +38,7 @@ choice
> prompt "Default CPUFreq governor"
> default CPU_FREQ_DEFAULT_GOV_USERSPACE if ARM_SA1110_CPUFREQ
> default CPU_FREQ_DEFAULT_GOV_SCHEDUTIL if ARM64 || ARM
> - default CPU_FREQ_DEFAULT_GOV_SCHEDUTIL if X86_INTEL_PSTATE && SMP
> + default CPU_FREQ_DEFAULT_GOV_SCHEDUTIL if (X86_INTEL_PSTATE || X86_AMD_PSTATE) && SMP
> default CPU_FREQ_DEFAULT_GOV_PERFORMANCE
> help
> This option sets which CPUFreq governor shall be loaded at

2023-06-10 11:08:58

by Huang Rui

[permalink] [raw]
Subject: Re: [PATCH] cpufreq: amd-pstate: Set default governor to schedutil

On Thu, Jun 08, 2023 at 05:53:58PM +0800, Limonciello, Mario wrote:
> The Kconfig currently defaults the governor to schedutil on x86_64
> only when intel-pstate and SMP have been selected.
>
> If the kernel is built only with amd-pstate, the default governor
> should also be schedutil.
>
> Cc: Sun Peng (Leo) Li <[email protected]>
> Signed-off-by: Mario Limonciello <[email protected]>

Acked-by: Huang Rui <[email protected]>

> ---
> drivers/cpufreq/Kconfig | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/cpufreq/Kconfig b/drivers/cpufreq/Kconfig
> index 2c839bd2b051..a1c51abddbc5 100644
> --- a/drivers/cpufreq/Kconfig
> +++ b/drivers/cpufreq/Kconfig
> @@ -38,7 +38,7 @@ choice
> prompt "Default CPUFreq governor"
> default CPU_FREQ_DEFAULT_GOV_USERSPACE if ARM_SA1110_CPUFREQ
> default CPU_FREQ_DEFAULT_GOV_SCHEDUTIL if ARM64 || ARM
> - default CPU_FREQ_DEFAULT_GOV_SCHEDUTIL if X86_INTEL_PSTATE && SMP
> + default CPU_FREQ_DEFAULT_GOV_SCHEDUTIL if (X86_INTEL_PSTATE || X86_AMD_PSTATE) && SMP
> default CPU_FREQ_DEFAULT_GOV_PERFORMANCE
> help
> This option sets which CPUFreq governor shall be loaded at
> --
> 2.34.1
>

2023-06-12 03:16:42

by Yuan, Perry

[permalink] [raw]
Subject: RE: [PATCH] cpufreq: amd-pstate: Set default governor to schedutil

[AMD Official Use Only - General]

> -----Original Message-----
> From: Huang, Ray <[email protected]>
> Sent: Saturday, June 10, 2023 6:55 PM
> To: Limonciello, Mario <[email protected]>
> Cc: [email protected]; [email protected]; linux-
> [email protected]; Yuan, Perry <[email protected]>; Karny, Wyes
> <[email protected]>; Shenoy, Gautham Ranjal
> <[email protected]>; Li, Sun peng (Leo) <[email protected]>
> Subject: Re: [PATCH] cpufreq: amd-pstate: Set default governor to schedutil
>
> On Thu, Jun 08, 2023 at 05:53:58PM +0800, Limonciello, Mario wrote:
> > The Kconfig currently defaults the governor to schedutil on x86_64
> > only when intel-pstate and SMP have been selected.
> >
> > If the kernel is built only with amd-pstate, the default governor
> > should also be schedutil.
> >
> > Cc: Sun Peng (Leo) Li <[email protected]>
> > Signed-off-by: Mario Limonciello <[email protected]>
>
> Acked-by: Huang Rui <[email protected]>
>
> > ---
> > drivers/cpufreq/Kconfig | 2 +-
> > 1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/drivers/cpufreq/Kconfig b/drivers/cpufreq/Kconfig index
> > 2c839bd2b051..a1c51abddbc5 100644
> > --- a/drivers/cpufreq/Kconfig
> > +++ b/drivers/cpufreq/Kconfig
> > @@ -38,7 +38,7 @@ choice
> > prompt "Default CPUFreq governor"
> > default CPU_FREQ_DEFAULT_GOV_USERSPACE if
> ARM_SA1110_CPUFREQ
> > default CPU_FREQ_DEFAULT_GOV_SCHEDUTIL if ARM64 || ARM
> > - default CPU_FREQ_DEFAULT_GOV_SCHEDUTIL if X86_INTEL_PSTATE
> && SMP
> > + default CPU_FREQ_DEFAULT_GOV_SCHEDUTIL if
> (X86_INTEL_PSTATE ||
> > +X86_AMD_PSTATE) && SMP
> > default CPU_FREQ_DEFAULT_GOV_PERFORMANCE
> > help
> > This option sets which CPUFreq governor shall be loaded at
> > --
> > 2.34.1
> >


Tested-by: Perry Yuan <[email protected]>

Regards.
Perry Yuan