[ntp:questions] Re: linux system clock egregiously slow!

Maciej W. Rozycki macro at ds2.pg.gda.pl
Thu Jan 22 13:09:26 UTC 2004


On Wed, 21 Jan 2004, David L. Mills wrote:

> Your code suggests MIPS has a process cycle counter, which was certainly
> not the case in the Digital Ultrix, which used a MIPS chip. If it does
> have a PCC and the jitter.c program shows no discontinuity, rejoice; the
> 800-PPM lurch is probably due to a broken initialization constant
> cycles_per_jiffy.

 FYI, the MIPS R2000 and R3000 processors that were used for most
MIPS-based DECstations did not have a cycle counter.  A cycle counter is
present in MIPS processors at least since the R4000, which, along with an
improved variation named R4400, was used for late DECstations.  Thus
Linux, when running on a DECstation can either find no cycle counter, or a
cycle counter is available in the chipset (even two counters in the
Personal DECstation), or a cycle counter is available both in the chipset
and the CPU.  Unlike Ultrix, Linux is able to utilize both the CPU and the
chipset counter and the CPU counter is preferred due to a much lower
access latency (the PCC is located in the control coprocessor #0 and has a
single-cycle access time, while an uncached access to the chipset takes
several cycles).

 I don't know if the R6000, which was an intermediate step between the
R3000 and the R4000, had a cycle counter -- there's not much documentation
available on this processor and real hardware is rare as well.

> David Wuertele wrote:
> > 
> > I run linux 2.4.18 on an embedded MIPS little-endian CPU, but I'm
> > getting distressingly poor system clock performance.  My CPU clock is
> > supposed to be good to about 30 PPM, but my system time is always slow
> > to the tune of 800 PPM!

 Linux 2.4.18 is almost two years old -- there were considerable
improvements to the timer code made around 2.4.22, including the
calculation of the cycles_per_jiffy variable.  Please try a newer version.

-- 
+  Maciej W. Rozycki, Technical University of Gdansk, Poland   +
+--------------------------------------------------------------+
+        e-mail: macro at ds2.pg.gda.pl, PGP key available        +



More information about the questions mailing list