Skip to contentSkip to conversation

Frequency downscaling of new intel CPU

Xenomai-help Petr Cervenka 4 participants 10 messages Sep 26, 2011 – Oct 5, 2011

lore
Share & tools
lore
#0 lore raw

Hello.

I recently tried newer computer and I suprusingly realized that it is bigger load than the old one with our xenomai application. The problem is in the frequency downscaling of the processor when the load in under 100%.
Of course I have disabled CPU_FREQ, ACPI_PROCESSOR and INTEL_IDLE as suggested.
Later I tried also to disable CPU_IDLE, 7300_IDLE (intel chipset idle memory) and all power efficiency settings in the BIOS, but without success. The experienced behaviour is following:
when the process is waiting for an event, the processor lowers its frequency and when the event happens it tries to restore (slowly) its nominal frequency.

Do you have any advice or tip what to try, because I'm really desperate?

Best regards

Petr Cervenka

configuration:
Xeon E3-1220 (Sandy Bridge)
linux-2.6.38.8
xenomai-2.5.6

#1 lore raw

Hello again.
I know, that my problem is not so close related with the xenomai. But I think many of xenomai users with new intel CPUs have similar problem.
I tried it it with two different main boards and none of the BIOS settings helped. (C-states: disabled, Speedstep: disabled, CPU idle: high performance, TurboBoost: disabled, ...). My theory is that the linux kernel overrides BIOS settings, but I don't know how to prove it. Any ideas that could help me?

Petr Cervenka

______________________________________________________________.

Quoted 25 lines

Od: "Petr Cervenka" <[email protected]>
Komu: "xenomai-help" <[email protected]>
Datum: 26.09.2011 09:02
Předmět: Frequency downscaling of new intel CPU

Hello.

I recently tried newer computer and I suprusingly realized that it has bigger load than the old one with our xenomai application. The problem is in the frequency downscaling of the processor when the load in under 100%.
Of course I have disabled CPU_FREQ, ACPI_PROCESSOR and INTEL_IDLE as suggested.
Later I tried also to disable CPU_IDLE, 7300_IDLE (intel chipset idle memory) and all power efficiency settings in the BIOS, but without success. The experienced behaviour is following:
when the process is waiting for an event, the processor lowers its frequency and when the event happens it tries to restore (slowly) its nominal frequency.

Do you have any advice or tip what to try, because I'm really desperate?

Best regards

Petr Cervenka

configuration:
Xeon E3-1220 (Sandy Bridge)
linux-2.6.38.8
xenomai-2.5.6

#2 lore raw

2011/10/3 Petr Cervenka <[email protected]>:

Quoted 5 lines

Hello again.
I know, that my problem is not so close related with the xenomai. But I think many of xenomai users with new intel CPUs have similar problem.
I tried it it with two different main boards and none of the BIOS settings helped. (C-states: disabled, Speedstep: disabled, CPU idle: high performance, TurboBoost: disabled, ...). My theory is that the linux kernel overrides BIOS settings, but I don't know how to prove it. Any ideas that could help me?

Did you verify that you don't have any cpufred related module loaded?

What does

$ lsmod | grep cpu

indicate?

You can try that one too:

$ find /sys/devices/system -name "cpufreq"
Signature · 3 lines
Erk
Membre de l'April - « promouvoir et défendre le logiciel libre » -
http://www.april.org
#3 lore raw

I'm sure that CPU_FREQ, ACPI_PROCESSOR, CPU_IDLE, INTEL_IDLE and 7300_IDLE were disabled in kernel configuration and no cpufreq module is loaded (or even created).

Later I tried (desperately) to enable most of these settings and although I set performance governor to cpufreq, no measurable change happened (using acpi_cpufreq module). But cpuidle (when compiled in kernel) shows that a lot of time is spent in power saving states (/sys/devices/system/cpu/cpu<n>/cpuidle/state<i>/..., where <i> is also 2 and 3).

And on one of the mainboards I tried, the acpi_cpufreq was unable to load, perhaps because of the disabled BIOS settings).

I'm now working with windows, so the sysfs path is what I remember (maybe not so well).

Petr

Dne 3.10.2011 10:47, Eric Noulard napsal(a):

Quoted 18 lines

2011/10/3 Petr Cervenka<[email protected]>:

Quoted 4 lines

Hello again.
I know, that my problem is not so close related with the xenomai. But I think many of xenomai users with new intel CPUs have similar problem.
I tried it it with two different main boards and none of the BIOS settings helped. (C-states: disabled, Speedstep: disabled, CPU idle: high performance, TurboBoost: disabled, ...). My theory is that the linux kernel overrides BIOS settings, but I don't know how to prove it. Any ideas that could help me?

Did you verify that you don't have any cpufred related module loaded?

What does

$ lsmod | grep cpu

indicate?

You can try that one too:

$ find /sys/devices/system -name "cpufreq"
#4 lore raw
In reply to Eric Noulard
Quoted 8 lines · Petr Cervenka
Quoted 2 lines

Any ideas that could help me?

What about looking at /proc/cpuinfo while running your system ? If you see that the speed is not the maximal, indeed, the frequency scaling system changes the speed of the processor.

/proc/cpuinfo shows always full frequency clock (3292.500 MHz)

More details:
1) two xenomai tasks are running with 100us period (controlled by external hardware)
2) one task communicates with hardware (receives data via rtnet) and passes them by rt_queue to the second task (on another core)
3) second task does some computations and returns processed data to the first task
4) first task sends data to hardware

The problem is that during waiting on new data from hw CPU puts itself in some deeper idle state with lower frequency. A then, when the data are available, it slowly wakes up to normal state. In other words: computation takes longer time than it takes on older computers (depends on overall CPU load).
When some artificial 100% load is running on another core, the computation is as fast as it should be.

Petr

#5 lore raw

2011/10/4 Petr Cervenka <[email protected]>:

Quoted 17 lines
Quoted 8 lines · Petr Cervenka
Quoted 2 lines

 Any ideas that could help me?

What about looking at /proc/cpuinfo while running your system ? If you see that the speed is not the maximal, indeed, the frequency scaling system changes the speed of the processor.

/proc/cpuinfo shows always full frequency clock (3292.500 MHz)

More details:
1) two xenomai tasks are running with 100us period (controlled by external hardware)
2) one task communicates with hardware (receives data via rtnet) and passes them by rt_queue to the second task (on  another core)
3) second task does some computations and returns processed data to the first task
4) first task sends data to hardware

Quoted 3 lines

The problem is that during waiting on new data from hw CPU puts itself in some deeper idle state with lower frequency. A then, when the data are available, it slowly wakes up to normal state. In other words: computation takes longer time than it takes on older computers (depends on overall CPU load).
When some artificial 100% load is running on another core, the computation is as fast as it should be.

Then may be you should ask your computer provider (for the BIOS main board) and/or intel representative (for more info. about Sandy Bridge dynamic frequency features)
whether if it's an expected behavior of this kind of processor to behave like that?

I think it would be nice to know because you assume the processor is "slowing down" but this
cannot be stated from usual way monitoring processor frequency.

That said, from this small pieces of informations:
http://www.anandtech.com/show/3922/intels-sandy-bridge-architecture-exposed/7

Sandy Bridge seems to be a deterministic computing nightmare, unless all those nice features (TurboBoost and the like) could be disabled ... I mean for sure not theoretically.

May be the BIOS is flawed and it is not disabling the dynamic frequency features properly?

Signature · 3 lines
Erk
Membre de l'April - « promouvoir et défendre le logiciel libre » -
http://www.april.org
#6 lore raw
In reply to Petr Cervenka
Quoted 1 line · Petr Cervenka

Any ideas that could help me?

What about looking at /proc/cpuinfo while running your system ? If you see that the speed is not the maximal, indeed, the frequency scaling system changes the speed of the processor.

#7 lore raw
In reply to Petr Cervenka
Quoted 11 lines · Petr Cervenka

Hello.

I recently tried newer computer and I suprusingly realized that it is bigger load than the old one with our xenomai application. The problem is in the frequency downscaling of the processor when the load in under 100%.
Of course I have disabled CPU_FREQ, ACPI_PROCESSOR and INTEL_IDLE as suggested.
Later I tried also to disable CPU_IDLE, 7300_IDLE (intel chipset idle memory) and all power efficiency settings in the BIOS, but without success. The experienced behaviour is following:
when the process is waiting for an event, the processor lowers its frequency and when the event happens it tries to restore (slowly) its nominal frequency.

Do you have any advice or tip what to try, because I'm really desperate?

Have you tried:
- enabling SMI workaround (and do not forget to check the boot logs to check that it actually works with the chipset you use);
- if that fails, adding "idle=poll" to kernel arguments?

Signature · 1 line
                                                                Gilles.
#8 lore raw
Quoted 6 lines

Have you tried:
- enabling SMI workaround (and do not forget to check the boot logs to check that it actually works with the chipset you use);
- if that fails, adding "idle=poll" to kernel arguments?

Enabling SMI workaround didn't make any change. What should I look after in boot logs?

Kernel parameter idle=poll displayed thermal warnings and freq. throttling after cca 30 sec. of application run. But when fan speed was selected to Full speed at BIOS, the machine worked fast as it should be. Quite impressive ;-) Other idle options were same as none, only idle=mwait frezzes during early boot stage.

Thank you for your help.

Petr

PS: Do you have any other idea without overheating side-efects

#9 lore raw
Quoted 8 lines · Petr Cervenka
Quoted 6 lines

Have you tried:
- enabling SMI workaround (and do not forget to check the boot logs to check that it actually works with the chipset you use);
- if that fails, adding "idle=poll" to kernel arguments?

Enabling SMI workaround didn't make any change. What should I look after in boot logs?

SMI

Signature · 1 line
					    Gilles.