Re: [PATCH] i386: Selectable Frequency of the Timer Interrupt

From: George Anzinger (george_at_mvista.com)
Date: 07/12/05

  • Next message: Alistair John Strachan: "Re: Realtime Preemption, 2.6.12, Beginners Guide?"
    Date:	Mon, 11 Jul 2005 17:38:05 -0700
    To: "Martin J. Bligh" <mbligh@mbligh.org>
    
    
    

    Martin J. Bligh wrote:
    >>>Lots of people have switched from 2.4 to 2.6 (100 Hz to 1000 Hz) with no impact in
    >>>stability, AFAIK. (I only remember some weird warning about HZ with debian woody's
    >>>ps).
    >>>
    >>
    >>Yes, that's called "progress" so no one complained. Going back is
    >>called a "regression". People don't like those as much.
    >
    >
    > That's a very subjective viewpoint. Realize that this is a balancing
    > act between latency and overhead ... and you're firmly only looking
    > at one side of the argument, instead of taking a compromise in the
    > middle ...
    >
    > If I start arguing for 100HZ on the grounds that it's much more efficient,
    > will that make 250/300 look much better to you? ;-)

    I would like to interject an addition data point, and I will NOT be subjective.
      The nature of the PIT is that it can _hit_ some frequencies better than
    others. We have had complaints about repeating timers not keeping good time.
    These are not jitter issues, but drift issues. The standard says we may not
    return early from a timer so any timer will either be on time or late. The
    amount of lateness depends very much on the HZ value. Here is what the values
    are for the standard CLOCK_TICK_RATE:

    HZ TICK RATE jiffie(ns) second(ns) error (ppbillion)
      100 1193180 10000000 1000000000 0
      200 1193180 5000098 1000019600 19600
      250 1193180 4000250 1000062500 62500
      500 1193180 1999703 1001851203 1851203
    1000 1193180 999848 1000847848 847848

    The jiffie values here are exactly what the kernel uses and are based on the
    best one can do with the PIT hardware.

    I am not suggesting any given default HZ, but rather an argumentation of the
    help text that goes with it. For those who want timers to repeat at one second
    (or multiples there of) this is useful info.

    For you enjoyment I have attached the program used to print this. It allows you
    to try additional values...

    -- 
    George Anzinger   george@mvista.com
    HRT (High-res-timers):  http://sourceforge.net/projects/high-res-timers/
    
    

    -
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at http://www.tux.org/lkml/



  • Next message: Alistair John Strachan: "Re: Realtime Preemption, 2.6.12, Beginners Guide?"

    Relevant Pages

    • Re: [PATCH] i386: Selectable Frequency of the Timer Interrupt
      ... >> That's a very subjective viewpoint. ... We have had complaints about repeating timers not keeping good time. ... expected frequency. ... send the line "unsubscribe linux-kernel" in ...
      (Linux-Kernel)
    • Re: [PATCH] i386: Selectable Frequency of the Timer Interrupt
      ... and nobody from the latency ... 250/300 seems like a reasonable comprimise to me. ... *does* it cause (in visible effect, not "timers are less granular"). ... send the line "unsubscribe linux-kernel" in ...
      (Linux-Kernel)
    • Re: [ANNOUNCE] ktimers subsystem
      ... These timers may open up new ... > application (in kernel or user space), ... Tim Bird ... send the line "unsubscribe linux-kernel" in ...
      (Linux-Kernel)
    • Re: [ANNOUNCE] ktimers subsystem
      ... These timers may open up new ... > degradation for ANY app on ANY platform? ... send the line "unsubscribe linux-kernel" in ...
      (Linux-Kernel)
    • Timers to threads
      ... We are using Linux in one of our embedded products.This is the first time we are working in this Platform.We have few doubts regarding implementing s/w timers & how to pass the timer interrupts to threads. ... If we use kernel timers to invoke at particular time intervals using add_timer how to pass on to the application that the time has elapsed? ... Embedded Systems & Software ... send the line "unsubscribe linux-kernel" in ...
      (Linux-Kernel)