Xen cpufreq control

Questions about other topics - please check if your question fits better in another category before posting here
Forum rules
Before you post please read this

Xen cpufreq control

Postby gordon.cooke on Sat Apr 06, 2013 11:14 pm

I have not been able to get cpu power management under Xen to work yet. Before Xen was installed cpufreq worked fine in LM 13.

Found some info about the topic at: http://wiki.xen.org/wiki/Xen_power_management
And details on teh xenpm at: http://wiki.xen.org/wiki/Xenpm_command

I tried:
Code: Select all
xenpm get-cpufreq-states

and got nothing back. Tried will a cpu number at end and still got nothing back
Then tried:
Code: Select all
xenpm get-cpufreq-para

and it returned the following
Code: Select all
[CPU0] failed to get cpufreq parameter
[CPU1] failed to get cpufreq parameter
[CPU2] failed to get cpufreq parameter
[CPU3] failed to get cpufreq parameter
[CPU4] failed to get cpufreq parameter
[CPU5] failed to get cpufreq parameter
[CPU6] failed to get cpufreq parameter
[CPU7] failed to get cpufreq parameter

Next
Code: Select all
xenpm get-cpuidle-states

returnes info on max c-state (C7) and info on each cpu
Last:
Code: Select all
xenpm set-scaling-governor ondemand

returns a failure
Code: Select all
[CPU0] failed to set governor name
[CPU1] failed to set governor name
[CPU2] failed to set governor name
[CPU3] failed to set governor name
[CPU4] failed to set governor name
[CPU5] failed to set governor name
[CPU6] failed to set governor name
[CPU7] failed to set governor name


Any ideas? It doesnt apear that the governor or anything is set in grub, so default should be xen control with userspace control. But I cant change.
------------------------------------------------------------------------
Mint 13 64bit Cinnamon
Asus U56E Laptop, Core i5-2410M, Intel graphics, 6GB RAM
Mint 9 64bit
Averatec 2573 Laptop, AMD Turion 64x2, ATI Graphics, Atheros wireless, 3GB RAM
User avatar
gordon.cooke
Level 3
Level 3
 
Posts: 151
Joined: Tue Dec 01, 2009 9:48 pm
Location: New York

Linux Mint is funded by ads and donations.
 

Re: Xen cpufreq control

Postby powerhouse on Tue Apr 09, 2013 3:32 am

It might depend on the CPU you got (Intel or AMD). For reference, I get the following output on my i7 3930K based system:

Code: Select all
#     xenpm get-cpufreq-states 0
cpu id               : 0
total P-states       : 12
usable P-states      : 12
current frequency    : 1200 MHz
P0                   : freq       [3201 MHz]
                       transition [00000000000000001276]
                       residency  [00000000000000048333 ms]
P1                   : freq       [3200 MHz]
                       transition [00000000000000000047]
                       residency  [00000000000000000456 ms]
P2                   : freq       [3000 MHz]
                       transition [00000000000000000056]
                       residency  [00000000000000000560 ms]
P3                   : freq       [2800 MHz]
                       transition [00000000000000000036]
                       residency  [00000000000000000258 ms]
P4                   : freq       [2600 MHz]
                       transition [00000000000000000046]
                       residency  [00000000000000000278 ms]
P5                   : freq       [2400 MHz]
                       transition [00000000000000000042]
                       residency  [00000000000000000268 ms]
P6                   : freq       [2200 MHz]
                       transition [00000000000000000030]
                       residency  [00000000000000000168 ms]
P7                   : freq       [2000 MHz]
                       transition [00000000000000000045]
                       residency  [00000000000000000295 ms]
P8                   : freq       [1800 MHz]
                       transition [00000000000000000037]
                       residency  [00000000000000000311 ms]
P9                   : freq       [1600 MHz]
                       transition [00000000000000000050]
                       residency  [00000000000000000305 ms]
P10                   : freq       [1400 MHz]
                       transition [00000000000000000045]
                       residency  [00000000000000000277 ms]
*P11                  : freq       [1200 MHz]
                       transition [00000000000000001128]
                       residency  [00000000000000042023 ms]


The regular power states seem to work, but I'm unsure about the turbo mode.

Right now my system is idle, with only Firefox and a terminal window open, and it consumes ~116W (I got a watt meter).

Your system should definitely display the power states.

My idle states are as follows:
Code: Select all
# xenpm get-cpuidle-states 0
Max C-state: C7

cpu id               : 0
total C-states       : 2
idle time(ms)        : 3097186
C0                   : transition [00000000000000000001]
                       residency  [00000000000000106662 ms]
C1                   : transition [00000000000000000001]
                       residency  [00000000000003097186 ms]
pc3                  : [00000000000000000000 ms]
pc6                  : [00000000000000000000 ms]
pc7                  : [00000000000000000000 ms]
cc3                  : [00000000000000000000 ms]
cc6                  : [00000000000000000000 ms]


The above looks like what's discussed here: http://xen.1045712.n5.nabble.com/Workings-effectiveness-of-the-xen-acpi-processor-driver-td5664799.html

Do you get an error message during boot about cpufreq? Just had a look at my /var/log/boot.log file:
Code: Select all
 * Loading cpufreq kernel modules...       
[fail]
 * Stopping save kernel messages[ OK ]
 * disabled, governor not available...         * CPUFreq Utilities: Setting ondemand CPUFreq governor...       
[ OK ]


However, the CPU frequency governor seems to work:
Code: Select all
# xenpm get-cpufreq-para 0
cpu id               : 0
affected_cpus        : 0
cpuinfo frequency    : max [3201000] min [1200000] cur [1200000]
scaling_driver       : acpi-cpufreq
scaling_avail_gov    : userspace performance powersave ondemand
current_governor     : ondemand
  ondemand specific  :
    sampling_rate    : max [10000000] min [10000] cur [20000]
    up_threshold     : 80
scaling_avail_freq   : 3201000 3200000 3000000 2800000 2600000 2400000 2200000 2000000 1800000 1600000 1400000 *1200000
scaling frequency    : max [3201000] min [1200000] cur [1200000]
turbo mode           : enabled


Can you provide some more information on the CPU, motherboard, BIOS, kernel, hypervisor revisions?

I would also make sure you run the latest kernel and hypervisor from repo: 3.5.0-26-generic, and Xen 4.1.3. In my system the upgrade to the 3.5.0-26 kernel solved a minor issue that delayed the boot process. Might be worth trying.
Asus Sabertooth X79, i7 3930K CPU, 8x4GB Kingston DDR3 RAM, Noctua NH-D14 CPU cooler, Sapphire 7770 GPU, PNY Quadro 2000 GPU, Asus Xonar Essence STX, Sandisk Extreme 120GB SSD + various HD, Corsair 500R case, SeaSonic 660W Gold X PS
powerhouse
Level 5
Level 5
 
Posts: 639
Joined: Thu May 03, 2012 3:54 am

Re: Xen cpufreq control

Postby gordon.cooke on Sat Apr 13, 2013 9:18 pm

CPU is AMD FX8320, 8 core 3.5 GHz
MB is MSI 970A-G43
Im using whatever stock kernel came through the repo. Will have to wait till Im home to check specifics and pull logs. But I know I see errors I believe are related to not finding freq control (repeated 8 times) during bootup right before GDM login screen comes up.
------------------------------------------------------------------------
Mint 13 64bit Cinnamon
Asus U56E Laptop, Core i5-2410M, Intel graphics, 6GB RAM
Mint 9 64bit
Averatec 2573 Laptop, AMD Turion 64x2, ATI Graphics, Atheros wireless, 3GB RAM
User avatar
gordon.cooke
Level 3
Level 3
 
Posts: 151
Joined: Tue Dec 01, 2009 9:48 pm
Location: New York

Re: Xen cpufreq control

Postby powerhouse on Sun Apr 14, 2013 5:18 pm

gordon.cooke wrote:CPU is AMD FX8320, 8 core 3.5 GHz
MB is MSI 970A-G43
Im using whatever stock kernel came through the repo. Will have to wait till Im home to check specifics and pull logs. But I know I see errors I believe are related to not finding freq control (repeated 8 times) during bootup right before GDM login screen comes up.


If I remember correctly there is a problem with AMD CPUs and power states. See here for another user report: http://www.overclock.net/t/1205216/guide-create-a-gaming-virtual-machine/560#post_19602860 - "...i recently switched from arch + xen to opensuse + kvm because of xen poor power management options on my amd machine (suspend doesnt work, cool'n quiet crash my system, etc)..."

In the same thread, the same user nbhusain also describes how to work around the kvm issues (for example host crash when restarting domU, or performance degradation). So if cpufreq is important to you, you may want to try kvm instead of xen.

EDIT: Check the Xen release notes - perhaps 4.1.4 or 4.2.1 solve the issue? I haven't checked, though. I assume you are currently running Xen 4.1.3?
Asus Sabertooth X79, i7 3930K CPU, 8x4GB Kingston DDR3 RAM, Noctua NH-D14 CPU cooler, Sapphire 7770 GPU, PNY Quadro 2000 GPU, Asus Xonar Essence STX, Sandisk Extreme 120GB SSD + various HD, Corsair 500R case, SeaSonic 660W Gold X PS
powerhouse
Level 5
Level 5
 
Posts: 639
Joined: Thu May 03, 2012 3:54 am

Re: Xen cpufreq control

Postby Queeq on Mon Oct 07, 2013 4:03 am

Got the same problem on my laptop. Both "cpufreq=xen" and "cpufreq=dom0-kernel" don't work. There's also a message in boot.log that loading cpufreq kernel modules fails. The only difference is that I run custom 3.10.14 kernel. Xen version 4.1.3.
Have anybody figured this out?
User avatar
Queeq
Level 1
Level 1
 
Posts: 5
Joined: Sun Sep 18, 2011 10:24 am
Location: Kiev, Ukraine


Return to Other topics

Who is online

Users browsing this forum: No registered users and 8 guests