[PATCH] Use of TSC with SMP and different CPU's

From: Boris Okun (bokun@home.com)
Date: Wed Mar 08 2000 - 20:12:45 EST


This patch allows to use do_fast_gettimeofday() (and
do_slow_gettimeofday as well) on SMP machines with processors running
at different speeds. The original do_slow_gettimeofday() is not SMP safe
and the original do_fast_gettimeofday() assumes that processors have the
same speed. The attached patch uses different scaling factors for
different processors and keeps track of time of timer interrupts on each
processor. The patch is against 2.3.47.

This patch allows me to run linux on P2/400 and P3/450 without problems.

As far as I can tell, the only other uses of TSC are in scheduling
(which seems to work, but I don't really understand it),
and in net profiling, joystick and drm (which I don't use).

My sincere thanks go to Artur Skawina, who proposed this solution and to
Andrea Arcangeli, who patiently explained the details of gettimeofday()
to me.

I will appreciate any comments.

Boris Okun


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



This archive was generated by hypermail 2b29 : Wed Mar 15 2000 - 21:00:14 EST