[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <alpine.LFD.1.10.0804030827180.3219@apollo.tec.linutronix.de>
Date: Thu, 3 Apr 2008 08:28:25 +0200 (CEST)
From: Thomas Gleixner <tglx@...utronix.de>
To: Karsten Wiese <fzu@...gehoertderstaat.de>
cc: John Stultz <johnstul@...ibm.com>, Tim Ricketts <tr@...th.li>,
Michael Smith <msmith@...h.org>,
LKML <linux-kernel@...r.kernel.org>,
Andy Wingo <wingo@...endo.com>, Ingo Molnar <mingo@...e.hu>
Subject: Re: gettimeofday() jumping into the future
On Thu, 3 Apr 2008, Karsten Wiese wrote:
> > To prevent this TSC specific wreckage we need to compare the TSC value
> > against the reference value and return the latter when it is larger
> > than the actual TSC value.
>
> Last paragraph IMO should be:
> To prevent this TSC specific wreckage we need to substract the
> reference value from the TSC value, interpret the result as
> signed. If the interpreted result is negative, return the reference
> value, else the TSC Value.
> Your patch misses the corner case where TSC value is < reference _and_ valid
> at TSC wrap around.
In about 200 years on a 3Ghz box.
> The access to the reference value needs a (the xtime ?) lock on 32bit, no?
The readout is under xtime lock anyway.
Thanks,
tglx
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists