* [PATCH] cpufreq: Report if CPU doesn't report boost technologies
@ 2019-02-20 10:10 Erwan Velu
2019-02-20 10:41 ` Rafael J. Wysocki
0 siblings, 1 reply; 5+ messages in thread
From: Erwan Velu @ 2019-02-20 10:10 UTC (permalink / raw)
Cc: Erwan Velu, Rafael J. Wysocki, Viresh Kumar,
open list:CPU FREQUENCY SCALING FRAMEWORK, open list
There is some rare cases where CPB (and possibly IDA) are missing on processors.
This is the case fixed by commit f7f3dc00f612 ("x86/cpu/AMD: Fix erratum 1076 (CPB bit)") and following.
In such context, the boost status isn't reported by /sys/devices/system/cpu/cpufreq/boost.
This commit is about printing a message reporting the CPU doesn't expose the boost capabilities.
This message could help debugging platforms hit by this phenomena.
Signed-off-by: Erwan Velu <e.velu@criteo.com>
---
drivers/cpufreq/acpi-cpufreq.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/drivers/cpufreq/acpi-cpufreq.c b/drivers/cpufreq/acpi-cpufreq.c
index d62fd374d5c7..06d32d21dac0 100644
--- a/drivers/cpufreq/acpi-cpufreq.c
+++ b/drivers/cpufreq/acpi-cpufreq.c
@@ -916,8 +916,10 @@ static void __init acpi_cpufreq_boost_init(void)
{
int ret;
- if (!(boot_cpu_has(X86_FEATURE_CPB) || boot_cpu_has(X86_FEATURE_IDA)))
+ if (!(boot_cpu_has(X86_FEATURE_CPB) || boot_cpu_has(X86_FEATURE_IDA))) {
+ pr_debug("CPU doesn't expose boost capabilities\n");
return;
+ }
acpi_cpufreq_driver.set_boost = set_boost;
acpi_cpufreq_driver.boost_enabled = boost_state(0);
--
2.20.1
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH] cpufreq: Report if CPU doesn't report boost technologies
2019-02-20 10:10 [PATCH] cpufreq: Report if CPU doesn't report boost technologies Erwan Velu
@ 2019-02-20 10:41 ` Rafael J. Wysocki
2019-02-20 10:52 ` Erwan Velu
0 siblings, 1 reply; 5+ messages in thread
From: Rafael J. Wysocki @ 2019-02-20 10:41 UTC (permalink / raw)
To: Erwan Velu
Cc: Erwan Velu, Rafael J. Wysocki, Viresh Kumar,
open list:CPU FREQUENCY SCALING FRAMEWORK, open list
On Wed, Feb 20, 2019 at 11:11 AM Erwan Velu <erwanaliasr1@gmail.com> wrote:
>
> There is some rare cases where CPB (and possibly IDA) are missing on processors.
> This is the case fixed by commit f7f3dc00f612 ("x86/cpu/AMD: Fix erratum 1076 (CPB bit)") and following.
>
> In such context, the boost status isn't reported by /sys/devices/system/cpu/cpufreq/boost.
So I'm not really sure why the extra message is needed. It looks like
this message will always be printed (with debug output enabled) if the
current cpufreq driver is acpi-cpufreq and the boost attribute is not
present in sysfs, which only is the case if CPB/IDA aren't there.
Does it provide any additional information, then?
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] cpufreq: Report if CPU doesn't report boost technologies
2019-02-20 10:41 ` Rafael J. Wysocki
@ 2019-02-20 10:52 ` Erwan Velu
2019-02-20 11:16 ` Rafael J. Wysocki
0 siblings, 1 reply; 5+ messages in thread
From: Erwan Velu @ 2019-02-20 10:52 UTC (permalink / raw)
To: Rafael J. Wysocki, Erwan Velu
Cc: Rafael J. Wysocki, Viresh Kumar,
open list:CPU FREQUENCY SCALING FRAMEWORK, open list
Le 20/02/2019 à 11:41, Rafael J. Wysocki a écrit :
> On Wed, Feb 20, 2019 at 11:11 AM Erwan Velu <erwanaliasr1@gmail.com> wrote:
>> There is some rare cases where CPB (and possibly IDA) are missing on processors.
>> This is the case fixed by commit f7f3dc00f612 ("x86/cpu/AMD: Fix erratum 1076 (CPB bit)") and following.
>>
>> In such context, the boost status isn't reported by /sys/devices/system/cpu/cpufreq/boost.
> So I'm not really sure why the extra message is needed. It looks like
> this message will always be printed (with debug output enabled) if the
> current cpufreq driver is acpi-cpufreq and the boost attribute is not
> present in sysfs, which only is the case if CPB/IDA aren't there.
>
> Does it provide any additional information, then?
When you know and read the code, yes this patch is too obvious.
As a user when I was troubleshooting why the boost entry was _not_
populated on one CPU and was populated on another.
Running acpi-cpufreq with dyndbg, I would have found useful to get that
hint.
So that could helps users that never read that part of the code and
which are tricked into that configuration.
Erwan,
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] cpufreq: Report if CPU doesn't report boost technologies
2019-02-20 10:52 ` Erwan Velu
@ 2019-02-20 11:16 ` Rafael J. Wysocki
2019-02-20 11:24 ` Erwan Velu
0 siblings, 1 reply; 5+ messages in thread
From: Rafael J. Wysocki @ 2019-02-20 11:16 UTC (permalink / raw)
To: Erwan Velu
Cc: Rafael J. Wysocki, Erwan Velu, Rafael J. Wysocki, Viresh Kumar,
open list:CPU FREQUENCY SCALING FRAMEWORK, open list
On Wed, Feb 20, 2019 at 11:52 AM Erwan Velu <e.velu@criteo.com> wrote:
>
>
> Le 20/02/2019 à 11:41, Rafael J. Wysocki a écrit :
> > On Wed, Feb 20, 2019 at 11:11 AM Erwan Velu <erwanaliasr1@gmail.com> wrote:
> >> There is some rare cases where CPB (and possibly IDA) are missing on processors.
> >> This is the case fixed by commit f7f3dc00f612 ("x86/cpu/AMD: Fix erratum 1076 (CPB bit)") and following.
> >>
> >> In such context, the boost status isn't reported by /sys/devices/system/cpu/cpufreq/boost.
> > So I'm not really sure why the extra message is needed. It looks like
> > this message will always be printed (with debug output enabled) if the
> > current cpufreq driver is acpi-cpufreq and the boost attribute is not
> > present in sysfs, which only is the case if CPB/IDA aren't there.
> >
> > Does it provide any additional information, then?
>
> When you know and read the code, yes this patch is too obvious.
>
> As a user when I was troubleshooting why the boost entry was _not_
> populated on one CPU and was populated on another.
>
> Running acpi-cpufreq with dyndbg, I would have found useful to get that
> hint.
>
> So that could helps users that never read that part of the code and
> which are tricked into that configuration.
OK, I see your point.
I'll queue up the patch, but I guess I'll change the message.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] cpufreq: Report if CPU doesn't report boost technologies
2019-02-20 11:16 ` Rafael J. Wysocki
@ 2019-02-20 11:24 ` Erwan Velu
0 siblings, 0 replies; 5+ messages in thread
From: Erwan Velu @ 2019-02-20 11:24 UTC (permalink / raw)
To: Rafael J. Wysocki
Cc: Erwan Velu, Rafael J. Wysocki, Viresh Kumar,
open list:CPU FREQUENCY SCALING FRAMEWORK, open list
I tried to put the message in a way to stay neutral, not saying if its
a real error or not.
Just reporting we were not able to find any boost cap on it.
Erwan,
Le mer. 20 févr. 2019 à 12:16, Rafael J. Wysocki <rafael@kernel.org> a écrit :
>
> On Wed, Feb 20, 2019 at 11:52 AM Erwan Velu <e.velu@criteo.com> wrote:
> >
> >
> > Le 20/02/2019 à 11:41, Rafael J. Wysocki a écrit :
> > > On Wed, Feb 20, 2019 at 11:11 AM Erwan Velu <erwanaliasr1@gmail.com> wrote:
> > >> There is some rare cases where CPB (and possibly IDA) are missing on processors.
> > >> This is the case fixed by commit f7f3dc00f612 ("x86/cpu/AMD: Fix erratum 1076 (CPB bit)") and following.
> > >>
> > >> In such context, the boost status isn't reported by /sys/devices/system/cpu/cpufreq/boost.
> > > So I'm not really sure why the extra message is needed. It looks like
> > > this message will always be printed (with debug output enabled) if the
> > > current cpufreq driver is acpi-cpufreq and the boost attribute is not
> > > present in sysfs, which only is the case if CPB/IDA aren't there.
> > >
> > > Does it provide any additional information, then?
> >
> > When you know and read the code, yes this patch is too obvious.
> >
> > As a user when I was troubleshooting why the boost entry was _not_
> > populated on one CPU and was populated on another.
> >
> > Running acpi-cpufreq with dyndbg, I would have found useful to get that
> > hint.
> >
> > So that could helps users that never read that part of the code and
> > which are tricked into that configuration.
>
> OK, I see your point.
>
> I'll queue up the patch, but I guess I'll change the message.
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2019-02-20 11:24 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-02-20 10:10 [PATCH] cpufreq: Report if CPU doesn't report boost technologies Erwan Velu
2019-02-20 10:41 ` Rafael J. Wysocki
2019-02-20 10:52 ` Erwan Velu
2019-02-20 11:16 ` Rafael J. Wysocki
2019-02-20 11:24 ` Erwan Velu
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox