Re: [osol-discuss] frequency scalling in opensolaris

2007-12-03 Thread Dr. David Kirkby
 Dr. David Kirkby wrote:

  I 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.

 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.


Thank you. That works fine. 
 
 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.


I think the ability to set a min and a max frequency in /etc/power.conf would 
be useful. I might for example want to let mine go up to 1.667 GHz rather than 
teh normal 2.000 GHz, but let it go down to 1.000 GHz. In other words, have 
some degree of manual control, while letting the system have some automatic 
control. 

I guess for laptops there is some argument for letting non-root users control 
this. 
 
  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

Well I am not. There appears to be several in differnet forums with the same 
tiltle and the same title in the same forum too. 

1) One thread is started by in 'discuss' by ' Guest' with the title 'frequency 
scalling in opensolaris' This has 5 replies
2) Another thread by the same title is started by 'nacho ' That has 16 replies.

Likewise, the 'Indiana Review' has at least two going, with one started by 
Guest and another by uk-admin.

A thread I started 'Why is my Intel GMA 950 graphics not being reconisded 
(driver exists)' has no replies.

Another one I appear to have started, has 'Re:' in front of it (i.e.  Re: Why 
is my Intel GMA 950 graphics not being reconisded (driver exists) ) has 14 
replies. 

It seems that if one starts a thread, and CC's it to a couple of forums, then 
anyone replying in another forum will only reply to that forum. So the thread 
can split and have the same title but different posters on different forums. 

Another one I can see multiple theads from is ' Middle management at Sun 
destroys OpenDS is
OpenSolaris next?'
 
 
This message posted from opensolaris.org
___
opensolaris-discuss mailing list
opensolaris-discuss@opensolaris.org


Re: [osol-discuss] frequency scalling in opensolaris

2007-12-03 Thread Alan Coopersmith
Dr. David Kirkby wrote:
 Well I am not. There appears to be several in differnet forums with the same 
 tiltle and the same title in the same forum too. 

The gateways between the web forum and the mailing lists break
threads when people who use the web forum reply to the same thread
as people who are participating via e-mail.

-- 
-Alan Coopersmith-   [EMAIL PROTECTED]
 Sun Microsystems, Inc. - X Window System Engineering

___
opensolaris-discuss mailing list
opensolaris-discuss@opensolaris.org


Re: [osol-discuss] frequency scalling in opensolaris

2007-12-03 Thread Casper . Dik


I think the ability to set a min and a max frequency in /etc/power.conf would 
be useful. I might f
or example want to let mine go up to 1.667 GHz rather than teh normal 2.000 
GHz, but let it go down
 to 1.000 GHz. In other words, have some degree of manual control, while 
letting the system have so
me automatic control. 

I guess for laptops there is some argument for letting non-root users control 
this. 


Something like a power profile is, I think,what we really want:


Windows defines several and they seem to fit what you are doing.

E.g., you could run your system as follows:

- always low power
- low power if on battery, unrestricted if not

- always full power
- etc.


Casper

___
opensolaris-discuss mailing list
opensolaris-discuss@opensolaris.org


Re: [osol-discuss] frequency scalling in opensolaris

2007-12-03 Thread Dr. David Kirkby
 
 
 I think the ability to set a min and a max frequency
 in /etc/power.conf would be useful. I might f
 or example want to let mine go up to 1.667 GHz rather
 than teh normal 2.000 GHz, but let it go down
 to 1.000 GHz. In other words, have some degree of
  manual control, while letting the system have so
 e automatic control. 
 
 I guess for laptops there is some argument for
 letting non-root users control this. 
 
 
 Something like a power profile is, I think,what we
 really want:
 
 
 Windows defines several and they seem to fit what you
 are doing.
 
 E.g., you could run your system as follows:
 
   - always low power
   - low power if on battery, unrestricted if not
 
   - always full power
   - etc.
 
 
 Casper

Another profile I would suggest would be:

'charge quickly' - low power until charged, then full power. 

Since the time to charge a battery depends on the laptop's current consumption, 
if the processor is running flat out, the battery will take longer to charge. 
Hence a profile that runs the processor slow while the battery is charging, but 
then runs it more quickly once the battery is fully charged, would be useful.
 
 
This message posted from opensolaris.org
___
opensolaris-discuss mailing list
opensolaris-discuss@opensolaris.org


Re: [osol-discuss] frequency scalling in opensolaris

2007-12-02 Thread Dr. David Kirkby
 Try adding the following to your /etc/power.conf
 file:
 
 cpupm enable
 cpu-threshold 15s
 
 I believe these keywords are in the the power.conf(4)
 man page shipping 
 with snv_70b.
 
 Then execute /usr/pmconfig. I think you'll find that
 code has already 
 been written to reduce the speed of your CPU. And
 we're working on 
 improving it and Solaris power management in general.
 We've got a bit of 
 catching up to do.
 
 Mark

Hi, 
after adding those commands, and executing /usr/sbin/pmconfig, the clock rate 
in my laptop does change up/down, so it appears to work. I've seen it running 
at 1.000, 1.333, 1.667 and 2.000 GHz which are all the supported frequencies. 

This Sony Vaio VGN-SZ4XWN/C laptop is rather odd in that it has two graphics 
chips - both a low power/low performance Intel GMA 950 chipset and a higher 
performance, but more power hungry Nvida GeForce Go 7400 GPU. There is  a 
switch on the front panel which selects which one is used (under Vista, one 
needs a reboot for it to change). I'[ll have to try to get the integrated 
chipset to work, as I think that will save quite a bit of power. I notice under 
Vista the laptop runs much hotter if the GeForce GPU is used. But during the 
Solaris install, it reported my graphics was unsupported when I had the switch 
in the 'Stamina' (i.e. Intel GMA 950) position, so I had to switch to the 
'Speed' (i.e. Nvida) position. Since installation, it boots in either position, 
but I *think* it is using the power hungry Nvida all the time. 

Also I notice this in /var/adm/messages: 

[ID 314293 kern.info] device pci8086,[EMAIL PROTECTED](display#0) keeps up 
device [EMAIL PROTECTED],0(sd#0), but the latter is not power managed

I suspect there are a few things that eat the power which with some effort can 
probably be reduced - just needs a bit of tweaking in places. 

Thanks for your help. I seem to be making some progress with this now. 

It's amazing how much quicker this 2 GHz dual core laptop with 2 GB of RAM is 
under Solaris than Vista. It is not old ( 6 months old) and was not a budget 
laptop (cost around $3200), but the combination of Vista and Sony's useless 
software made it run rather slowly.
 
 
This message posted from opensolaris.org
___
opensolaris-discuss mailing list
opensolaris-discuss@opensolaris.org


Re: [osol-discuss] frequency scalling in opensolaris

2007-12-02 Thread Dr. David Kirkby
 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 though

I 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. 

 as I think you are misreading
 the messages from 
 dmesg.
 
 The messages you've listed are printed to the system
 log 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. 

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. 

Dave
 
 
This message posted from opensolaris.org
___
opensolaris-discuss mailing list
opensolaris-discuss@opensolaris.org


Re: [osol-discuss] frequency scalling in opensolaris

2007-12-02 Thread Mark Haywood

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 though


I 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 misreading
the messages from 
dmesg.


The messages you've listed are printed to the system
log 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
opensolaris-discuss@opensolaris.org

Re: [osol-discuss] frequency scalling in opensolaris

2007-12-01 Thread Dr. David Kirkby
 Dr. David Kirkby wrote:

  The ability to reduce the speed would be useful. I
 do notice the batteries die a lot quicker on this
 laptop (Sony VGN-SZ4XWN/C dual core 2.0 GHz Intgel
 Due 2 core T7200 CPU) when on Solaris than Vista.
 Do you have autopm enabled? If not, see
 power.conf(4).
 

Yes, it is enabled. But I'm not sure it is working. 

bash-3.00$  grep -v ^# /etc/power.conf

device-dependency-property removable-media /dev/fb


autopm  default
autoshutdown30  9:00 9:00   default

The powerd daemon (/usr/lib/power/powerd) is running. 

But it is certainly not shutting down after 30 mins. 

I'm a bit confused by this in the power.conf man page:

Device Power Management entries are only effective if  there
 is  no  user  process  controlling  the device directly. For
 example, X Windows systems directly control  frame  buffers.
 The entries in the power.conf file are effective only when X
 Windows is not running.


The sentance The entries in the power.conf file are effective only when X 
Windows is not running.  says it will not work if X is running. Given 99% if 
users are going to use X, that means the power management will almost never 
work. 

Or is that *supposed* to me the framebuffer entries will not work if X is 
running? If so, the word framebuffer should be inserted in the man page. (I 
also think graphics card or graphics chipset too, since few users of only 
Solaris x86 will know what a framebuffer is. As a SPARC user, I do. ).
 
*IF* it is supposed to mean only the framebuffer related entries do not work, 
perhaps something like:

   Device Power Management entries are only effective if  there
 is  no  user  process  controlling  the device directly. For
 example, X Windows systems directly control  graphics card or graphics 
chipsets (framebuffers on SPARC hardware). 
 The graphics entries in the power.conf file are effective only when X
 Windows is not running.

Or if it really means all entries are disabled, then perhaps something like:

Device Power Management entries are only effective if  there
 is  no  user  process  controlling  the device directly. For
 example, X Windows systems directly control  graphics card or graphics 
chipsets (framebuffers on SPARC hardware).  All entries (not just those related 
to graphics) are ignored when  X Windows is running.

Perhaps I am being thick, but it is a bit confusing to me. Perhaps I should 
submit this as an RFE. 

One more thing. I think it would be useful if there was a forum specifically 
addressing laptop users. I run Solaris 10 update 4 on my Blade 2000 and Solaris 
Express Developer Edition  9/07 snv_70b X86 on my laptop. I have a completely 
different set of issues on the laptop, which are very much going to be specific 
to laptop users.
 
 
This message posted from opensolaris.org
___
opensolaris-discuss mailing list
opensolaris-discuss@opensolaris.org


Re: [osol-discuss] frequency scalling in opensolaris

2007-12-01 Thread Casper . Dik

One more thing. I think it would be useful if there was a forum specifically 
addressing laptop use
rs. I run Solaris 10 update 4 on my Blade 2000 and Solaris Express Developer 
Edition  9/07 snv_70b 
X86 on my laptop. I have a completely different set of issues on the laptop, 
which are very much go
ing to be specific to laptop users.


laptop-discuss?

Note that Solaris only recently started supporting frequency scaling on
laptops.  (And only on Intel, not AMD)

Casper

___
opensolaris-discuss mailing list
opensolaris-discuss@opensolaris.org


Re: [osol-discuss] frequency scalling in opensolaris

2007-12-01 Thread Dr. David Kirkby
  Dr. David Kirkby wrote:

 One more thing. I think it would be useful if there
 was a forum specifically addressing laptop users. I
 run Solaris 10 update 4 on my Blade 2000 and Solaris
 Express Developer Edition  9/07 snv_70b X86 on my
 laptop. I have a completely different set of issues
 on the laptop, which are very much going to be
 specific to laptop users.

Oops, I see there is!! Forget I said that!
 
 
This message posted from opensolaris.org
___
opensolaris-discuss mailing list
opensolaris-discuss@opensolaris.org


Re: [osol-discuss] frequency scalling in opensolaris

2007-12-01 Thread Mark Haywood
Dr. David Kirkby wrote:
 Dr. David Kirkby wrote:
 
 The ability to reduce the speed would be useful. I
 do notice the batteries die a lot quicker on this
 laptop (Sony VGN-SZ4XWN/C dual core 2.0 GHz Intgel
 Due 2 core T7200 CPU) when on Solaris than Vista.
 Do you have autopm enabled? If not, see
 power.conf(4).

 
 Yes, it is enabled. But I'm not sure it is working. 

Is it? I was under the impression that you were discussing power 
management in context of your Sony laptop?

 autopm behavior

 Acceptable behavior values are described as follows:

  defaultThe behavior  of  the  system  depends  upon  its
 model.  Desktop models that fall under the United
 States Environmental Protection  Agency's  Energy
 Star   Memorandum   of   Understanding   #3  have
 automatic device Power  Management  enabled,  and
 all  others do not. See the Notes section of this
 manual page for more information.

If you read the Notes section, I think it will be clear to you that it 
is not presently enabled by default in the case of your laptop.

 
 bash-3.00$  grep -v ^# /etc/power.conf
 
 device-dependency-property removable-media /dev/fb
 
 
 autopm  default
 autoshutdown30  9:00 9:00   default
 
 The powerd daemon (/usr/lib/power/powerd) is running. 
 
 But it is certainly not shutting down after 30 mins. 
 
 I'm a bit confused by this in the power.conf man page:
 
 Device Power Management entries are only effective if  there
  is  no  user  process  controlling  the device directly. For
  example, X Windows systems directly control  frame  buffers.
  The entries in the power.conf file are effective only when X
  Windows is not running.
 
 
 The sentance The entries in the power.conf file are effective only when X 
 Windows is not running.  says it will not work if X is running. Given 99% if 
 users are going to use X, that means the power management will almost never 
 work. 
 
 Or is that *supposed* to me the framebuffer entries will not work if X is 
 running? If so, the word framebuffer should be inserted in the man page. (I 
 also think graphics card or graphics chipset too, since few users of only 
 Solaris x86 will know what a framebuffer is. As a SPARC user, I do. ).
  
 *IF* it is supposed to mean only the framebuffer related entries do not work, 
 perhaps something like:
 
Device Power Management entries are only effective if  there
  is  no  user  process  controlling  the device directly. For
  example, X Windows systems directly control  graphics card or graphics 
 chipsets (framebuffers on SPARC hardware). 
  The graphics entries in the power.conf file are effective only when X
  Windows is not running.
 
 Or if it really means all entries are disabled, then perhaps something like:
 
 Device Power Management entries are only effective if  there
  is  no  user  process  controlling  the device directly. For
  example, X Windows systems directly control  graphics card or graphics 
 chipsets (framebuffers on SPARC hardware).  All entries (not just those 
 related to graphics) are ignored when  X Windows is running.
 
 Perhaps I am being thick, but it is a bit confusing to me. Perhaps I should 
 submit this as an RFE. 

Perhaps. Sarito or Randy (cc'd) might be able to explain it more clearly 
and then you can decide if you'd like to file an RFE.

 One more thing. I think it would be useful if there was a forum specifically 
 addressing laptop users. I run Solaris 10 update 4 on my Blade 2000 and 
 Solaris Express Developer Edition  9/07 snv_70b X86 on my laptop. I have a 
 completely different set of issues on the laptop, which are very much going 
 to be specific to laptop users.

I believe Casper addressed this.

Mark
___
opensolaris-discuss mailing list
opensolaris-discuss@opensolaris.org


Re: [osol-discuss] frequency scalling in opensolaris

2007-12-01 Thread Dr. David Kirkby
 Dr. David Kirkby wrote:
  
 
  cpudrv_pm_set_topspeed: instance 1: has new max
 power
  of 200
  0 MHz

  BTW, It seems that whoever wrote this bit of code
 needs to learn about SI units, since I thought power
 was measured in Watts, not MHz. I thought MHz was a
 unit of frequency and not power. 

 I wrote the bit of code and yes, I was embarrassed
 when I read it over 
 as part of this thread. I was wondering if anyone was
 going to mention 
 the absurdity of its content.


It gave me a laugh! Perhaps you should change it before anyone elses notices 
it! 

BTW, if you, or anyone else writes any code that will reduce the speed of a CPU 
and want it tested on a Intel Core 2 Duo T7200 2.0 GHz, which (according to the 
sticker on the front of my laptop) supports Intel SpeedStep Technology, let 
me know. 

kstat -m cpu_info -s supported_frequencies_Hz

says it supports 1000, 1333, 1667 and 2000 Watts (sorry, MHz).
 
 
This message posted from opensolaris.org
___
opensolaris-discuss mailing list
opensolaris-discuss@opensolaris.org


Re: [osol-discuss] frequency scalling in opensolaris

2007-12-01 Thread Mark Haywood
Dr. David Kirkby wrote:
 Dr. David Kirkby wrote:
 
  
 cpudrv_pm_set_topspeed: instance 1: has new max
 power
 of 200
 0 MHz
 
 BTW, It seems that whoever wrote this bit of code
 needs to learn about SI units, since I thought power
 was measured in Watts, not MHz. I thought MHz was a
 unit of frequency and not power. 
   
 I wrote the bit of code and yes, I was embarrassed
 when I read it over 
 as part of this thread. I was wondering if anyone was
 going to mention 
 the absurdity of its content.
 
 
 It gave me a laugh! Perhaps you should change it before anyone elses notices 
 it! 

Glad I could at least amuse you. By the way, spell check didn't catch 
elses?

Yes, I've already filed:

6636222 NOTICE: cpudrv_pm_set_topspeed: instance 0: has new max power 
of 2000 MHz needs to go

 
 BTW, if you, or anyone else writes any code that will reduce the speed of a 
 CPU and want it tested on a Intel Core 2 Duo T7200 2.0 GHz, which (according 
 to the sticker on the front of my laptop) supports Intel SpeedStep 
 Technology, let me know. 
 
 kstat -m cpu_info -s supported_frequencies_Hz
 
 says it supports 1000, 1333, 1667 and 2000 Watts (sorry, MHz).

Actually, I really hope it was reported in Hz not MHz. ;-)

Try adding the following to your /etc/power.conf file:

cpupm   enable
cpu-threshold   15s

I believe these keywords are in the the power.conf(4) man page shipping 
with snv_70b.

Then execute /usr/pmconfig. I think you'll find that code has already 
been written to reduce the speed of your CPU. And we're working on 
improving it and Solaris power management in general. We've got a bit of 
catching up to do.

Mark
___
opensolaris-discuss mailing list
opensolaris-discuss@opensolaris.org


Re: [osol-discuss] frequency scalling in opensolaris

2007-11-30 Thread Mark Haywood
Dr. David Kirkby wrote:
 Currently, there is no way to force a processor to a
 lower frequency. A 
 feature we'll be adding to Solaris soon.

 As for what determining what frequencies your
 processors are running at, 
 you can find that out from the cpu_info kstat.

 $ kstat -m cpu_info -s current_clock_Hz
 

 Thank you for that. 

 The ability to reduce the speed would be useful. I do notice the batteries 
 die a lot quicker on this laptop (Sony VGN-SZ4XWN/C dual core 2.0 GHz Intgel 
 Due 2 core T7200 CPU) when on Solaris than Vista. Sony claim up to 6 hours, 
 but whilst I have never got that, I can get 4 hours on Vista. But on Solaris 
 2 hours is about the max. The other issue with this laptop is that it has two 
 graphics chips - a low power Intel chipset and a higher performance Nvida 
 FeForce Go 7400 GPU one. But Solaris is only using the higher performance 
 one, which I hardly ever use on Vista. 
   

Do you have autopm enabled? If not, see power.conf(4).

 That said, since I have installed Solaris, I hardly ever use Vista!!!

 Dave
  
  
 This message posted from opensolaris.org
 ___
 opensolaris-discuss mailing list
 opensolaris-discuss@opensolaris.org
   

___
opensolaris-discuss mailing list
opensolaris-discuss@opensolaris.org


Re: [osol-discuss] frequency scalling in opensolaris

2007-11-30 Thread Mark Haywood
Mark Haywood wrote:
 Dr. David Kirkby wrote:
   
 
   
 Also useful would be a message when the speed is
   
 
 reduced. I get messages like: 
 
   
 cpudrv: [ID 495817 kern.info] NOTICE:
   
 
 cpudrv_pm_set_topspeed: instance 1: has new max power
 of 200
 0 MHz
 
   
 but dont see any if the speed is reduce - I've no
   
 
 idea if it does reduce.


 If you get many of those message, I would classify
 that as a bug

 (in fact, any message that the CPU power frequency
 has changed is a bug, 
 IMHO, as it might cause your disks to spin up when
 the log message hits
 the disk)

 kstat shows you the current frequencies.

 Casper

 ___
 opensolaris-discuss mailing list
 opensolaris-discuss@opensolaris.org
 
   
 I've just checked /var/adm/messages on my laptop and see it has been booted 
 38 times. The cpudrv_pm_set_topspeed message has appeared 180 times - 90 
 with instance of 0 and 90 with an instance of 1. 

 bash-3.00$ grep 'NOTICE: cpudrv_pm_set_topspeed: instance 1: has new max 
 power of 2000 MHz'  /var/adm/messages  | wc -l
   90
 bash-3.00$ grep 'NOTICE: cpudrv_pm_set_topspeed: instance 0: has new max 
 power of 2000 MHz'  /var/adm/messages  | wc -l
   90
 bash-3.00$ grep 'SunOS Release 5.11 Version snv_70b 64-bit'  
 /var/adm/messages | wc -l
   38


 BTW, It seems that whoever wrote this bit of code needs to learn about SI 
 units, since I thought power was measured in Watts, not MHz. I thought MHz 
 was a unit of frequency and not power. 
   
 
 I wrote the bit of code and yes, I was embarrassed when I read it over 
 as part of this thread. I was wondering if anyone was going to mention 
 the absurdity of its content.

 As for the usefulness of the message, I think the information (the fact 
 that the max frequency is changing) is useful. Might need to be another 
 kstat rather than hidden away in the system log.
   
and/or a DTrace probe ...
 Mark

   
 It reminds me once when I worked in IT for about 6 months. My manager wanted 
 me to tell him the power consumption of some kit, as we were getting quotes 
 for air conditioning. So I added it up and emailed him the result in Watts. 
 I then got a message back that he did not want it in Watts, but did not 
 specify a unit. So I converted to kilo Joules per fortnight and email it to 
 him in that. I then got the reply that Watts would do.
   
 

 ___
 opensolaris-discuss mailing list
 opensolaris-discuss@opensolaris.org
   

___
opensolaris-discuss mailing list
opensolaris-discuss@opensolaris.org


Re: [osol-discuss] frequency scalling in opensolaris

2007-11-30 Thread Dr. David Kirkby
 Currently, there is no way to force a processor to a
 lower frequency. A 
 feature we'll be adding to Solaris soon.
 
 As for what determining what frequencies your
 processors are running at, 
 you can find that out from the cpu_info kstat.
 
 $ kstat -m cpu_info -s current_clock_Hz

Thank you for that. 

The ability to reduce the speed would be useful. I do notice the batteries die 
a lot quicker on this laptop (Sony VGN-SZ4XWN/C dual core 2.0 GHz Intgel Due 2 
core T7200 CPU) when on Solaris than Vista. Sony claim up to 6 hours, but 
whilst I have never got that, I can get 4 hours on Vista. But on Solaris 2 
hours is about the max. The other issue with this laptop is that it has two 
graphics chips - a low power Intel chipset and a higher performance Nvida 
FeForce Go 7400 GPU one. But Solaris is only using the higher performance one, 
which I hardly ever use on Vista. 

That said, since I have installed Solaris, I hardly ever use Vista!!!

Dave
 
 
This message posted from opensolaris.org
___
opensolaris-discuss mailing list
opensolaris-discuss@opensolaris.org


Re: [osol-discuss] frequency scalling in opensolaris

2007-11-30 Thread Mark Haywood
Dr. David Kirkby wrote:
 
 Also useful would be a message when the speed is
   
 reduced. I get messages like: 
 
 cpudrv: [ID 495817 kern.info] NOTICE:
   
 cpudrv_pm_set_topspeed: instance 1: has new max power
 of 200
 0 MHz
 
 but dont see any if the speed is reduce - I've no
   
 idea if it does reduce.


 If you get many of those message, I would classify
 that as a bug

 (in fact, any message that the CPU power frequency
 has changed is a bug, 
 IMHO, as it might cause your disks to spin up when
 the log message hits
 the disk)

 kstat shows you the current frequencies.

 Casper

 ___
 opensolaris-discuss mailing list
 opensolaris-discuss@opensolaris.org
 

 I've just checked /var/adm/messages on my laptop and see it has been booted 
 38 times. The cpudrv_pm_set_topspeed message has appeared 180 times - 90 with 
 instance of 0 and 90 with an instance of 1. 

 bash-3.00$ grep 'NOTICE: cpudrv_pm_set_topspeed: instance 1: has new max 
 power of 2000 MHz'  /var/adm/messages  | wc -l
   90
 bash-3.00$ grep 'NOTICE: cpudrv_pm_set_topspeed: instance 0: has new max 
 power of 2000 MHz'  /var/adm/messages  | wc -l
   90
 bash-3.00$ grep 'SunOS Release 5.11 Version snv_70b 64-bit'  
 /var/adm/messages | wc -l
   38


 BTW, It seems that whoever wrote this bit of code needs to learn about SI 
 units, since I thought power was measured in Watts, not MHz. I thought MHz 
 was a unit of frequency and not power. 
   
I wrote the bit of code and yes, I was embarrassed when I read it over 
as part of this thread. I was wondering if anyone was going to mention 
the absurdity of its content.

As for the usefulness of the message, I think the information (the fact 
that the max frequency is changing) is useful. Might need to be another 
kstat rather than hidden away in the system log.

Mark

 It reminds me once when I worked in IT for about 6 months. My manager wanted 
 me to tell him the power consumption of some kit, as we were getting quotes 
 for air conditioning. So I added it up and emailed him the result in Watts. I 
 then got a message back that he did not want it in Watts, but did not specify 
 a unit. So I converted to kilo Joules per fortnight and email it to him in 
 that. I then got the reply that Watts would do.
   

___
opensolaris-discuss mailing list
opensolaris-discuss@opensolaris.org


Re: [osol-discuss] frequency scalling in opensolaris

2007-11-30 Thread Dr. David Kirkby
 
 
 Also useful would be a message when the speed is
 reduced. I get messages like: 
 
 cpudrv: [ID 495817 kern.info] NOTICE:
 cpudrv_pm_set_topspeed: instance 1: has new max power
 of 200
 0 MHz
 
 but dont see any if the speed is reduce - I've no
 idea if it does reduce.
 
 
 If you get many of those message, I would classify
 that as a bug
 
 (in fact, any message that the CPU power frequency
 has changed is a bug, 
 IMHO, as it might cause your disks to spin up when
 the log message hits
 the disk)
 
 kstat shows you the current frequencies.
 
 Casper
 
 ___
 opensolaris-discuss mailing list
 opensolaris-discuss@opensolaris.org

I've just checked /var/adm/messages on my laptop and see it has been booted 38 
times. The cpudrv_pm_set_topspeed message has appeared 180 times - 90 with 
instance of 0 and 90 with an instance of 1. 

bash-3.00$ grep 'NOTICE: cpudrv_pm_set_topspeed: instance 1: has new max power 
of 2000 MHz'  /var/adm/messages  | wc -l
  90
bash-3.00$ grep 'NOTICE: cpudrv_pm_set_topspeed: instance 0: has new max power 
of 2000 MHz'  /var/adm/messages  | wc -l
  90
bash-3.00$ grep 'SunOS Release 5.11 Version snv_70b 64-bit'  /var/adm/messages 
| wc -l
  38


BTW, It seems that whoever wrote this bit of code needs to learn about SI 
units, since I thought power was measured in Watts, not MHz. I thought MHz was 
a unit of frequency and not power. 

It reminds me once when I worked in IT for about 6 months. My manager wanted me 
to tell him the power consumption of some kit, as we were getting quotes for 
air conditioning. So I added it up and emailed him the result in Watts. I then 
got a message back that he did not want it in Watts, but did not specify a 
unit. So I converted to kilo Joules per fortnight and email it to him in that. 
I then got the reply that Watts would do.
 
 
This message posted from opensolaris.org
___
opensolaris-discuss mailing list
opensolaris-discuss@opensolaris.org


Re: [osol-discuss] frequency scalling in opensolaris

2007-11-26 Thread Casper . Dik


Also useful would be a message when the speed is reduced. I get messages like: 

cpudrv: [ID 495817 kern.info] NOTICE: cpudrv_pm_set_topspeed: instance 1: has 
new max power of 200
0 MHz

but dont see any if the speed is reduce - I've no idea if it does reduce.


If you get many of those message, I would classify that as a bug

(in fact, any message that the CPU power frequency has changed is a bug, 
IMHO, as it might cause your disks to spin up when the log message hits
the disk)

kstat shows you the current frequencies.

Casper

___
opensolaris-discuss mailing list
opensolaris-discuss@opensolaris.org


Re: [osol-discuss] frequency scalling in opensolaris

2007-11-26 Thread Casper . Dik


The messages you've listed are printed to the system log whenever the
maximum power level changes. These maximums are set outside the scope
Solaris by ACPI (and Solaris just complies with the request). All
setting a new maximum means is that your processor cannot run at a
frequency any higher than the new max power frequency. It does not mean
that you processor is running at the new maximum frequency. So even when
you processor has a new max power frequency of 1833 MHz, it could still
be running at 1000 MHz. You'll need to use cpu_info (and possibly
dtrace) if you want to know what frequency your processor is currently
running at.

What use is printing these messages?

They're used by ACPI as a standard part of Thermal control to make
sure that your system does not overheat.  In some cases, the systems have 
been designed suhc that the CPU can not run full blast for a prolonged
period of time or when the environmental temperature is too high.

Casper

___
opensolaris-discuss mailing list
opensolaris-discuss@opensolaris.org


Re: [osol-discuss] frequency scalling in opensolaris

2007-11-25 Thread Dr. David Kirkby
 i have a core2 duo intel laptop running indiana and
 after seeing messages like:
 Nov  8 20:23:43 saturn cpudrv: [ID 495817 kern.info]
 NOTICE:
 cpudrv_pm_set_topspeed: instance 1: has new max power
 of 1833 MHz
 in dmesg, i was wondering if there is a way to force
 the processor to
 run at a lower frequency from within solaris
 
 nacho
 ___
 opensolaris-discuss mailing list
 opensolaris-discuss@opensolaris.org

That would be useful.

Also useful would be a message when the speed is reduced. I get messages like: 

cpudrv: [ID 495817 kern.info] NOTICE: cpudrv_pm_set_topspeed: instance 1: has 
new max power of 2000 MHz

but dont see any if the speed is reduce - I've no idea if it does reduce.
 
 
This message posted from opensolaris.org
___
opensolaris-discuss mailing list
opensolaris-discuss@opensolaris.org


Re: [osol-discuss] frequency scalling in opensolaris

2007-11-25 Thread Mark Haywood
Dr. David Kirkby wrote:
 i have a core2 duo intel laptop running indiana and
 after seeing messages like:
 Nov  8 20:23:43 saturn cpudrv: [ID 495817 kern.info]
 NOTICE:
 cpudrv_pm_set_topspeed: instance 1: has new max power
 of 1833 MHz
 in dmesg, i was wondering if there is a way to force
 the processor to
 run at a lower frequency from within solaris

 nacho
 ___
 opensolaris-discuss mailing list
 opensolaris-discuss@opensolaris.org
 

 That would be useful.

 Also useful would be a message when the speed is reduced. I get messages 
 like: 

 cpudrv: [ID 495817 kern.info] NOTICE: cpudrv_pm_set_topspeed: instance 1: has 
 new max power of 2000 MHz

 but dont see any if the speed is reduce - I've no idea if it does reduce.
  
  
 This message posted from opensolaris.org
 ___
 opensolaris-discuss mailing list
 opensolaris-discuss@opensolaris.org
   
Currently, there is no way to force a processor to a lower frequency. A 
feature we'll be adding to Solaris soon.

As for what determining what frequencies your processors are running at, 
you can find that out from the cpu_info kstat.

$ kstat -m cpu_info -s current_clock_Hz
module: cpu_infoinstance: 0
name:   cpu_info0   class:misc
current_clock_Hz28
 
module: cpu_infoinstance: 1
name:   cpu_info1   class:misc
current_clock_Hz28

Supported frequencies can be found using the cpu_info kstat too:

$ kstat -m cpu_info -s supported_frequencies_Hz
module: cpu_infoinstance: 0
name:   cpu_info0   class:misc
supported_frequencies_Hz28:32
 
module: cpu_infoinstance: 1
name:   cpu_info1   class:misc
supported_frequencies_Hz28:32

Mark
___
opensolaris-discuss mailing list
opensolaris-discuss@opensolaris.org


Re: [osol-discuss] frequency scalling in opensolaris

2007-11-25 Thread Ignacio Marambio Catán
 Currently, there is no way to force a processor to a lower frequency. A
 feature we'll be adding to Solaris soon.

 As for what determining what frequencies your processors are running at,
 you can find that out from the cpu_info kstat.

isnt there any mdb hack we could use? from the code i read not long
ago it seeems like everything is automatically done for us, we have no
way of setting the threshold in which it should scale down but i'm no
expert in kernel hacking so i might be wrong, according to the code
also there was an algorithm that prevented the processor to scale up
fast but that doesnt seem to be working here
from dmesg

Nov 25 20:09:37 saturn cpudrv: [ID 495817 kern.info] NOTICE:
cpudrv_pm_set_topspeed: instance 0: has new max power of 1000 MHz
Nov 25 20:09:37 saturn cpudrv: [ID 495817 kern.info] NOTICE:
cpudrv_pm_set_topspeed: instance 1: has new max power of 1000 MHz
Nov 25 20:09:37 saturn cpudrv: [ID 495817 kern.info] NOTICE:
cpudrv_pm_set_topspeed: instance 0: has new max power of 1000 MHz
Nov 25 20:09:37 saturn cpudrv: [ID 495817 kern.info] NOTICE:
cpudrv_pm_set_topspeed: instance 1: has new max power of 1000 MHz
Nov 25 20:09:53 saturn cpudrv: [ID 495817 kern.info] NOTICE:
cpudrv_pm_set_topspeed: instance 0: has new max power of 1833 MHz
Nov 25 20:09:53 saturn cpudrv: [ID 495817 kern.info] NOTICE:
cpudrv_pm_set_topspeed: instance 1: has new max power of 1833 MHz
Nov 25 20:09:53 saturn cpudrv: [ID 495817 kern.info] NOTICE:
cpudrv_pm_set_topspeed: instance 0: has new max power of 1833 MHz
Nov 25 20:09:53 saturn cpudrv: [ID 495817 kern.info] NOTICE:
cpudrv_pm_set_topspeed: instance 1: has new max power of 1833 MHz

it also seems a bit biased into using only either the highest or the
lowest available frequency

[EMAIL PROTECTED]:~$ kstat -m cpu_info -s supported_frequencies_Hz
module: cpu_infoinstance: 0
name:   cpu_info0   class:misc
supported_frequencies_Hz10:133300:183300

module: cpu_infoinstance: 1
name:   cpu_info1   class:misc
supported_frequencies_Hz10:133300:183300


nacho
___
opensolaris-discuss mailing list
opensolaris-discuss@opensolaris.org


Re: [osol-discuss] frequency scalling in opensolaris

2007-11-25 Thread Mark Haywood
Ignacio Marambio Catán wrote:
 Currently, there is no way to force a processor to a lower frequency. A
 feature we'll be adding to Solaris soon.

 As for what determining what frequencies your processors are running at,
 you can find that out from the cpu_info kstat.

 isnt there any mdb hack we could use? from the code i read not long
 ago it seeems like everything is automatically done for us, we have no
 way of setting the threshold in which it should scale down but i'm no
 expert in kernel hacking so i might be wrong, according to the code
 also there was an algorithm that prevented the processor to scale up
 fast but that doesnt seem to be working here
 from dmesg

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 though as I think you are misreading the messages from 
dmesg.

The messages you've listed are printed to the system log whenever the 
maximum power level changes. These maximums are set outside the scope of 
Solaris by ACPI (and Solaris just complies with the request). All 
setting a new maximum means is that your processor cannot run at a 
frequency any higher than the new max power frequency. It does not mean 
that you processor is running at the new maximum frequency. So even when 
you processor has a new max power frequency of 1833 MHz, it could still 
be running at 1000 MHz. You'll need to use cpu_info (and possibly 
dtrace) if you want to know what frequency your processor is currently 
running at.

If you're really interested in what these maximum power frequencies 
mean, then read up on _PDC and PDC change notifications in the ACPI 
specification. I believe these change requests are normally received for 
thermal reasons and I've noticed they occur frequently when booting the 
system.

In any case, we are aware that our CPU power management policies need 
improving and we're working on it. You might be interested in joining 
the Tesla project to keep abreast of what is going on with power 
management in Solaris.

Mark

 Nov 25 20:09:37 saturn cpudrv: [ID 495817 kern.info] NOTICE:
 cpudrv_pm_set_topspeed: instance 0: has new max power of 1000 MHz
 Nov 25 20:09:37 saturn cpudrv: [ID 495817 kern.info] NOTICE:
 cpudrv_pm_set_topspeed: instance 1: has new max power of 1000 MHz
 Nov 25 20:09:37 saturn cpudrv: [ID 495817 kern.info] NOTICE:
 cpudrv_pm_set_topspeed: instance 0: has new max power of 1000 MHz
 Nov 25 20:09:37 saturn cpudrv: [ID 495817 kern.info] NOTICE:
 cpudrv_pm_set_topspeed: instance 1: has new max power of 1000 MHz
 Nov 25 20:09:53 saturn cpudrv: [ID 495817 kern.info] NOTICE:
 cpudrv_pm_set_topspeed: instance 0: has new max power of 1833 MHz
 Nov 25 20:09:53 saturn cpudrv: [ID 495817 kern.info] NOTICE:
 cpudrv_pm_set_topspeed: instance 1: has new max power of 1833 MHz
 Nov 25 20:09:53 saturn cpudrv: [ID 495817 kern.info] NOTICE:
 cpudrv_pm_set_topspeed: instance 0: has new max power of 1833 MHz
 Nov 25 20:09:53 saturn cpudrv: [ID 495817 kern.info] NOTICE:
 cpudrv_pm_set_topspeed: instance 1: has new max power of 1833 MHz
 
 it also seems a bit biased into using only either the highest or the
 lowest available frequency
 
 [EMAIL PROTECTED]:~$ kstat -m cpu_info -s supported_frequencies_Hz
 module: cpu_infoinstance: 0
 name:   cpu_info0   class:misc
 supported_frequencies_Hz10:133300:183300
 
 module: cpu_infoinstance: 1
 name:   cpu_info1   class:misc
 supported_frequencies_Hz10:133300:183300
 
 
 nacho

___
opensolaris-discuss mailing list
opensolaris-discuss@opensolaris.org


Re: [osol-discuss] frequency scalling in opensolaris

2007-11-25 Thread Ignacio Marambio Catán

 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 though as I think you are misreading the messages from
 dmesg.

it would be at least a good thing to know, right now, the laptop gets
hot quite fast, i dont really care about raw speed, but i do care
about the battery, right now, i run out of it in 1.5 hours
is it playing with those settings safe?
what would i need to do?



 The messages you've listed are printed to the system log whenever the
 maximum power level changes. These maximums are set outside the scope of
 Solaris by ACPI (and Solaris just complies with the request). All
 setting a new maximum means is that your processor cannot run at a
 frequency any higher than the new max power frequency. It does not mean
 that you processor is running at the new maximum frequency. So even when
 you processor has a new max power frequency of 1833 MHz, it could still
 be running at 1000 MHz. You'll need to use cpu_info (and possibly
 dtrace) if you want to know what frequency your processor is currently
 running at.

nacho
___
opensolaris-discuss mailing list
opensolaris-discuss@opensolaris.org