CPUFreq addon in HAL

Artem Kachitchkine Artem.Kachitchkin at Sun.COM
Fri Jul 14 11:28:06 PDT 2006


> Personally I think it makes sense to add. I'm unsure how this is handled
> on FreeBSD and Solaris? It looks to me as the interface is sufficiently
> abstract.

I have no idea what a CPU governor is. So if you like litmus tests, here 
you go - the interface might not be abstract enough :)

HAL's main role being to abstract, I think we need to keep naming 
functional. E.g. menu items "Web Browser" and "Email" are functional, 
"Firefox" and "Thunderbird" are not. In addition to being more clear, it 
also provides abstraction and the ability to substitute Firefox with, 
say, Opera without confusing the users. So perhaps instead of "governor" 
we could use "policy" or something like that.

I would also like the interface to be more self-descriptive, sort of 
like XML is. Instead of hard coding 1-100, have properties for min and 
max values (and maybe default value, too). How does my OS-neutral 
desktop application know the name of the (lets say) policy to set with 
SetCPUFreqPolicy()? Maybe the interface should list available policy 
names as a strlist property (which could go into a drop-down box in a GUI).

And I do support the idea of throwing descriptive exceptions on error. 
0/1 is not really helpful in diagnosis.

-Artem.



More information about the hal mailing list