Skip to contentSkip to conversation

Real-time Performance Improvement

Xenomai Jack Lee 2 participants 4 messages Sep 22, 2016 – Sep 29, 2016

lore
Share & tools
lore

Jack Lee

author
#0 lore raw

Hi, everyone,

My board is advantech MIO-5251 (J1900 version), linux kernel version is 4.1.18,

xenomai version is 3.0.3. As mentioned before, the real-time performance I got was

not good.

But I found something here: http://rtt-lwr.readthedocs.io/en/latest/rtpc/xenomai.html.

After "i915.enable_rc6=0 i915.modset=1 noapic" was added to the kernel command

line, the real-time performance improved a lot, which means latency tests (-t0, t1, t2)

has no overruns (less than 80us) in 13+ hours, but when other real-time applications

was running, overruns occurred sometimes.

I found that "intel_powerclamp" "intel_rapl" was in the "lsmod" list. After I removed them,

real-time performance of the system is quite good now.

I found configs below exist in the original .config file, except "CONFIG_CPU_THERMAL". These

configs do not appear on the official website as far as I know. Is it necessary to disable them to

improve real-time performance?

Generic Thermal sysfs driver
CONFIG_THERMAL

Fair-share thermal governor
CONFIG_THERMAL_GOV_FAIR_SHARE

Step_wise thermal governor
CONFIG_THERMAL_GOV_STEP_WISE

User_space thermal governor
CONFIG_THERMAL_GOV_USER_SPACE

generic cpu cooling support
CONFIG_CPU_THERMAL(n)

Thermal emulation mode support
CONFIG_THERMAL_EMULATION

Intel PowerClamp idle injection driver
CONFIG_INTEL_POWERCLAMP

By the way, I found my two Ethernet cards and the can board have the same interrupt number.I removed the igb module.

Is it possible to assign interrupt numbers manuallly? When I started from different kernels, the number is not the same.

Good luck!

author
#1 lore raw
Quoted 49 lines · Jack Lee

Hi, everyone,

My board is advantech MIO-5251 (J1900 version), linux kernel version is 4.1.18,

xenomai version is 3.0.3. As mentioned before, the real-time performance I got was

not good.

But I found something here: http://rtt-lwr.readthedocs.io/en/latest/rtpc/xenomai.html.

After "i915.enable_rc6=0 i915.modset=1 noapic" was added to the kernel command

line, the real-time performance improved a lot, which means latency tests (-t0, t1, t2)

has no overruns (less than 80us) in 13+ hours, but when other real-time applications

was running, overruns occurred sometimes.

I found that "intel_powerclamp" "intel_rapl" was in the "lsmod" list. After I removed them,

real-time performance of the system is quite good now.

I found configs below exist in the original .config file, except "CONFIG_CPU_THERMAL". These

configs do not appear on the official website as far as I know. Is it necessary to disable them to

improve real-time performance?

Generic Thermal sysfs driver
CONFIG_THERMAL

Fair-share thermal governor
CONFIG_THERMAL_GOV_FAIR_SHARE

Step_wise thermal governor
CONFIG_THERMAL_GOV_STEP_WISE

User_space thermal governor
CONFIG_THERMAL_GOV_USER_SPACE

generic cpu cooling support
CONFIG_CPU_THERMAL(n)

Thermal emulation mode support
CONFIG_THERMAL_EMULATION

Intel PowerClamp idle injection driver
CONFIG_INTEL_POWERCLAMP

Quoted 7 lines

By the way, I found my two Ethernet cards and the can board have the same interrupt number.I removed the igb module.

Is it possible to assign interrupt numbers manuallly? When I started from different kernels, the number is not the same.

Good luck!

[    0.004106] ENERGY_PERF_BIAS: Set to 'normal', was 'performance'
[    0.004114] ENERGY_PERF_BIAS: View and update with x86_energy_perf_policy(8)

I found the above message in the "dmesg" output.
This was solved by:
sudo modprobe msr
sudo cd $(knlsrc)/tools/power/x86/x86_energy_perf_policy
sudo make
sudo ./x86_energy_perf_policy performance
"rdmsr -a 0x1b0" outputs "6 6 6 6" and "0 0 0 0" previously and subsequently. "wrmsr" should works too.

#2 lore raw
Quoted 74 lines · Jack Lee
Quoted 58 lines · Jack Lee

Hi, everyone,

My board is advantech MIO-5251 (J1900 version), linux kernel version is 4.1.18,

xenomai version is 3.0.3. As mentioned before, the real-time performance I got was

not good.

But I found something here:
http://rtt-lwr.readthedocs.io/en/latest/rtpc/xenomai.html.

After "i915.enable_rc6=0 i915.modset=1 noapic" was added to the kernel command

line, the real-time performance improved a lot, which means latency tests (-t0, t1, t2)

has no overruns (less than 80us) in 13+ hours, but when other real-time applications

was running, overruns occurred sometimes.

I found that "intel_powerclamp" "intel_rapl" was in the "lsmod" list. After I removed them,

real-time performance of the system is quite good now.

I found configs below exist in the original .config file, except "CONFIG_CPU_THERMAL". These

configs do not appear on the official website as far as I know. Is it necessary to disable them to

improve real-time performance?

Generic Thermal sysfs driver
CONFIG_THERMAL

Fair-share thermal governor
CONFIG_THERMAL_GOV_FAIR_SHARE

Step_wise thermal governor
CONFIG_THERMAL_GOV_STEP_WISE

User_space thermal governor
CONFIG_THERMAL_GOV_USER_SPACE

generic cpu cooling support
CONFIG_CPU_THERMAL(n)

Thermal emulation mode support
CONFIG_THERMAL_EMULATION

Intel PowerClamp idle injection driver
CONFIG_INTEL_POWERCLAMP

Quoted 9 lines

By the way, I found my two Ethernet cards and the can board have the same interrupt number.I removed the igb module.

Is it possible to assign interrupt numbers manuallly? When I started from different kernels, the number is not the same.

Good luck!

[    0.004106] ENERGY_PERF_BIAS: Set to 'normal', was 'performance'
[    0.004114] ENERGY_PERF_BIAS: View and update with

x86_energy_perf_policy(8)

Quoted 10 lines

I found the above message in the "dmesg" output.
This was solved by:
sudo modprobe msr
sudo cd $(knlsrc)/tools/power/x86/x86_energy_perf_policy sudo make
sudo ./x86_energy_perf_policy performance
"rdmsr -a 0x1b0" outputs "6 6 6 6" and "0 0 0 0" previously and subsequently.
"wrmsr" should works too.

Since this is a model specific register for the Celeron J1900, could you point us to the Intel documentation you referred to, to understand what these settings are doing?

Thanks,

Signature · 1 line
Philippe.
author
#3 lore raw
Quoted 84 lines · Philippe Gerum
Quoted 73 lines · Jack Lee
Quoted 58 lines · Jack Lee

Hi, everyone,

My board is advantech MIO-5251 (J1900 version), linux kernel version is 4.1.18,

xenomai version is 3.0.3. As mentioned before, the real-time performance I got was

not good.

But I found something here:
http://rtt-lwr.readthedocs.io/en/latest/rtpc/xenomai.html.

After "i915.enable_rc6=0 i915.modset=1 noapic" was added to the kernel command

line, the real-time performance improved a lot, which means latency tests (-t0, t1, t2)

has no overruns (less than 80us) in 13+ hours, but when other real-time applications

was running, overruns occurred sometimes.

I found that "intel_powerclamp" "intel_rapl" was in the "lsmod" list. After I removed them,

real-time performance of the system is quite good now.

I found configs below exist in the original .config file, except "CONFIG_CPU_THERMAL". These

configs do not appear on the official website as far as I know. Is it necessary to disable them to

improve real-time performance?

Generic Thermal sysfs driver
CONFIG_THERMAL

Fair-share thermal governor
CONFIG_THERMAL_GOV_FAIR_SHARE

Step_wise thermal governor
CONFIG_THERMAL_GOV_STEP_WISE

User_space thermal governor
CONFIG_THERMAL_GOV_USER_SPACE

generic cpu cooling support
CONFIG_CPU_THERMAL(n)

Thermal emulation mode support
CONFIG_THERMAL_EMULATION

Intel PowerClamp idle injection driver
CONFIG_INTEL_POWERCLAMP

Quoted 9 lines

By the way, I found my two Ethernet cards and the can board have the same interrupt number.I removed the igb module.

Is it possible to assign interrupt numbers manuallly? When I started from different kernels, the number is not the same.

Good luck!

[    0.004106] ENERGY_PERF_BIAS: Set to 'normal', was 'performance'
[    0.004114] ENERGY_PERF_BIAS: View and update with

x86_energy_perf_policy(8)

Quoted 10 lines

I found the above message in the "dmesg" output.
This was solved by:
sudo modprobe msr
sudo cd $(knlsrc)/tools/power/x86/x86_energy_perf_policy sudo make
sudo ./x86_energy_perf_policy performance
"rdmsr -a 0x1b0" outputs "6 6 6 6" and "0 0 0 0" previously and subsequently.
"wrmsr" should works too.

Quoted 6 lines

Since this is a model specific register for the Celeron J1900, could you point us to the Intel documentation you referred to, to understand what these settings are doing?

Thanks,

Hi, Philippe,
I just googled a lot. This register "0x1b0" is not just for the Celeron J1900. It's in intel processors since 2010 (?, can't remember exactly). Value 0 to 15 means different level of power consumption, 15 is the most power saving mode. It's all done by the processor and we can not know the details. The below site said something about it. but "epb=" kernel command line did not work for me.
http://www.phoronix.com/scan.php?page=article&item=ubuntu_linux_epb&num=2
http://lxr.free-electrons.com/diff/tools/power/cpupower/utils/helpers/msr.c?diffval=3.9;diffvar=v
Also it's important to load "msr" module.

Perhaps I will read the Intel documentation one day. Hope that I can feedback something for this community.

Good Luck! :)