Dr. David Kirkby wrote:
Well, there is an mdb hack (enable cpudrv_direct_pm)along with a couple of ioctl(2) calls (PM_DIRECT_PM and PM_SET_CURRENT_POWER) that could give you direct control over the frequency. I'm not convinced you really want to go there thoughI would like to 'go there'. I think it would be useful to fix the frequency at 1 GHz on my laptop, and not let it wander up to 2 GHz. I know Vista can limit the maximum CPU speed used, as I have run a very CPU intensive benchmark in one of the power saving positions and know it scores lower. Hence I assume the CPU speed was throttled back, and not allowed to increase even though the system was running the CPU flat out. If you can provide a way for the user to set the upper frequency, I personally think it would be useful.
Take a look at the setfreq program in the attached tar file. You can run it as is or use it to create your own improved version for what you want. This is totally unsupported as it is just some code I threw together a long time ago to allow me to force the processors to different frequencies.
You'll want to disable cpupm in /etc/power.conf and run /usr/sbin/pmconfig before running the setfreq program. I could modify the program to do this, but so can you.
We intend to add a supported policy to Solaris to allow you to do this kind of thing, but in the meantime I'm afraid you'll have to settle for this.
One warning ... once the program enables cpupm_direct_pm (take a look at the source and look for "echo cpudrv_direct_pm/W1") , the automatic power management of CPUs will no longer function as documented (which of course is what you want). If you ever want to get back to the documented behavior, then you will have to reboot or use mdb to disable cpupm_direct_pm ("echo cpudrv_direct_pm/W0") and you will have to enable cpupm in /etc/power.conf.
One last note ... if I remember correctly, in order to change the frequency of dual core chips, you have to change them both. In other words, run setfreq twice. The first time, set the frequency of CPU instance 0. The second, set the frequency of CPU instance 1 and both instance 0 and 1 will change frequency at this point.
as I think you are misreadingthe messages from dmesg.The messages you've listed are printed to the systemlog whenever the maximum power level changes ...I can't speak for the original poster, but I did not interpret them correctly. I can't critisise the words your driver uses, but if you can think of a way of rewording it, to make it clearer what the message exactly means, I guess it would be a good thing. Whilst the wording seems accurate, I think a lot of people will interpret it incorrectly.
Actually, I'm sure you could criticize the wording, but there is no need, as I'm planning on removing the message entirely and am likely replacing it with a kstat. The system error log really isn't the right place for this information and I honestly didn't give it much thought (obviously) when I added it to the code.
PS, I'm not sure why there are now two threads with this title going on - it is quite confusing. I notice that with some of the other threads too - they get split up.
I'm only aware of one thread. Mark
freq.tar.gz
Description: GNU Zip compressed data
_______________________________________________ opensolaris-discuss mailing list [email protected]
