On Mon, Jan 13, 2014 at 12:20:27AM -0800, Philip Guenther wrote:
> On Sun, Jan 12, 2014 at 11:16 PM, John Rogers <[email protected]> wrote:
> > I'm not an expert on this but my theory is that the problem is not
> > that the CPU is running too fast but rather that it is running in a
> > high power state, presumably C0. Do you know if apmd adjusts the
> > c-state?
> 
> C0 is the only state where the CPU does real work; the higher C-states
> only make sense for when the CPU is idle, so your question presumably
> is "does the CPU get put into a higher C-state when idle".  Well,
> 5.4-current uses the MWAIT instruction for the idle loop when
> available, which uses the C1 state by default.
> 
> Have people found 5.4-current to use less power/run cooler since the
> MWAIT change in early October?
> 
> The MWAIT instruction can put the CPU into a higher C-state if the CPU
> supports it, but we don't use or expose that yet.  I have no interest
> in adding Yet Another Knob, but maybe making the decision based off
> the existing hw.setperf sysctl would be reasonable and sufficient,
> overloading the range to not just change the speed but also use a
> deeper C-state hw.setperf is smaller, ala
>    C3 <- 0-33
>    C2 <- 34-65
>    C1 <- 66-100
> 
> Or maybe that's a bad idea.

The problem is C-states slows down additional components, not just the
CPU speed. Some users only want to change the CPU speed and others want
to increase the battery life of their laptops even if the laptop runs
slightly slower. Inevitably, you will need add also a new sysctl entry
to enable/disable the c-states, something like "hw.setperf.c-states".

-- 
Juan Francisco Cantero Hurtado http://juanfra.info

Reply via email to