Re: Variable timer tick rate?

From: Bruce Evans (bde_at_zeta.org.au)
Date: 10/19/03

  • Next message: Poul-Henning Kamp: "Re: DISCUSSION: /dev/fd%d.%d and /dev/{a}cd%d[ac] to be discontinued ?"
    Date: Sun, 19 Oct 2003 09:23:51 +1000 (EST)
    To: Poul-Henning Kamp <phk@phk.freebsd.dk>
    
    

    On Sat, 18 Oct 2003, Poul-Henning Kamp wrote:

    > In message <20031018130119.T47207@root.org>, Nate Lawson writes:
    >
    > >This is an interesting approach. If there are no upcoming timeouts,
    > >decrease the tick rate. Of course, you have to amortize the cost of
    > >resetting the timer over the period of no ticks.
    > >
    > >http://kerneltrap.org/node/view/1006

    Doing this to increase (instead of decrease) the tick rate is an old
    topic. I think it would have too high an overhead (at least for the
    increase case, at least on i386's), since reprogramming the i8254
    timer takes a few usec. A few usec every 1/HZ for the default HZ
    wouldn't be too bad.

    > Yes, unfortunately we may have a couple of timeout() (ab)users which
    > use it to implement "as fast as possible polling" by calling timeout
    > with a 1 tick argument, so last I looked (a couple of years ago)
    > it fired every tick.

    Also, some things like to increase HZ to 1000 or more to poll faster,
    so even the timeout users that don't know better than to use a timeout
    of 1 tick get faster polling.

    Bruce
    _______________________________________________
    freebsd-arch@freebsd.org mailing list
    http://lists.freebsd.org/mailman/listinfo/freebsd-arch
    To unsubscribe, send any mail to "freebsd-arch-unsubscribe@freebsd.org"


  • Next message: Poul-Henning Kamp: "Re: DISCUSSION: /dev/fd%d.%d and /dev/{a}cd%d[ac] to be discontinued ?"

    Relevant Pages

    • Re: semTake .. millisecond/microsecond waits
      ... The semTake would return on a timeout between a min of 0 and a max of 0.0166666... ... Since you can't know how far away the next clock tick is, the time that you actually get for the timeout can always be just less than 1 tick of what you asked. ... With the default system clock rate of 60 hz, this will timeout after a minimum of 0.100 and a max of 0.116666... ...
      (comp.os.vxworks)
    • Re: sleep() API behaves differently in Linux 2.4 and Linux 2.6
      ... Linux 2.4.20 it takes about 10 msec. ... The default system timer tick on 2.4 kernels was 10ms. ... 10ms is the minimum amount of time you can sleep. ... timeout is actually a lower bound on the maximimum time slept ...
      (comp.os.linux.development.apps)
    • Re: semTake .. millisecond/microsecond waits
      ... The semTake timeout parameter doesn't provide the granuality I need. ... Since you can't know how far away the next clock tick is, ... With the default system clock rate of 60 hz, ...
      (comp.os.vxworks)
    • Re: Updating callout_reset
      ... Converting from another format to a tick count in callout_resetwould ... Fine tuning the timeout would be a better ... efficiently and avoid representation problems. ... Many callers don't worry much about efficiency and do calculations like ...
      (freebsd-arch)
    • Delay loop problem, VB6
      ... Private tick As Boolean, state As Long ... Private Sub Form_Click ... Debug.Print "Timeout 0" ...
      (comp.lang.basic.visual.misc)

  • Quantcast