Gentoo Archives: gentoo-user

From: Alan McKinnon <alan.mckinnon@×××××.com>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] Power management updates?
Date: Mon, 22 Jun 2009 20:46:52
Message-Id: 200906222244.34250.alan.mckinnon@gmail.com
In Reply to: [gentoo-user] Power management updates? by Mike Mazur
1 On Monday 22 June 2009 15:56:47 Mike Mazur wrote:
2 > Hello,
3 >
4 > I noticed some issues with the power management setup I had when I
5 > upgraded kernels over the last few months. This past weekend I decided
6 > to crack down on this to see whether they could be fixed. I visited
7 > the Gentoo Power Management Guide[1] again and re-traced the setup to
8 > verify my system's behavior.
9
10 I tossed that entire guide in the bin where it belongs a long time ago.
11 Waaaaaay too complex, and seems to rely on faulty assumptions.
12
13 Dump cpufreqd. Use just the ondemand governor instead and get rid of the rest.
14 It's better suited to how modern chips work anyway. You safe nothing and spend
15 a great deal trying to fiddle cpu frequencies, and it's an expensive
16 operation. Her'e what you *really* want the cpu to do:
17
18 Wake up periodically, go to state C0 *once*. Do work, do it quickly at full
19 speed. Go back to sleep for as long as the cpu can. Remember, the cpu will
20 still take the same number of clock cycles to complete a task, irrespective of
21 what the frequency might be. The cpu is most efficient when running at it's
22 design frequency, so let it do that and put it quickly into the lowest state
23 you can get it into quickly. Then sleep.
24
25 [snip]
26
27 > The second issue is with cpufreqd. When the power is unplugged, the
28 > CPU scaling kicks in as expected, and the processors are cut to half
29 > power (running at ~1GHz instead of their full capacity of ~2GHz). When
30 > the AC adapter is plugged back in, the CPUs continue to operate at
31 > only ~1GHz instead of being bumped back up to ~2GHz and I see messages
32 > like this in my syslog:
33
34 That sounds like the conservative governor, the worst one of the lot. It
35 forces the cpu to rapidly change state, and do it often. Changing C state is
36 expensive, do it as seldom as you can. Just use ondemand all the time.
37
38 > The third issue seems to be with power management of my wireless card.
39 > I have the iwl3945 wireless card. In older version of the kernel
40 > (2.6.25 and before, I believe) this card was managed by a daemon in
41 > userspace. After that the driver was merged into the kernel. I noticed
42 > recently that the entry in /etc/conf.d/net (as per the Power
43 > Management Guide) causes this error when the interface comes up:
44
45 iwl3945 does not (yet) support this to the best of my knowledge. It also
46 doesn't work here either.
47 --
48 alan dot mckinnon at gmail dot com

Replies

Subject Author
Re: [gentoo-user] Power management updates? Mike Mazur <mmazur@×××××.com>