Sledgehammer fix didn't cut it...

Andrew Derrick Balsa (andrebalsa@altern.org)
Mon, 24 Aug 1998 12:49:10 +0200


Hi Linus,

This is an issue that has already been discussed, but it seems your
sledgehammer fix didn't really solve the problem, so I am again bringing this
forward again.

Problem
=======
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.

This causes a division overflow in do_fast_gettimeoffset(), in
/arch/i386/kernel/time.c.

Workarounds (that work and don't)
==========================
A year ago, I proposed a single line workaround for this problem. Although it
does not _solve_ the problem, it at least avoids the kernel oops. The
workaround was adopted for 2.0.35, but in 2.1.1xx kernels, you decided to
simply set the TSC capability flag to off for all Cyrix CPUs (by adding a
single line of code in /arch/i386/kernel/setup.c).

I was just told your solution doesn't work, because time_init() is called
before setup.c, so do_fast is used all the same, and one still gets the oops.
:-(

Now quoting you in a recent post to the kernel list:
> However, I will continue to ignore developers who don't say "we will fix
> it eventually", but instead say "let's remove the feature, we'll never be
> able to fix it". If I respected that kind of mentality I would be using
> WNT. I don't.

So considering:
1) Disabling the TSC flag (your "fix") is _not_ the correct solution.
2) I have proposed a workaround that works, and also works for the Centaur C6
step 0 which has an identical problem.
3) I have also proposed a different piece of code that actually _increases_
performance and actually *solves* the problem (instead of just working around
it or disabling the TSC altogether).
4) Your own words above.

Solution
=======
Could you take a look at the time.c code in Jumbo-9 and tell me if you are
willing to use it?
http://www.altern.org/andrebalsa/linux/Jumbo-2.0.35-9.patch.gz

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.

BTW this is my last attempt to solve this problem before 2.2 ships.

Regards,

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