linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Re: Changing CPU Speed while running Linux
@ 2001-06-13 22:23 Dieter Nützel
  0 siblings, 0 replies; 9+ messages in thread
From: Dieter Nützel @ 2001-06-13 22:23 UTC (permalink / raw)
  To: Arjan van de Ven; +Cc: Linux Kernel List, Linux ACPI List

Arjan van de Ven wrote:
>
> Sven Geggus wrote:
> >
> > Hi there,
> >
> > on my Elan410 based System it is very easy to change the CPU clock
> > speed by means od two outb commands.
> >
> > I was wondering, if it does some harm to the Kernel if the CPU is
> > reprogrammed using a different CPU clock speed, while the system is up and
> > running.
>
> I have a module for the K6 PowerNow which allows you to do
>
> echo 450 > /proc/sys/cpu/0/frequency
>
> and does the right thing wrt udelay / bogomips etc..
> I can dig it out if you want.. sounds like this should be a more generic
> thing.

Yes, please.

After (all) Athlon 4/MT (Palomino)  and Duron mobile feature PowerNow! it 
should be usefull for more and more people.

Regards,
	Dieter

BTW	I think there are only a "few" K6-2+/K6-III+ out ;-)
	But PowerNow! is nice stuff. I had an eye on an 1 GHz Palomino
	at CeBIT '2001.
-- 
Dieter Nützel
Graduate Student, Computer Science

University of Hamburg
Department of Computer Science
Cognitive Systems Group
Vogt-Kölln-Straße 30
D-22527 Hamburg, Germany

email: nuetzel@kogs.informatik.uni-hamburg.de
@home: Dieter.Nuetzel@hamburg.de

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Changing CPU Speed while running Linux
  2001-06-16 13:23     ` Alan Cox
@ 2001-06-16 13:56       ` Ian Stirling
  0 siblings, 0 replies; 9+ messages in thread
From: Ian Stirling @ 2001-06-16 13:56 UTC (permalink / raw)
  To: Alan Cox; +Cc: linux-kernel

> 
> > Can you dig that out? I'd like to take a look.
> > 
> > [Of course, problem is *not* solved: you still have short time when
> > kernel runs with wrong bogomips.]
> 
> Not really. WHen you do the speed change on most of these cpus you have to
> do it with IRQs off and with the PCI bridge temporarily disabled as the CPU
> disconnects from the bus during speed transititions and cannot take part in
> cache coherency

Though it's been a while, last time I read the elan sc400 (or was it the 
410, always get those two mixed up), datasheet, there were no 
special procedures needed, just change the speed.
This may have been because there is no external PCI bus.

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Changing CPU Speed while running Linux
  2001-06-14 13:12   ` Pavel Machek
  2001-06-16 10:46     ` arjan
@ 2001-06-16 13:23     ` Alan Cox
  2001-06-16 13:56       ` Ian Stirling
  1 sibling, 1 reply; 9+ messages in thread
From: Alan Cox @ 2001-06-16 13:23 UTC (permalink / raw)
  To: Pavel Machek; +Cc: Arjan van de Ven, Sven Geggus, linux-kernel

> Can you dig that out? I'd like to take a look.
> 
> [Of course, problem is *not* solved: you still have short time when
> kernel runs with wrong bogomips.]

Not really. WHen you do the speed change on most of these cpus you have to
do it with IRQs off and with the PCI bridge temporarily disabled as the CPU
disconnects from the bus during speed transititions and cannot take part in
cache coherency

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Changing CPU Speed while running Linux
  2001-06-14 13:12   ` Pavel Machek
@ 2001-06-16 10:46     ` arjan
  2001-06-16 13:23     ` Alan Cox
  1 sibling, 0 replies; 9+ messages in thread
From: arjan @ 2001-06-16 10:46 UTC (permalink / raw)
  To: Pavel Machek; +Cc: linux-kernel

In article <20010614131220.A36@toy.ucw.cz> you wrote:
>> and does the right thing wrt udelay / bogomips etc..
>> I can dig it out if you want.. sounds like this should be a more generic
>> thing.

> Can you dig that out? I'd like to take a look.

> [Of course, problem is *not* solved: you still have short time when
> kernel runs with wrong bogomips.]

But the kernel controls that time ..... It's not perfect, and it might be
aleviated by going in small steps at a time.
Disabling interrupts isn't fun as the bogomips code kind of needs that ;)

Greetings,
   Arjan van de Ven

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Changing CPU Speed while running Linux
  2001-06-13 13:21 ` Arjan van de Ven
@ 2001-06-14 13:12   ` Pavel Machek
  2001-06-16 10:46     ` arjan
  2001-06-16 13:23     ` Alan Cox
  0 siblings, 2 replies; 9+ messages in thread
From: Pavel Machek @ 2001-06-14 13:12 UTC (permalink / raw)
  To: Arjan van de Ven; +Cc: Sven Geggus, linux-kernel

Hi

> > on my Elan410 based System it is very easy to change the CPU clock speed by
> > means od two outb commands.
> > 
> > I was wondering, if it does some harm to the Kernel if the CPU is
> > reprogrammed using a different CPU clock speed, while the system is up and
> > running.
> 
> I have a module for the K6 PowerNow which allows you to do
> 
> echo 450 > /proc/sys/cpu/0/frequency
> 
> and does the right thing wrt udelay / bogomips etc..
> I can dig it out if you want.. sounds like this should be a more generic
> thing.

Can you dig that out? I'd like to take a look.

[Of course, problem is *not* solved: you still have short time when
kernel runs with wrong bogomips.]

-- 
Philips Velo 1: 1"x4"x8", 300gram, 60, 12MB, 40bogomips, linux, mutt,
details at http://atrey.karlin.mff.cuni.cz/~pavel/velo/index.html.


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Changing CPU Speed while running Linux
  2001-06-13 13:41 ` Magnus Sandberg
@ 2001-06-13 13:49   ` Dave Jones
  0 siblings, 0 replies; 9+ messages in thread
From: Dave Jones @ 2001-06-13 13:49 UTC (permalink / raw)
  To: Magnus Sandberg; +Cc: arjanv, linux-kernel

On Wed, 13 Jun 2001, Magnus Sandberg wrote:

> I have a brand new Dell Inspiron 8000, laptop. It can run in 700 MHz or
> 850 MHz. The manual says that the machine/BIOS switches speed dependent on
> CPU load. I have not installed Linux yet, but it works with Win2000.

Intel Speedstep iirc. My Vaio also has it. My findings so far:

On mains it runs at 700MHz, whilst on batteries it drops to ~550MHz.
If I boot an ACPI enabled kernel, the speed changes according to CPU
load, but with a smaller window. I've seen it go as low as 50MHz,
but only up to a maximum of 200MHz.   The fact that it only has a maximum
of 200MHz in this mode probably explains the need for the no-idle switch
in the current ACPI implementation.

As there are no public documents on Speedstep, it's not clear to me
whether this is a limitation of Speedstep, or the ACPI implementation.
Judging by the fact that Windows seems to run at full speed, I'd
be inclined to think the latter.

regards,

Dave.

-- 
| Dave Jones.        http://www.suse.de/~davej
| SuSE Labs


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Changing CPU Speed while running Linux
  2001-06-13 12:35 Sven Geggus
  2001-06-13 13:21 ` Arjan van de Ven
@ 2001-06-13 13:41 ` Magnus Sandberg
  2001-06-13 13:49   ` Dave Jones
  1 sibling, 1 reply; 9+ messages in thread
From: Magnus Sandberg @ 2001-06-13 13:41 UTC (permalink / raw)
  To: arjanv; +Cc: linux-kernel

Hi,

I have a brand new Dell Inspiron 8000, laptop. It can run in 700 MHz or
850 MHz. The manual says that the machine/BIOS switches speed dependent on 
CPU load. I have not installed Linux yet, but it works with Win2000.

It is also possible to force the BIOS to one speed if the OS don't like 
speed changes.

Would Linux accept sudden changes of CPU clock rate or is it only the the OS 
initiate the change of speed it is accepted?

I agree with you that it should be a generic thing. I guess that more and 
more laptops will get dual-speed CPUs.


                                  _\\|//_
                                  (-0-0-)
/-------------------------------ooO-(_)-Ooo------------------------------\
| Magnus Sandberg                    Email: Magnus.Sandberg@bluelabs.se  |
| Network Engineer, BlueLabs AB                  http://www.bluelabs.se/ |
| Phone: +46-8-470 2155                             FAX: +46-8-470 2199  |
\------------------------------------------------------------------------/
                                  ||   ||
                                 ooO   Ooo



 ----- On 13th of June 2001 Arjan van de Ven wrote; -----

Geggus wrote:
> 
> Hi there,
> 
> on my Elan410 based System it is very easy to change the CPU clock speed
> by means od two outb commands.
> 
> I was wondering, if it does some harm to the Kernel if the CPU is
> reprogrammed using a different CPU clock speed, while the system is up and
> running.

I have a module for the K6 PowerNow which allows you to do

echo 450 > /proc/sys/cpu/0/frequency

and does the right thing wrt udelay / bogomips etc..
I can dig it out if you want.. sounds like this should be a more generic
thing.

Greetings,
  Arjan van de Ven



^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Changing CPU Speed while running Linux
  2001-06-13 12:35 Sven Geggus
@ 2001-06-13 13:21 ` Arjan van de Ven
  2001-06-14 13:12   ` Pavel Machek
  2001-06-13 13:41 ` Magnus Sandberg
  1 sibling, 1 reply; 9+ messages in thread
From: Arjan van de Ven @ 2001-06-13 13:21 UTC (permalink / raw)
  To: Sven Geggus, linux-kernel

Sven Geggus wrote:
> 
> Hi there,
> 
> on my Elan410 based System it is very easy to change the CPU clock speed by
> means od two outb commands.
> 
> I was wondering, if it does some harm to the Kernel if the CPU is
> reprogrammed using a different CPU clock speed, while the system is up and
> running.

I have a module for the K6 PowerNow which allows you to do

echo 450 > /proc/sys/cpu/0/frequency

and does the right thing wrt udelay / bogomips etc..
I can dig it out if you want.. sounds like this should be a more generic
thing.

Greetings,
  Arjan van de Ven

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Changing CPU Speed while running Linux
@ 2001-06-13 12:35 Sven Geggus
  2001-06-13 13:21 ` Arjan van de Ven
  2001-06-13 13:41 ` Magnus Sandberg
  0 siblings, 2 replies; 9+ messages in thread
From: Sven Geggus @ 2001-06-13 12:35 UTC (permalink / raw)
  To: linux-kernel

Hi there,

on my Elan410 based System it is very easy to change the CPU clock speed by
means od two outb commands.

I was wondering, if it does some harm to the Kernel if the CPU is
reprogrammed using a different CPU clock speed, while the system is up and
running.

If so, is there a possibility to tell the Kernel that the clock speed has
been changed by means of a particular Kernel call?

If not, where would I put some code to do this at system boot?

Is /usr/src/linux/arch/i386/boot/setup.S the right place for something like
this?

Thanks for hints

Sven

-- 
Sven Geggus @ Fraunhofer IITB, Karlsruhe (http://wsd.iitb.fhg.de/)
Phone: +49 721 6091-422, Fax: +49 721 6091-213
Linux powered DATA aquisition and evaluation, embedded systems,
combustion engine diagnosis

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2001-06-16 14:03 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-06-13 22:23 Changing CPU Speed while running Linux Dieter Nützel
  -- strict thread matches above, loose matches on Subject: below --
2001-06-13 12:35 Sven Geggus
2001-06-13 13:21 ` Arjan van de Ven
2001-06-14 13:12   ` Pavel Machek
2001-06-16 10:46     ` arjan
2001-06-16 13:23     ` Alan Cox
2001-06-16 13:56       ` Ian Stirling
2001-06-13 13:41 ` Magnus Sandberg
2001-06-13 13:49   ` Dave Jones

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).