Clock scaling (was Re: Wrong bogomips after plugging in AC power)

Erik Mouw (erik@it.et.tudelft.nl)
Fri, 29 Oct 1999 22:39:40 +0200 (CEST)


Dale Worley wrote:
> From: Pavel Machek <pavel@suse.cz>
>
> So I've now confirmed that my toshiba can speed-up its cpu under some
> circumstances. When it is powered up while batteries are low (<20%
> will work), it will start with cpu at 150MHz, and bogomips are
> computed accordingly.
>
> If I plug it into AC power, it will speed up to 300MHz, but bogomips
> still have "slow" value. Therefore all udelays are wrong by factor of
> two -- udelay(50) will only wait approx. 25usec. That seems pretty
> dangerous to me. Maybe we need some other source of short loops?

[...]

> Perhaps a patch is needed so APM (or the user) can inform the kernel
> to recompute bogomips, or to recompute them once a minute or so?

This would also be very nice for CPUs that can set the clock speed on
demand. The SA-1100 can do that trick: the clock can be scaled from
60 to 220 MHz in ~15 MHz steps. Although a slow clock preserves
batteries, but we did not yet implement clock scaling on the LART[1]
because of the timing loop implications (and lack of time is also a
reason ;-). What are the implications of recomputing the bogomips?
Or is it easier to just recompute it if you know your current CPU
clock speed?

Erik

[1] Linux Advanced Radio Terminal: SA-1100@220 MHz, 32MB RAM, 4MB Flash,
> 200 MIPS, < 1W. For pictures, have a look at
http://www-ict.its.tudelft.nl/~erik/open-source/LART/

-- 
J.A.K. (Erik) Mouw, Information and Communication Theory Group, Department
of Electrical Engineering, Faculty of Information Technology and Systems,
Delft University of Technology, PO BOX 5031,  2600 GA Delft, The Netherlands
Phone: +31-15-2785859  Fax: +31-15-2781843  Email J.A.K.Mouw@its.tudelft.nl
WWW: http://www-ict.its.tudelft.nl/~erik/

- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/