XO 1.5 frequency scaling

Richard A. Smith richard at laptop.org
Tue May 4 20:28:03 EDT 2010


On 05/04/2010 07:01 PM, Tiago Marques wrote:

> Let me see if I understand what you said. I understand how it works on
> desktop and regular laptops. You load the module for the specific power
> saving feature and either a kernel module to do the job or the userspace
> module which then allows a daemon to do the frequency scaling.
> Now the XO 1.5, AFAIK, isn't doing it or powerd is doing it(or openfw).
> I tried loading the C7 power saver module but it can't find the device.
> Is it already being taken and should I not worry with frequency scaling
> although /proc/cpuinfo always shows 1000MHz?

The module is not enabled in the kernel build and in our case appears to 
only offer saving in very limited cases.  Yes, you could cap your max 
frequency and max power draw but in general you end up using more 
power*time that way because you keep all the other components that don't 
have sort of power scaling up longer then they would have been because 
it takes longer to do the task.  If you decrease the power draw 2x but 
then extend the time 2x you have gained nothing.

Feel free to experiment though.  The latest versions of powerd have 
power logging built in and if you want a more specific measurement my 
power logging scripts should be useful.

IIRC I had to hack on the driver a bit to make it work.  The following 
is a summary email I posted from when I worked on it.

Notes:
- Ignore the comment about C5. Our CPU does not support C5.

- Ignore the comment about being scared to burn up the CPU.  We now have 
thermal throttling enabled and have tested it extensively. Unless you 
turn that off you should not be able to burn up the CPU.

======================
I spent the day/night today working on getting our C states and P states 
enabled.

The good news is that I got C4,C5 and frequency/voltage scaling (P 
states) working.

The bad news is that C5 causes memory corruption and P states don't help 
much.

Enabling C4 seems to save us about 170mW in idle.

C5 should save us a bit more but with it enabled the system won't boot. 
It gets all sorts of funky ext4 errors.  C5 turns off the L2 cache and 
the docs say you should flush before entering.  I suspect thats not 
happening.

P states currently don't seem to save us enough to be measured.  One 
reason is that our core voltage is set by default to be very close to 
the minimum.  Its at .796V and the minimum is .7V with scaling enabled 
(+ code hack) the minimum setting drops Vcore to .73V. Its supposed to 
go to .7 but the volt meter says otherwise.  60mV diff doesn't offer a 
whole lot of savings.

The CPU frequency slides between 400Mhz and 1GHz and you would think 
that it would make a large difference but the meter says otherwise.  How 
can that be you ask?  The answer is because Linux issues a hlt when 
idle.  If you run the test under OFW then you can create up to 1.5W of 
power difference by sliding the freq from min to max [1] and holding the 
Vcore constant.  But in idle not so much.  The processor already does a 
very good job of gating the clocks.

So this brings us back to what we already knew.  The big money on power 
savings is in our special sauce idle suspend.

[1] Turns out you can overclock the processor.  Via lists the max 
multiplier at 16x FSB (100Mhz) which is 1.6Ghz even though its listed as 
a max of 1Ghz. However if you continue to put values into the multiplier 
register the power draw continues to increase.  I stopped when the 
system draw had hit 9W cause the XO on the power meter does not have a 
heat spreader and I didn't want to take the chance of burning it up.
=================

-- 
Richard A. Smith  <richard at laptop.org>
One Laptop per Child



More information about the Devel mailing list