lkml.org 
[lkml]   [2005]   [Oct]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: 2.6.14-rc3-rt2

    On Wed, 5 Oct 2005, Ingo Molnar wrote:

    >
    > * Thomas Gleixner <tglx@linutronix.de> wrote:
    >
    > > On Wed, 2005-10-05 at 10:29 -0400, Steven Rostedt wrote:
    > > > Hmm, Ingo,
    > > >
    > > > Do you know why time goes backwards when I run hackbench as a realtime
    > > > process? I added the output of start and stop and it does seem to go
    > > > backwards.
    > > >
    > > > Thomas?
    > >
    > > Yes. Thats happening. I moved the priority of softirq-timer above
    > > hackbench priority and the problem goes away. I look into this
    > > further.
    >
    > wouldnt hackbench then permanently starve run_timer_softirq(), and
    > update_times() in particular?
    >

    It seems that the problem comes down to the call to getnstimeofday in
    do_gettimeofday.

    void getnstimeofday(struct timespec *ts)
    {
    nsec_t delta;
    unsigned long seq;

    /* atomically read __monotonic_clock() */
    do {
    seq = read_seqbegin(&system_time_lock);

    delta = __monotonic_clock() - xtime_last_update;
    *ts = xtime_last_update_ts;

    } while (read_seqretry(&system_time_lock, seq));

    set_normalized_timespec(ts,
    ts->tv_sec,
    ts->tv_nsec + (long) delta);

    }


    I found that xtime_last_update is not updated while hackbench is running,
    and the delta ends up being 16 billion and some change. So the call to
    set_normalized_timespec overflows with the (long) delta.

    -- Steve
    -
    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-10-05 18:11    [W:0.021 / U:30.688 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site