Re: Sledgehammer fix didn't cut it...

Andrew Derrick Balsa (andrebalsa@altern.org)
Mon, 24 Aug 1998 16:11:00 +0200


Hello Alan,

On Mon, 24 Aug 1998, Alan Cox wrote:
>> The TSC in the Cyrix 6x86MX and MII CPUs is stopped when the CPU is Halted, if
>> the Suspend-on-Halt feature (unique to Cyrix CPUs) is enabled.
>
>[Not totally. The AMD K5 has this facility accidentally, as does a Step 0
>C6 (as you note below)

The Cyrix CPUs are unique in that power consumption goes down to ~150 mW when
the CPU is Halted (i.e. when the Linux kernel goes into the idle loop). No
other Pentium-class CPU achieves this. A nice feature on lightly-loaded
Linux boxes used as routers, web servers, etc...

But you are right in that early AMD K5s, the Centaur C6 step 0 and all Cyrix
6x86MX and M II CPUs have this same problem. Also the same problem happens if
one tries to use APM (on _any_ x86 CPU) and do_fast_gettimeoffset(). This is why
we have an ifdef APM that just shunts the do_fast routine. Which is another
sledgehammer "fix"...

>See the AMD K5 note on the jobs list. Its the same problem. The workaround
>would work (although the wrong answer) if you re-ordered them. The TSC
>is far too useful to disable.

I entirely agree. This is why I proposed the new code in Jumbo. It uses the TSC
on _all_ CPUs without problems, and is also compatible with APM.
....
>> It actually halves the execution time of do_fast_gettimeoffset() (which you
>> would describe as a "100% performance increase"), and solves other
>> miscellaneous problems with the present code.
>
>The only reason I didnt put this in 2.0.36pre6 was in case of unexpected
>suprises since the 2.0.3x code is bad but works.

Actually, I think the do_fast_gettimeoffset() code is a bright idea, but the
implementation had to be improved a little bit. This is what the relevant
part of Jumbo does.

BTW C. Scott Ananian wrote most of the new time.c code, initially because he
wanted a neat solution for the APM problem, not because of any Cyrix CPU
feature.

Cheers,

--
Andrew D. Balsa
andrebalsa@altern.org

- 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.altern.org/andrebalsa/doc/lkml-faq.html