lkml.org 
[lkml]   [2004]   [Oct]   [1]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: Is there a problem in timeval_to_jiffies?
    Hi,

    On Wed, 29 Sep 2004 13:56:24 -0700
    Tim Bird <tim.bird@am.sony.com> wrote:

    > > If there is no latency, the timer should appear right at the
    > > beginning of a jiffie
    >
    > How does the computer "know" that the timer is at the beginning
    > of the jiffy?

    I was assuming no latency and in that case the timer should be
    managed right at the beginning of a jiffie. George Anzinger
    pionted out that timers should be designed to never be early. And
    for the design you have to assume there is no latency.

    Another thing is that the calculation of jiffies for the first
    occurrence of a timer is different to the interval calculation
    (for the first case, one jiffie is always added). But
    for interval timers it is different, it is normal that they take
    sometimes less time than you expect, because they needed more
    time for the last loop for example. But after 1000 loops the time
    between should be near to 1000 * time_for_one_loop.

    > If you are rescheduling one-shot timers immediately
    > after they fire, you should 'undershoot' on the time
    > interval, to hit the tick boundary you want, based
    > on the jiffy resolution of your platform.

    'undershooting' is not a good idea.

    The current calculation of interval to jiffies works quit good
    (I guess). But for arm there is this small problem. I'm still
    waiting for the test application from George and in fact I also
    have not that much time at the moment to work on that.




    Henry


    --

    Hi! I'm a .signature virus! Copy me into your
    ~/.signature to help me spread!

    -
    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/

    \
     
     \ /
      Last update: 2005-03-22 14:06    [W:0.023 / U:0.192 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site