Re: Wrong bogomips after plugging in AC power

Jeremy Fitzhardinge (jeremy@goop.org)
Mon, 01 Nov 1999 18:58:07 -0800 (PST)


On 31-Oct-99 Pavel Machek wrote:
> What are other possible timebases? [I'm talking i386 architecture]
>
> loops - thats what we have
> clock counter - changes with bogomips
> rtc - it has 32khz time base (IIRC), that gives 31usec
> granularity. Not enough.
> timer - it has 16bit counter, and runs 18 times a second
> when 65535 is used as divider. That gives me 0.84usec precission (good
> enough). I just wonder how long it takes to do_read_hwtimer()...
>
> Any other ideas?

If the memory bus speed doesn't change, can you do an uncached busywait on some
memory?

I don't know how practical this is on the x86, but on the PPC I turn off
rate-limiting for the duration of the udelay, and restore it when its done.
This assumes that 1. you can switch it on and off quickly, and 2. that you
don't spend too much time in udelay.

It's ironic that busywaits like udelay are the only case where slowing down the
CPU gives you any power saving...

J

-
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/