Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 03 Jul 2005 01:03:08 -0000
From:      Nate Lawson <nate@root.org>
To:        Colin Percival <cperciva@freebsd.org>
Cc:        acpi@freebsd.org, current@freebsd.org
Subject:   Re: New cpufreq framework and drivers
Message-ID:  <42013223.4080704@root.org>
In-Reply-To: <42012739.9080501@freebsd.org>
References:  <41FFB53B.3020907@root.org> <42012739.9080501@freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
Colin Percival wrote:
> Nate Lawson wrote:
> 
>> Hardware drivers are of two types, absolute
>> and relative.  SpeedStep, Powernow, etc. are absolute drivers in that 
>> they set the cpu's base frequency.  ACPI throttling, Longrun, etc. are 
>> relative drivers that reduce the processor's clock to a fraction of 
>> its current base (i.e., they have an additive effect.)
> 
> 
> If my first glance at the patch is correct, this would have my laptop (a 
> 1.4GHz
> Pentium M) reporting the availability of the frequencies 600MHz, 800MHz, 
> etc.
> from enhanced speedstep, along with the frequencies 300MHz, 400MHz, 
> 500MHz, and
> 700MHz obtained via 50% clock throttling.

That is correct.  The code to support relative drivers was removed 
before posting to give the basic framework more testing before I commit 
it shortly.  The relative support will go in soon after that code is 
committed.

There are a lot of nuances that you'll see when I post the relative 
states patch.  For instance, if a state has the same frequency of 
another state, the one with the lower power consumption is preferred.

> While this in itself is entirely valid, a clock speed of 700MHz obtained by
> running the processor at 1400MHz with a 50% "duty cycle" would draw more 
> power
> than a clock speed of 800MHz obtained by running the processor at 800MHz 
> with
> a lower voltage; is there any mechanism to inform userland daemons of such
> oddities?  I would hate to see a daemon lowering the clock speed from 
> 800MHz
> to 700MHz in an attempt to save power...

If you look at the kernel interface (sys/sys/cpu.h, struct cf_setting), 
you'll see that frequency, power, latency, and other values are 
available.  The user sysctl interface exports frequency/power values as 
follows:

dev.cpu.0.freq=733
dev.cpu.0.freq_levels=1000/18200 733/15100

That is Mhz and mW, respectively.  With synthetic states (ones derived 
from a base absolute frequency and a modifying relative frequency), the 
cpufreq framework builds a power estimate.  For example, a level 
comprised of 1400 Mhz at 20000 mW and a 50% relative setting would have 
an exported power of 10000 mW since relative drivers give a linear 
reduction in power consumption.  Your absolute setting of 800 Mhz would 
likely have a lower power level and so any daemon should take that into 
consideration.

-- 
Nate
_______________________________________________
freebsd-current@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-current
To unsubscribe, send any mail to "freebsd-current-unsubscribe@freebsd.org"




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?42013223.4080704>