Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 29 Jan 1997 14:51:45 -0800 (PST)
From:      Bruce Evans <bde>
To:        CVS-committers, cvs-all, cvs-sys
Subject:   cvs commit:  src/sys/i386/isa clock.c
Message-ID:  <199701292251.OAA27561@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help
bde         97/01/29 14:51:45

  Modified:    sys/i386/isa  clock.c
  Log:
  Estimate an initial overhead of 0 usec instead of 20 usec in DELAY().
  I have code to calibrate the overhead fairly accurately, but there
  is little point in using it since it is most accurate on machines
  where an estimate of 0 works well.  On slow machines, the accuracy
  of DELAY() has a large variance since it is limited by the resolution
  of getit() even if the initial delay is calibrated perfectly.
  
  Use fixed point and long longs to speed up scaling in DELAY().
  The old method slowed down a lot when the frequency became variable.
  Assume the default frequency for short delays so that the fixed
  point calculation can be exact.
  
  Fast scaling is only important for small delays.  Scaling is done
  after looking at the counter and outside the loop, so it doesn't
  decrease accuracy or resolution provided it completes before the
  delay is up.  The comment in the code is still confused about this.
  
  Revision  Changes    Path
  1.75      +21 -10    src/sys/i386/isa/clock.c



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199701292251.OAA27561>