Bug 24562 - k8-powernow does not see all cores
Summary: k8-powernow does not see all cores
Status: CLOSED CODE_FIX
Alias: None
Product: Power Management
Classification: Unclassified
Component: cpufreq (show other bugs)
Hardware: All Linux
: P1 normal
Assignee: Thomas Renninger
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-12-09 14:57 UTC by Thoralf Dassler
Modified: 2011-03-30 23:36 UTC (History)
2 users (show)

See Also:
Kernel Version: 2.6.36.1
Subsystem:
Regression: No
Bisected commit-id:


Attachments
2.6.36.1_dmesg (86.23 KB, text/plain)
2010-12-10 13:47 UTC, Thoralf Dassler
Details
2.6.36.1_cpufreq (5.70 KB, text/plain)
2010-12-10 13:47 UTC, Thoralf Dassler
Details
2.6.36.1_config (68.90 KB, application/octet-stream)
2010-12-10 13:48 UTC, Thoralf Dassler
Details
patch: fix a poor KERN_INFO message in powernow_k8 driver (1.10 KB, patch)
2010-12-13 08:02 UTC, Zhang Rui
Details | Diff

Description Thoralf Dassler 2010-12-09 14:57:35 UTC
During boot, I get this summary on my AMD 890FX/SB850 chipset:

SMP: Allowing 6 CPUs, 0 hotplug CPUs
setup_percpu: NR_CPUS:4096 nr_cpumask_bits:6 nr_cpu_ids:6 nr_node_ids:1
PERCPU: Embedded 27 pages/cpu @ffff880006000000 s80704 r8192 d21696 u262144
pcpu-alloc: s80704 r8192 d21696 u262144 alloc=1*2097152
pcpu-alloc: [0] 0 1 2 3 4 5 - - 
SLUB: Genslabs=13, HWalign=64, Order=0-3, MinObjects=0, CPUs=6, Nodes=1
        RCU-based detection of stalled CPUs is disabled.
        Verbose stalled-CPUs detection is disabled.
CPU: Physical Processor ID: 0
CPU: Processor Core ID: 0
mce: CPU supports 6 MCE banks
CPU0: AMD Phenom(tm) II X6 1090T Processor stepping 00
Switch to broadcast mode on CPU1
Switch to broadcast mode on CPU2
Switch to broadcast mode on CPU3
Switch to broadcast mode on CPU4
Brought up 6 CPUs
Switch to broadcast mode on CPU5
Switch to broadcast mode on CPU0

And a bit further down cores 4 and 5 are not seen by "powernow-k8":

powernow-k8: Found 1 AMD Phenom(tm) II X6 1090T Processor (6 cpu cores) (version 2.20.00)
powernow-k8: Core Performance Boosting: on.
powernow-k8:    0 : pstate 0 (3200 MHz)
powernow-k8:    1 : pstate 1 (2400 MHz)
powernow-k8:    2 : pstate 2 (1600 MHz)
powernow-k8:    3 : pstate 3 (800 MHz)

Frequency scaling does work on all 6 cores once the system is up and running.

-----------------------------

Finally, should this: "AMD Opteron/Athlon64 PowerNow!" under CPU Frequency scaling inside the kernel be called something else to accommodate the K10 (Phenom) line?
Comment 1 Zhang Rui 2010-12-10 05:47:56 UTC
please attach the full dmesg output.

please attach the output of "grep . /sys/devices/system/cpu/cpu*/cpufreq/*"
Comment 2 Thoralf Dassler 2010-12-10 13:47:06 UTC
Created attachment 39712 [details]
2.6.36.1_dmesg
Comment 3 Thoralf Dassler 2010-12-10 13:47:49 UTC
Created attachment 39722 [details]
2.6.36.1_cpufreq
Comment 4 Thoralf Dassler 2010-12-10 13:48:11 UTC
Created attachment 39732 [details]
2.6.36.1_config
Comment 5 Zhang Rui 2010-12-13 00:38:28 UTC
I'm confused about what the problem is.

 (In reply to comment #0)
> And a bit further down cores 4 and 5 are not seen by "powernow-k8":
>
no, at least I can not see the problem from the log below.
 
> powernow-k8: Found 1 AMD Phenom(tm) II X6 1090T Processor (6 cpu cores)
> (version 2.20.00)
> powernow-k8: Core Performance Boosting: on.
> powernow-k8:    0 : pstate 0 (3200 MHz)
> powernow-k8:    1 : pstate 1 (2400 MHz)
> powernow-k8:    2 : pstate 2 (1600 MHz)
> powernow-k8:    3 : pstate 3 (800 MHz)
> 
these are four different p-states, which are supported by all of the six cores.
Comment 6 Thoralf Dassler 2010-12-13 07:51:10 UTC
This is confusing, this can be read as: core 0, currently on 3200 MHz, core 1 currently on 2400 MHz, etc, with cores 4 and 5 not seen.

But I do understand what you are saying. Nevertheless, could the list be rearranged to make this clearer?

Should we close the (bug) report?

Many thanks.
Comment 7 Zhang Rui 2010-12-13 08:02:53 UTC
Created attachment 39962 [details]
patch: fix a poor KERN_INFO message in powernow_k8 driver

so you probably want a patch like this, right?
I'll send the patch out later.
Comment 8 Thoralf Dassler 2010-12-13 21:59:43 UTC
Beautiful, thank you!
Comment 9 Thoralf Dassler 2010-12-13 22:35:48 UTC
Beautiful, thank you.


On 13/12/10 08:02, bugzilla-daemon@bugzilla.kernel.org wrote:
> https://bugzilla.kernel.org/show_bug.cgi?id=24562
>
>
>
>
>
> --- Comment #7 from Zhang Rui<rui.zhang@intel.com>   2010-12-13 08:02:53 ---
> Created an attachment (id=39962)
>   -->  (https://bugzilla.kernel.org/attachment.cgi?id=39962)
> patch: fix a poor KERN_INFO message in powernow_k8 driver
>
> so you probably want a patch like this, right?
> I'll send the patch out later.
>
Comment 10 Zhang Rui 2010-12-14 00:22:49 UTC
oh, sorry, I rechecked the code and it seems that the first "0,1,2,3" is not redundant information.
Reassign this bug to cpufreq driver experts.
Comment 11 Thoralf Dassler 2010-12-14 09:00:37 UTC
No worries, thanks.
Comment 12 Thomas Renninger 2010-12-14 11:26:22 UTC
> This is confusing, this can be read as: core 0, currently on 3200 MHz, core 1
> currently on 2400 MHz, etc, with cores 4 and 5 not seen.
I expect you mean the new message on "boostable" CPUs which is unrelated to the rest:
> powernow-k8: Core Performance Boosting: on.
can get mixed up with below:
> powernow-k8:    0 : pstate 0 (3200 MHz)
> powernow-k8:    1 : pstate 1 (2400 MHz)
especially the "Core performance" string by bad luck looks related:
Core Performance
0 :  pstate 0
1 :  pstate 1

I agree that this is a bit confusing and Rui's first part of the patch should be sufficient:
 			if (cpu_family == CPU_HW_PSTATE) {
 				printk(KERN_INFO PFX
-					"   %d : pstate %d (%d MHz)\n", j,
+					"   pstate %d (%d MHz)\n",
 					data->powernow_table[j].index,
 					data->powernow_table[j].frequency/1000);

In the other case this message:
> powernow-k8: Core Performance Boosting: on.
doesn't appear anyway and the message has another format and the bit removed by Rui has some meaning.

But this is a really minor bug.
I hope I do not forget about it and I will add Rui's first part if I have other cpufreq patches in the queue -> I set this one resolved already.
Comment 13 Thoralf Dassler 2010-12-14 12:38:16 UTC
Thanks, Thomas. Yes I mean:

"I expect you mean the new message on "boostable" CPUs which is unrelated to the
rest ..."

I already tried Rui's patch and I was happy with it.
Comment 14 Florian Mickler 2011-03-27 10:47:18 UTC
A commit referencing this bug has been merged for .39-rc1:

commit 9e91869544fc831d640cae1ffd0313b38657b593
Author: Thomas Renninger <trenn@suse.de>
Date:   Thu Mar 3 21:31:24 2011 +0100

    [CPUFREQ] powernow-k8: The table index is not worth displaying
Comment 15 Florian Mickler 2011-03-30 23:36:31 UTC
I'm closing this, although I'm a little confused about this bug report... please post a note if this shouldn't be closed yet.

Note You need to log in before you can comment on or make changes to this bug.