Re: 6x86 recognition

Andrew Derrick Balsa (andrebalsa@altern.org)
Sat, 08 Aug 1998 09:30:11 +0200


Hi,

Rafael Reilova wrote:
>
> Hi Trever,
>
> On Fri, 7 Aug 1998, Trever Adams wrote:
>
> > > The gettimeofday/rdtsc has been "fixed" by the sledgehammer approach. The
> > > TSC is permanently disabled in Cx686MX's. The kernel will use the
>
> [...]
> > I thought the TSC problem was fixed in the MII family of Cyrix chips.

There is *no* problem with the TSC in the Cyrix 6x86 and MII CPUs.

The problem is in the do_fast_gettimeoffset() routine in
/arch/i386/kernel/time.c. It assumes a TSC behaviour which cannot be
taken for granted. This is why it breaks when APM is enabled, breaks on
the C6 step 0, breaks with Cyrix 6x86MX and MII CPUs (when
Suspend-on-Halt is enabled) and may provide wrong timestamp readings in
various specific circumstances.

An improved routine has already been posted on the list for kernels
2.1.1xx. It works, has been tested, solves all the above problems and
improves kernel performance. It was (neatly) coded by C. Scott Ananian.

However, it has not passed (yet) the "I like it" test from Linus. Molnar
Ingo took a look at it, as did Alan Cox (I think).

> > If so, does this sledgehammer approach take this course of action with
> > the MII? I ask this because I have a PPro 200 ad work, takes 2 seconds
>
> Yep, MII is currently in the same boat as 6x86MX. But AFAIK only on
> 2.1.x

The MII behaves exactly the same WRT the TSC as the 6x86MX. Cyrix fixed
the "Coma" bug in the MII, but that is an entirely different issue.
Contrarily to just about all the other Pentium-class x86 CPUs, there are
no known bugs with the MII operating under GNU/Linux.

BTW the MII provides much higher integer performance than the PPro, MHz
for MHz. And consequently higher kernel performance too. (Benchmarking
data available on request).
>
> [Andre, is the TSC really fixed on the MII? If so, it would be a trival
> patch to change the new C'ified detection code not to disable it for MII]

No, it hasn't changed. The Linux kernel code as it stands still needs
the incorrect "sledgehammer" fix for the MII. Also note that the
"sledgehammer" fix only "fixes" the problem with Cyrix CPUs. The other
issues have or are still waiting for other "sledgehammer" fixes.
>
> > P.S. 2.0.35 is what they run.
>
> I'm not sure what the stock 2.0.35 does, but I do know that the Jumbo
> patch completely eliminates the TSC problem even with APM or 6x86MX (You
> get a free lunch. ;-)

With the Jumbo patch, you get a free lunch (fixed time.c), wine (greatly
improved x86 CPU detection), dessert (UDMA) and coffee (MHz rating of
the CPU). The latest version against 2.0.35 is available from:
http://www.altern.org/andrebalsa/linux/Jumbo-2.0.35-9.patch.gz.

Bon appetit! :-)

Cheers,

--
Andrew

- 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