cvs commit: src/sys/sparc64/include cpufunc.h pcpu.h tick.h src/sys/sparc64/sparc64 mp_machdep.c tick.c

Marius Strobl marius at FreeBSD.org
Sat Apr 16 07:57:39 PDT 2005


marius      2005-04-16 14:57:38 UTC

  FreeBSD src repository

  Modified files:
    sys/sparc64/include  cpufunc.h pcpu.h tick.h 
    sys/sparc64/sparc64  mp_machdep.c tick.c 
  Log:
  - Add a workaround for a bug in BlackBird CPUs (said to be part of the
    SpitFire erratum #54) which can cause writes to the TICK_CMPR register
    to fail. This seems to fix the dying clocks problem reported by jhb@
    and kris at . [1]
  - In tick_start() don't reset the tick counter of the boot processor to
    zero. It's initially reset in _start() and afterwards but _before_
    tick_start() is called on the BSP the APs synchronise with the tick
    counter of the BSP in mp_startup(). Resetting the tick counter of the
    BSP in tick_start() probably also was the cause of problems seen when
    using the CPU tick counter as timecounter on SMP machines.
    Not resetting the tick counter of the BSP in mp_startup() makes the
    tick counters and tick interrupts between the BSP and APs be pretty
    much in sync as it's supposed to be. This also means there's no longer
    a real reason to have separate tick_start() and tick_start_ap() so
    merge them and zap tick_start_ap(). This is also a first step in
    simplifying the interface to the tick counters in preparation to use
    alternate clock hardware where available.
  - Switch to the algorithm used on FreeBSD/ia64 for updating the tick
    interrupt register and which compensates the clock drift caused by
    varying delays between when the tick interrupts actually trigger and
    when they are serviced. Not compensating the clock drift mainly hurts
    interactive performance especially when using WITNESS. [2]
    For further information about the algorithm also see the commit log
    of sys/ia64/ia64/interrupt.c rev. 1.38.
    On sparc64 the sysctls for monitoring the behaviour of the tick
    interrupts are machdep.tick.adjust_edges, machdep.tick.adjust_excess,
    machdep.tick.adjust_missed and machdep.tick.adjust_ticks.
  - In tick_init() just use tick_stop() for stopping the tick interrupts
    until a proper handler is set up later. This also stops the system
    tick interrupt on USIII systems earlier.
  - In tick_start() check for a rough upper limit of HZ.
  - Some minor changes, e.g. use FBSDID, remove unused headers, etc.
  
  Info obtained from:     Linux [1]
  Ok'ed by:               marcel [2]
  Additional testing by:  kris (earlier version of the workaround), jhb
  X-MFC after:            3 days [1]
  
  Revision  Changes    Path
  1.20      +17 -0     src/sys/sparc64/include/cpufunc.h
  1.20      +2 -0      src/sys/sparc64/include/pcpu.h
  1.4       +1 -8      src/sys/sparc64/include/tick.h
  1.29      +4 -3      src/sys/sparc64/sparc64/mp_machdep.c
  1.16      +92 -54    src/sys/sparc64/sparc64/tick.c


More information about the cvs-src mailing list