jd:/dev/blog

Our hopes and expectations, black holes and revelations.

Aller au contenu | Aller au menu | Aller à la recherche

mercredi, août 13 2008

Save power, aka easy CPU frequency scaling

Recently I came with the idea that my big computer is just useless. I know I was not using its entire CPU power, so I decided to take a look at CPU frequency scaling.

Last time I tried, it was a PITA, required something like a daemon, and just did not work. With recent hardware and/or kernels, it's just easy as Debian.

etch

  • Look at /proc/cpuinfo to determine your CPU and the cpufreq module. If it's a Pentium, you can try p4-clockmod, powernow-k7 for AMD, or acpi-cpufreq for both. Well, if none loads, let it go, it won't work unless you get newer hardware or maybe newer kernel.
  • Add this module in /etc/modules to get it loaded at boot time.
  • Run apt-get install cpufrequtils
  • Edit /etc/default/cpufrequtils to enable it at boot time, and specify the governor if you want. I usually use ondemande, which is just fine.
  • Run /etc/init.d/cpufrequtils start
  • Play with cpufreq-info and cpufreq-set as you wish.

lenny

  • Run apt-get install cpufrequtils
  • Edit /etc/default/cpufrequtils to enable it at boot time, and specify the governor if you want. I usually use ondemande, which is just fine.
  • Run /etc/init.d/loadcpufreq start
  • Run /etc/init.d/cpufrequtils start
  • Play with cpufreq-info and cpufreq-set as you wish.

On my box, the 3 GHz CPUs (Core 2 Duo) are running at 2 GHz (the lower value) at 99.13% of the time. That's almost a bit less power wasted.

jeudi, juillet 31 2008

ATL1E support in 2.6.26-1

Ben Armstrong opened an ITP for the ATL1E NIC driver, which is found on some Asus EeePC laptops. So, as suggested by Maximilian Attems, I provided a clean patch for this driver, made from a cherry-pick from the linux-netdev 2.6.27 tree. It has been commited into the 2.6.26-1 Debian kernel, which will be furnished with Lenny.

What's fun, is that in the mean time, I got a new computer at work. Wait, it's not fun yet. Because what I did not know is that it's made of an Asus P5Q motherboard which runs a NIC needing the ATL1E driver (and now you see it's fun).

So I've just upgraded to 2.6.26-1-amd64 and I'm glad that my own work is useful to me (and will be probably be to others as well). :-)

vendredi, septembre 14 2007

Waiting so long

Oh my god, I'd be happy the day La Poste (french post offices) will call a kernel hacker to...

Wait for it...

Explain them what is a queue scheduler.