home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #3 / NN_1993_3.iso / spool / comp / protocol / time / ntp / 1226 < prev    next >
Encoding:
Internet Message Format  |  1993-01-22  |  2.4 KB

  1. Path: sparky!uunet!spool.mu.edu!agate!dog.ee.lbl.gov!ucbvax!maths.tcd.ie!ajudge
  2. From: ajudge@maths.tcd.ie (Alan Judge)
  3. Newsgroups: comp.protocols.time.ntp
  4. Subject: XNTP3/MIPS RISCos 5.01 solved (ish)
  5. Message-ID: <9301211224.aa17791@salmon.maths.tcd.ie>
  6. Date: 21 Jan 93 12:24:06 GMT
  7. Sender: usenet@ucbvax.BERKELEY.EDU
  8. Distribution: inet
  9. Organization: The Internet
  10. Lines: 43
  11.  
  12. Thanks to several net people, I have now sorted out my problem with
  13. NTP on a MIPS Magnum 4000 with RISC/os 5.01.  (At least, I think so.)
  14.  
  15. Philip Gladstone provided a patch (SETTIMEOFDAY_DAMAGED) which worked
  16. around the problem where settimeofday ignores the sub-second part.
  17.  
  18. However, the primary problem turned out to be the MIPS kernel.  All
  19. MIPS workstations have time of day chips, and it seems that the kernel
  20. intermittently checks this clock and adjusts the CPU clock accordingly
  21. (both by using an internal adjtime(), and by changing the basic speed
  22. of the CPU clock causing the "Adjust CLOCK Hz" messages in syslog).
  23. Obviously, this has bad interactions with the correct operation of
  24. NTP, which is doing something similar based on NTP clocks outside.
  25. Each time the kernel does this, NTP has a fit.
  26.  
  27. It seems from the code that this has always been done, even on R3000
  28. machines and in RISCos 4.51, so NTP has always been a bit funny
  29. (despite us running it for more than a year).  On the R4000, however,
  30. the CPU clock (and maybe the TOD clock) is much further out to start
  31. with and this explains the problems that I had getting NTP to
  32. stabilise.
  33.  
  34. There is no MIPS-provided way to turn this off (like Sun's
  35. dosynctodr).  However, MIPS do provide source code for all their
  36. drivers with RISCos, so it is a fairly simple patch on most MIPS boxes
  37. to turn this off.  They inadvertently omitted the R4000 TODC source
  38. though, so I had to patch the binary.
  39.  
  40. I have put in a request for an easier way to disable the clock syncing.
  41.  
  42.  
  43. A WARNING: at least on the R4000, the basic CPU clock speed is WAY
  44. out, drifting over a second a minute unless you change the tick rate.
  45. I am have now been running ntp3 for a few days with the tick set to
  46. 9808 (is this a record?), and have a freq of around 100ppm, so maybe
  47. 9809 would be better.  I'm hoping that the CPU clock is at least
  48. stable even if it is way off, but I won't know for a few weeks and
  49. reboots.
  50.  
  51. I haven't upgraded the R3000 boxes yet, so I don't know how bad they
  52. are.  So, be careful if you switch off the clock syncing.
  53. --
  54. Alan
  55.