Re: gettimeofday question

From: Russell King (rmk@arm.linux.org.uk)
Date: Mon Mar 19 2001 - 02:33:56 EST


On Sat, Mar 03, 2001 at 12:49:04PM +0000, Russell King wrote:
> Hi,
>
> I've noticed that one of my machines here suffers from the "time going
> backwards problem" and so started thinking about the x86 solution.
>
> I've come to the conclusion that it has a hole which could cause it
> to return the wrong time in one specific case:
>
> - in do_gettimeofday(), we disable irqs (read_lock_irqsave)
> - the ISA timer wraps, but we've got interrupts disabled, so no update
> of xtime or jiffies occurs
> - in do_slow_gettimeoffset(), we read the timer, which has wrapped
> - since jiffies_p != jiffies, we do not apply any correction
> - our idea of time is now one jiffy slow.

I never heard any response to this. Could some knowledgeable person please
take a look at it?

Thanks.

--
Russell King (rmk@arm.linux.org.uk)                The developer of ARM Linux
             http://www.arm.linux.org.uk/personal/aboutme.html

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



This archive was generated by hypermail 2b29 : Fri Mar 23 2001 - 21:00:12 EST