a question about p4_clockmod module on Xeon quad core processors
Hi list,
I have tried the p4-clockmod module in Linux kernel 2.6.29 on Xeon 5355 quad-core CPUs with no luck. It seems current p4-clockmod driver still cannot support Intel Quad core processors, right?
I know I can also use acpi-cpufreq. It can only scale down the frequence from 2.67GHz to 2GHz. But I need some lower frequencies for some experiments.
Thanks!
Xiaoning
Quoted 5 lines · On Tue, 27 Jan 2009 12:17:25 -0800 (PST) Xiaoning Ding <[email protected]> wrote:
Hi list,
I have tried the p4-clockmod module in Linux kernel 2.6.29 on Xeon 5355 quad-core CPUs with no luck. It seems current p4-clockmod driver still cannot support Intel Quad core processors, right?
you know that using clockmod will actually cost you energy rather than saving it right?
Signature · 3 lines
Arjan van de Ven Intel Open Source Technology Centre For development, discussion and tips for power savings, visit http://www.lesswatts.org
I am not trying to save energy. I want to do some experiments that requires lower CPU speed. But the experiments are not energy related.
Xiaoning
Quoted 26 lines · Arjan van de Ven
From: Arjan van de Ven <[email protected]>
Subject: Re: a question aboutp4_clockmodmodule on Xeon quad core processors
To: [email protected]
Cc: [email protected]
Date: Tuesday, January 27, 2009, 9:23 PMQuoted 3 lines · On Tue, 27 Jan 2009 12:17:25 -0800 (PST) Xiaoning Ding <[email protected]> wrote:
Hi list,
I have tried the p4-clockmod module in Linux kernel
2.6.29 on Xeon
Quoted 1 line
5355 quad-core CPUs with no luck. It seems current
p4-clockmod driver
Quoted 1 line
still cannot support Intel Quad core processors,
right?
you know that using clockmod will actually cost you energy rather than
saving it right?Signature · 3 lines
Arjan van de Ven Intel Open Source Technology Centre For development, discussion and tips for power savings, visit http://www.lesswatts.org
Quoted 5 lines · Xiaoning Ding
Hi list,
I have tried the p4-clockmod module in Linux kernel 2.6.29 on Xeon 5355 quad-core CPUs with no luck. It seems current p4-clockmod driver still cannot support Intel Quad core processors, right?
I know I can also use acpi-cpufreq. It can only scale down the frequence from 2.67GHz to 2GHz. But I need some lower frequencies for some experiments.
p4-clockmod doesn't change the processor frequency.
Because of common misconceptions like this, the user interface has been removed.
In 2.6.29, the clock modulation code is called directly from ACPI whenever thermal events indicate that throttling is necessary.
Dave
Signature · 1 line
http://www.codemonkey.org.uk
Thanks for the correction.
My experiments need to reduce CPU speed. However, I can only reduce the speed by about 30% (from 2.67GHz to 2GHz) with ACPI. That is not enough for the experiments.
p4-clockmod has not been removed from 2.6.29. It is under the same directory as acpi-cpufreq (arch/x86/kernel/cpu/cpufreq). So I thought it was an alternative approach. But I could not get it loaded.
Xiaoning
Quoted 31 lines · Dave Jones
From: Dave Jones <[email protected]>
Subject: Re: a question aboutp4_clockmodmodule on Xeon quad core processors
To: "Xiaoning Ding" <[email protected]>
Cc: [email protected]
Date: Wednesday, January 28, 2009, 9:02 PMQuoted 3 lines · Xiaoning Ding
Hi list,
I have tried the p4-clockmod module in Linux kernel
2.6.29 on Xeon 5355 quad-core CPUs with no luck. It seems current p4-clockmod driver still cannot support Intel Quad core processors, right?
Quoted 2 lines
I know I can also use acpi-cpufreq. It can only scale
down the frequence from 2.67GHz to 2GHz. But I need some lower frequencies for some experiments.
p4-clockmod doesn't change the processor frequency. Because of common misconceptions like this, the user interface has been removed.
In 2.6.29, the clock modulation code is called directly from ACPI
whenever thermal events indicate that throttling is necessary.Dave
Signature · 1 line
http://www.codemonkey.org.uk
[please don't top-post]
Quoted 13 lines · Xiaoning Ding
Quoted 13 lines
Quoted 1 line
I have tried the p4-clockmod module in Linux kernel
2.6.29 on Xeon 5355 quad-core CPUs with no luck. It seems current p4-clockmod driver still cannot support Intel Quad core processors, right?
Quoted 2 lines
I know I can also use acpi-cpufreq. It can only scale
down the frequence from 2.67GHz to 2GHz. But I need some lower frequencies for some experiments.
p4-clockmod doesn't change the processor frequency. Because of common misconceptions like this, the user interface has been removed.
Quoted 7 lines
Quoted 5 lines
In 2.6.29, the clock modulation code is called directly from ACPI
whenever thermal events indicate that throttling is necessary.Thanks for the correction.
My experiments need to reduce CPU speed. However, I can only reduce the speed by about 30% (from 2.67GHz to 2GHz) with ACPI. That is not enough for the experiments.
The ACPI P-states are nearly always correct, so you won't be able to go below 2GHz on this system.
Quoted 1 line
p4-clockmod has not been removed from 2.6.29. It is under the same directory as acpi-cpufreq (
arch/x86/kernel/cpu/cpufreq). So I thought it was an alternative approach. But I could not get it loaded.
The driver is present, the _user interface_ has been removed.
Dave
Signature · 1 line
http://www.codemonkey.org.uk
Quoted 37 lines · Dave Jones
From: Dave Jones <[email protected]>
Subject: Re: a question aboutp4_clockmodmodule on Xeon quad core processors
To: "Xiaoning Ding" <[email protected]>
Cc: [email protected]
Date: Thursday, January 29, 2009, 2:45 AM
[please don't top-post]Quoted 1 line · Xiaoning Ding
Quoted 1 line
Quoted 1 line
I have tried the p4-clockmod module in
Linux kernel
Quoted 1 line
Quoted 1 line
2.6.29 on Xeon 5355 quad-core CPUs with no luck.
It seems
Quoted 1 line
Quoted 1 line
current p4-clockmod driver still cannot support
Intel Quad
Quoted 3 lines
Quoted 3 lines
core processors, right?
Quoted 2 lines
I know I can also use acpi-cpufreq. It can
only scale
Quoted 1 line
Quoted 1 line
down the frequence from 2.67GHz to 2GHz. But I
need some
Quoted 3 lines
Quoted 3 lines
lower frequencies for some experiments.
p4-clockmod doesn't change the processor
frequency.
Quoted 1 line
Quoted 1 line
Because of common misconceptions like this, the
user
Quoted 3 lines
Quoted 3 lines
interface has been removed.
In 2.6.29, the clock modulation code is called
directly
Quoted 2 lines
Quoted 2 lines
from ACPI
whenever thermal events indicate that throttlingis
Quoted 2 lines
Quoted 2 lines
necessary.
Quoted 8 lines
Quoted 2 lines
Thanks for the correction.
My experiments need to reduce CPU speed. However, Ican only reduce the speed by about 30% (from 2.67GHz to 2GHz) with ACPI. That is not enough for the experiments.
The ACPI P-states are nearly always correct, so you won't be
able to go below 2GHz on this system.
That's true for changing P-States with ACPI. But I can still get slower speed with clock modulation, right?
Quoted 7 lines
Quoted 1 line
p4-clockmod has not been removed from 2.6.29. It is
under the same directory as acpi-cpufreq (
arch/x86/kernel/cpu/cpufreq). So I thought it was an alternative approach. But I could not get it loaded.The driver is present, the
_userinterface_has been removed.
The module cannot loaded on Xeon 5355. If I can load it, I hope I can find a method to use it.
Quoted 11 lines
Dave
Signature · 8 lines
http://www.codemonkey.org.uk -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Quoted 10 lines · Xiaoning Ding
Quoted 8 lines
Quoted 2 lines
Thanks for the correction.
My experiments need to reduce CPU speed. However, Ican only reduce the speed by about 30% (from 2.67GHz to 2GHz) with ACPI. That is not enough for the experiments.
The ACPI P-states are nearly always correct, so you won't be
able to go below 2GHz on this system.That's true for changing P-States with ACPI. But I can still get slower speed with clock modulation, right?
Clock modulation will lower the performance, but the clock speed will remain constant.
Dave
Signature · 1 line
http://www.codemonkey.org.uk
Dave Jones wrote:
[]
Quoted 1 line
p4-clockmod doesn't change the processor frequency.
Hmm.. But what it really does, then?
I used it one one machine which had a flaky CPU cooler, to reduce power consumption during hot summer days. It worked, and reportedly the frequency varied from 200MHz to the max of 2.4GHz (it's a P4 Xeon). Now I wonder why it helped to reduce the temperature and why the system reported different frequencies...
Thanks!
Quoted 1 line
Because of common misconceptions like this, the user interface has been removed.
/mjt
Quoted 3 lines · Michael Tokarev
Quoted 1 line
p4-clockmod doesn't change the processor frequency.
Hmm.. But what it really does, then?
it modulates the clock so the CPU isn't always availble for doing work.
Quoted 2 lines
I used it one one machine which had a flaky CPU cooler, to reduce power consumption during hot summer days.
it reduces the amount of heat generated, by making jobs take longer to finish. This comes at a cost of the CPU not being able to enter lower C states for longer periods of time, so you may end up actually using *more* power.
Quoted 2 lines
It worked, and reportedly the frequency varied from 200MHz to the max of 2.4GHz (it's a P4 Xeon).
The CPU was always at 2.4GHz, even if it said '200MHz'. It was just only doing work once in every 12 clocks.
Dave
Signature · 1 line
http://www.codemonkey.org.uk
Quoted 26 lines · Dave Jones
From: Dave Jones <[email protected]>
Subject: Re: a question aboutp4_clockmodmodule on Xeon quad core processors
To: "Michael Tokarev" <[email protected]>
Cc: "Xiaoning Ding" <[email protected]>, [email protected]
Date: Thursday, January 29, 2009, 5:24 PMQuoted 1 line · Michael Tokarev
Quoted 1 line
p4-clockmod doesn't change the processor
frequency.
Quoted 2 lines
Hmm.. But what it really does, then?
it modulates the clock so the CPU isn't always availble for doing work.
Quoted 1 line
I used it one one machine which had a flaky CPU
cooler,
Quoted 1 line
to reduce power consumption during hot summer days.
it reduces the amount of heat generated, by making jobs take longer to finish. This comes at a cost of the CPU not being able to enter lower C states for longer periods of time,
so you may end up actually using *more* power.
Quoted 18 lines
Quoted 2 lines
It worked, and reportedly the frequency varied from 200MHz to the max of 2.4GHz (it's a P4 Xeon).
The CPU was always at 2.4GHz, even if it said '200MHz'.
It was just only doing work once in every 12 clocks.Dave
Signature · 8 lines
http://www.codemonkey.org.uk -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Thanks for the explanation. So the conclusion is that ACPI-cpufreq can reduce power consumption by lowering cpu frequencies, and p4-clockmod can hardly save power because CPU frequences are not changed.
My experiments do not consider power consumption. It only requires to slow down the speed of some cores by either reducing frequencies or clock modulation. In such case, p4-clockmod is still a good choice for me. Can anyone give me some hints on whether p4-clockmod works on Xeon quad-core processors, and how to get it work?
Thanks!
Xiaoning
Quoted 4 lines · Xiaoning Ding
Thanks for the explanation. So the conclusion is that ACPI-cpufreq can reduce power consumption by lowering cpu frequencies, and p4-clockmod can hardly save power because CPU frequences are not changed.
yes. and also that it inhibits entering deeper C states for longer periods.
Quoted 5 lines
My experiments do not consider power consumption. It only requires to slow down the speed of some cores by either reducing frequencies or clock modulation. In such case, p4-clockmod is still a good choice for me. Can anyone give me some hints on whether p4-clockmod works on Xeon quad-core processors, and how to get it work?
I'm not sure if the registers are still there on quad cores, but I would be surprised if they weren't. Hitting them directly with msr tools is probably the best way, or writing a small program that manipulates /dev/cpu/*/msr directly.
Dave
Signature · 1 line
http://www.codemonkey.org.uk
Quoted 5 lines · Xiaoning Ding
Hi list,
I have tried the p4-clockmod module in Linux kernel 2.6.29 on Xeon 5355 quad-core CPUs with no luck. It seems current p4-clockmod driver still cannot support Intel Quad core processors, right?
I know I can also use acpi-cpufreq. It can only scale down the frequence from 2.67GHz to 2GHz. But I need some lower frequencies for some experiments.
Clock modulation is quite simple; in the past I've done it from userspace with /dev/cpu/*/msr or written my own module to do it. I don't know if I've ever tried it on quad-cores, but it worked on dual-core Woodcrest. (Note: I was not trying to save energy.)
Wes Felter - [email protected]
I installed msr-tools, but could not find detailed information on how to change cpu speed with the tools. Can you point me to detailed documentations? Or, can you share your code?
Thanks!
Xiaoning
Quoted 23 lines · Wes Felter
From: Wes Felter <[email protected]>
Subject: Re: a question aboutp4_clockmodmodule on Xeon quad core processors
To: [email protected]
Cc: [email protected]
Date: Wednesday, January 28, 2009, 9:05 PMQuoted 3 lines · Xiaoning Ding
Hi list,
I have tried the p4-clockmod module in Linux kernel
2.6.29 on Xeon 5355 quad-core CPUs with no luck. It seems current p4-clockmod driver still cannot support Intel Quad core processors, right?
Quoted 1 line
I know I can also use acpi-cpufreq. It can only scale
down the frequence from 2.67GHz to 2GHz. But I need some lower frequencies for some experiments.
Clock modulation is quite simple; in the past I've done it from userspace with
/dev/cpu/*/msror written my own module to do it. I don't know if I've ever tried it on quad-cores, but it worked on dual-core Woodcrest. (Note:
I was not trying to save energy.)Wes Felter - [email protected]
This will give you an effective speed of 250 MHz:
for cpu in 0 1 2 3; do
cpufreq-set -c $cpu -g userspace
cpufreq-set -c $cpu -u 2.0GHz
wrmsr -p $cpu 0x19A 0x12
done
0x19A is the IA32_CLOCK_MODULATION MSR and 0x12 is calculated from the Intel 64 and IA-32 Architectures Software Developer’s Manual section 13.5.3. Legal MSR values are 0x12 (12.5% duty cycle) - 0x1E (87.5%) or 0x00 for 100%. I tested it on a quad-core Xeon and it works.
This is somewhat reckless, so use it with caution.
Wes Felter - [email protected]
It works on my machine. Thanks for the help!
Xiaoning
Quoted 22 lines · Wes Felter
From: Wes Felter <[email protected]>
Subject: Re: a question aboutp4_clockmodmodule on Xeon quad core processors
To: [email protected]
Cc: [email protected]
Date: Thursday, January 29, 2009, 8:47 PM
This will give you an effective speed of 250 MHz:for cpu in 0 1 2 3; do
cpufreq-set -c $cpu -g userspace
cpufreq-set -c $cpu -u 2.0GHz
wrmsr -p $cpu0x19A0x12
done
0x19Ais theIA32_CLOCK_MODULATIONMSR and0x12is calculated from the Intel 64 and IA-32 Architectures Software Developer’s Manual section 13.5.3. Legal MSR values are0x12(12.5% duty cycle) -0x1E(87.5%) or0x00for 100%. I tested it on a quad-core Xeon and it works.This is somewhat reckless, so use it with caution.
Wes Felter - [email protected]