[PATCH 0/3] CPU frequency scaling addon

Holger Macht hmacht at suse.de
Tue Aug 15 03:13:03 PDT 2006


On Mon 14. Aug - 17:27:56, David Zeuthen wrote:
> On Mon, 2006-08-14 at 19:54 +0200, Holger Macht wrote:
> > On Mon 14. Aug - 18:48:23, Richard Hughes wrote:
> > > On Sat, 2006-08-12 at 12:34 +0200, Holger Macht wrote:
> > > > Just save the mail. diff ignores everything except the diff.
> > > 
> > > Yes, that worked, thanks.
> > > 
> > > Apart from looking in /org/freedesktop/Hal/devices/computer:info.addons
> > > for the hald-addon-cpufreq addon name, is there a way for desktop
> > > programs to find out if HAL can manage CPU scaling?
> > > 
> > > Maybe we need a power_management.can_do_cpu_scaling key or something
> > > more suitable.
> > 
> > 
> > Maybe checking if the CPUFreq methods are listed in the
> > org.freedesktop.Hal.Device.SystemPowerManagement.method_names key is
> > enough?
> 
> When we decide to add the interface, can we just add a capability
> "cpufreq_control"? 

Ok, I will add "cpufreq_control" capability on addon startup.

Just a note: Maybe it also makes sence to add the can_hibernate or
can_suspend properties as capabilities?

> 
> That's what we normally when adding new features, there are three steps
> 
>  1. add the capability "some_feature"
> 
>  2. (optionally) export the properties as some_feature.*
> 
>  3. export the org.freedesktop.Hal.Device.SomeFeature D-Bus
>     interface with the methods
>  
> > > I also noticed the addon doesn't exit if the computer doesn't have
> > > a /sys/devices/system/cpu/cpu0/cpufreq/ directory which would probably
> > > be a good thing.
> > 
> > But if a cpufreq driver (e.g. speedstep_centrino) or a governor is loaded
> > after the addon exited but during runtime of HAL, the system suddenly gets
> > CPUFreq capabilities but it couldn't be used anymore.
> 
> That probably never happens no? Ie. we should assume that all modules
> are loaded when hald is started...

Ok, with the new patch, the addon will exit if there is no cpufreq driver
(like speedstep_centrino) loaded. Governor modules then can still be added
and removed during runtime.

Regards,
	Holger


More information about the hal mailing list