Re: Ktimer / -rt9 (+custom) monotonic_clock going backwards.
From: George Anzinger (george_at_mvista.com)
Date: 10/21/05
- Previous message: Linus Torvalds: "Re: [PATCH] i386 spinlocks should use the full 32 bits, not only 8 bits"
- In reply to: Daniel Walker: "Re: Ktimer / -rt9 (+custom) monotonic_clock going backwards."
- Next in thread: john stultz: "Re: Ktimer / -rt9 (+custom) monotonic_clock going backwards."
- Reply: john stultz: "Re: Ktimer / -rt9 (+custom) monotonic_clock going backwards."
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Thu, 20 Oct 2005 15:19:29 -0700 To: Daniel Walker <dwalker@mvista.com>
Daniel Walker wrote:
> On Thu, 20 Oct 2005, Steven Rostedt wrote:
>
>>
>> Yes, but that shouldn't make a difference. NTP can slow down or speed up
>> the clock, but it should never make it go backwards. Especially for a
>> monotonic clock (as the name suggests).
>
>
> It looks like if ntp_adj held a big negative number you might end up
> with a smaller output . ntp_adj is signed too .. I don't know how
> ntp_adj is set though .
>
> I thought I remember George Anzinger speculating that ntp could
> cause the time to backwards , that's why I brought it up. Maybe if he's
> read he can clue us in ..
>
I think John has changed this, but in the "old" code if ntp was correcting the clock such that less
than TICK_NSEC was added on a tick, AND, the time was read just prior to this tick the get_offset
code would return ~TICK_NSEC of offset which would mean that a read right after the tick might be
less than the one just prior to the tick. The error, however, would be in the nanosecond area (no
where near a second). Again, as I said, I think John has changed this in is code so that the
get_offset equivalent is also ntp corrected, thus eliminating the small back step.
>
-- 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/
- Previous message: Linus Torvalds: "Re: [PATCH] i386 spinlocks should use the full 32 bits, not only 8 bits"
- In reply to: Daniel Walker: "Re: Ktimer / -rt9 (+custom) monotonic_clock going backwards."
- Next in thread: john stultz: "Re: Ktimer / -rt9 (+custom) monotonic_clock going backwards."
- Reply: john stultz: "Re: Ktimer / -rt9 (+custom) monotonic_clock going backwards."
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|