Bug 73421 - intel/p_state Does not increase into Turbo Boost states and does not display all governors. i5-3201M
Summary: intel/p_state Does not increase into Turbo Boost states and does not display ...
Status: CLOSED DOCUMENTED
Alias: None
Product: Power Management
Classification: Unclassified
Component: cpufreq (show other bugs)
Hardware: x86-64 Linux
: P1 high
Assignee: cpufreq
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-04-03 00:51 UTC by Álvaro Castillo
Modified: 2016-06-24 19:25 UTC (History)
4 users (show)

See Also:
Kernel Version: 3.13.7-200.fc20.x86_64
Subsystem:
Regression: No
Bisected commit-id:


Attachments

Description Álvaro Castillo 2014-04-03 00:51:16 UTC
I have two problems with my CPU Intel Core i5-3210M on my laptop Lenovo B590.

First, I cannot see all tipical governors availables such as ondemand, userspace, conservative... only I see powersave and performance with intel_pstate driver enabled.

I see this result of cpupower frequency-info with pstate driver:
"analyzing CPU 0:
  driver: intel_pstate
  CPUs which run at the same hardware frequency: 0
  CPUs which need to have their frequency coordinated by software: 0
  maximum transition latency: 0.97 ms.
  hardware limits: 1.20 GHz - 3.10 GHz
  available cpufreq governors: performance, powersave
  current policy: frequency should be within 1.20 GHz and 3.10 GHz.
                  The governor "powersave" may decide which speed to use
                  within this range.
  current CPU frequency is 2.77 GHz (asserted by call to hardware).
  boost state support:
    Supported: yes
    Active: yes
    2900 MHz max turbo 4 active cores
    2900 MHz max turbo 3 active cores
    2900 MHz max turbo 2 active cores
    3100 MHz max turbo 1 active cores"

I can see on each cpu* file cpuinfo_max_freq with 3100000 values. I guess is available set frequency into 3.1Ghz. ...


"# cat /sys/devices/system/cpu/cpu*/cpufreq/cpuinfo_max_freq 
3100000
"


Other way, turbostat display only 2.89 frecuencies of all cpus compiling a linux kernel for test porporsing with make -j5. This is display:

"cor CPU    %c0  GHz  TSC SMI    %c1    %c3    %c6    %c7 CTMP PTMP   %pc2   %pc3   %pc6   %pc7  Pkg_W  Cor_W GFX_W
         99.78 2.89 2.49   0   0.22   0.00   0.00   0.00   61   61   0.00   0.00   0.00   0.00  18.24  13.54  1.64
  0   0  99.80 2.89 2.49   0   0.20   0.00   0.00   0.00   60   61   0.00   0.00   0.00   0.00  18.24  13.54  1.64
  0   1  99.78 2.89 2.49   0   0.22
  1   2  99.92 2.89 2.49   0   0.08   0.00   0.00   0.00   61
  1   3  99.62 2.89 2.49   0   0.38
"
You can see how does not increase into 3.1Ghz per core. It's does not works properly Turbo Boost.

Anyway intel_pstate is loaded correctly:

"
[    0.852750] Intel pstate controlling: cpu 0
[    0.852762] Intel pstate controlling: cpu 1
[    0.852777] Intel pstate controlling: cpu 2
[    0.852789] Intel pstate controlling: cpu 3
"

Respect governors with intel_pstate=disabled at kernel command line boot. I can see all kernel's governors if I boot with intel_pstate=disable. That's using old ACPI driver called acpi_cpufreq. This is result of cpupower frequency-info:

"analyzing CPU 0:
  driver: acpi-cpufreq
  CPUs which run at the same hardware frequency: 0
  CPUs which need to have their frequency coordinated by software: 0
  maximum transition latency: 10.0 us.
  hardware limits: 1.20 GHz - 2.50 GHz
  available frequency steps: 2.50 GHz, 2.50 GHz, 2.40 GHz, 2.30 GHz, 2.20 GHz, 2.10 GHz, 2.00 GHz, 1.90 GHz, 1.80 GHz, 1.70 GHz, 1.60 GHz, 1.50 GHz, 1.40 GHz, 1.30 GHz, 1.20 GHz
  available cpufreq governors: conservative, userspace, powersave, ondemand, performance
  current policy: frequency should be within 1.20 GHz and 2.50 GHz.
                  The governor "ondemand" may decide which speed to use
                  within this range.
  current CPU frequency is 1.20 GHz (asserted by call to hardware).
  boost state support:
    Supported: yes
    Active: yes
    2900 MHz max turbo 4 active cores
    2900 MHz max turbo 3 active cores
    2900 MHz max turbo 2 active cores
    3100 MHz max turbo 1 active cores
"

However, I saw on all cpuinfo_max_freq reported:

"# cat /sys/devices/system/cpu/cpu*/cpufreq/cpuinfo_max_freq 
2501000"

It's not same that pstate that shows 3100000.

However, includes switch governor into performance. Does not increases into 3.1Ghz when I was compiling a Linux kernel to test. This is same results that use intel_pstate:

"cor CPU    %c0  GHz  TSC SMI    %c1    %c3    %c6    %c7 CTMP PTMP   %pc2   %pc3   %pc6   %pc7  Pkg_W  Cor_W GFX_W
         99.57 2.89 2.49   0   0.43   0.00   0.00   0.00   59   59   0.00   0.00   0.00   0.00  18.37  13.38  1.94
  0   0  99.80 2.89 2.49   0   0.20   0.00   0.00   0.00   59   59   0.00   0.00   0.00   0.00  18.37  13.38  1.94
  0   1  99.25 2.89 2.49   0   0.75
  1   2  99.61 2.89 2.49   0   0.39   0.00   0.00   0.00   58
  1   3  99.61 2.89 2.49   0   0.39
"

It's likes bug on intel_pstate driver. At Lenovo BIOS Intel Speed Step and Turbo Boost It's enabled by default.
Comment 1 Dirk Brandewie 2014-04-03 01:12:22 UTC
2900 MHz max turbo 4 active cores


intel_pstate has an internal governor. If you are using intel_pstate you use its internal governor which has two modes performance which is equivalent to the performance governor and powersave roughly equal to ondemand but is better on power.

When a scaling driver with an internal governor is being used powersave and performance are the only options

You have a 2.5Ghz processor and are getting 2.9Ghz in both cases which *is* in the turbo range.
Comment 2 Álvaro Castillo 2014-04-03 01:33:42 UTC
Yes I am getting 2.90 but does not set 3.1Ghz. 

For example, In this bug https://bugzilla.kernel.org/show_bug.cgi?id=66581 got problems that does not increases more of 2.8Ghz of kernel when max frecuencies is 3.8Ghz.

I don't understand why is not increases into 3.1Ghz.If not Intel should be tell the truth about Turbo boost and frequencies.

By other hand, I end compile a kernel over 30 minutes more less. However, my friend does have an Intel Core 2  P8600 takes 10 minutes more less. How is a CPU old with 2 cores can compile a kernel into 10 minutes more less than my new CPU It's new model. I think is a bug.

Some users of Gentoo with i5 processors tells me that 5-6 minutes more less should be end compiling a kernel process. :/
Comment 3 Dirk Brandewie 2014-04-03 01:52:09 UTC
The msr-tools package from https://01.org/msr-tools/downloads makes it easy to see what P state is being requested for each core with the command:
   sudo rdmsr -a   0x199

The requested P state is in the upper eight bits.

The P state intel_pstate requests is just that a request in the turbo range, the CPU itself decides what frequency will be used while keeping the processor in it thermal envelop.
Comment 4 Álvaro Castillo 2014-04-03 15:14:41 UTC
This command reports:


rdmsr -a 0x199
rdmsr: invalid option -- 'a'
Usage: rdmsr [options] regno
  --help         -h  Print this help
  --version      -V  Print current version
  --hexadecimal  -x  Hexadecimal output (lower case)
  --capital-hex  -X  Hexadecimal output (upper case)
  --decimal      -d  Signed decimal output
  --unsigned     -u  Unsigned decimal output
  --octal        -o  Octal output
  --c-language   -c  Format output as a C language constant
  --zero-pad     -0  Output leading zeroes
  --raw          -r  Raw binary output
  --processor #  -p  Select processor number (default 0)
  --bitfield h:l -f  Output bits [h:l] only

msr-tools-1.1.2-8.fc20.x86_64

I don't understand this.

How can an Intel Core 2 duo more older than my Intel i5 processor It's passed 3 generations of releases built. Be more powerful than it?

Some conclusions:
- 1º: Intel is lying. I should as good citizen I am report them for fraud.
- 2º: Intel_pstate does not working correctly.
Comment 5 Dirk Brandewie 2014-04-03 15:37:55 UTC
(In reply to Álvaro Castillo from comment #4)
> This command reports:
> 
> 
> msr-tools-1.1.2-8.fc20.x86_64
> 

The current version of msr-tools is v1.3 which the link above points to.

> I don't understand this.
> 
> How can an Intel Core 2 duo more older than my Intel i5 processor It's
> passed 3 generations of releases built. Be more powerful than it?
> 

Are both systems configured the same?  memory, disk, laptop/desktop/server?

Are you building with the same .config on both systems?

> Some conclusions:
> - 1º: Intel is lying. I should as good citizen I am report them for fraud.
> - 2º: Intel_pstate does not working correctly.

So you are getting the highest turbo frequency available when four cores are active. I fail to see how this is an intel_pstate issue.

BTW you got the same results with ondemand.

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