On Tue, 24 Aug 2010 14:22:48 -0400 Jeff Layton <[email protected]> wrote:
> On Tue, 24 Aug 2010 13:07:55 -0500 > Steve French <[email protected]> wrote: > > > Any pointers to background on gettimeofday vs > > clock_gettime(CLOCK_MONOTONIC) and why the latter is better? > > IIUC, the reason for this is that gettimeofday is affected by wallclock > changes (think NTP): > > CLOCK_MONOTONIC > Clock that cannot be set and represents monotonic time since > some unspecified starting point. > > ...so by preferring CLOCK_MONOTONIC, the mtab locking code isn't > affected by clock jumps or skew. Bjorn, is this correct? > Correction...CLOCK_MONOTONIC is affected by adjtimex(). Over a 30s period though, that shouldn't mean much of a delta. The big danger is large clock jumps and this should take care of that. Out of curiousity though...did you or someone you know hit this problem in practice, Bjorn? Or did you just notice it via inspection? -- Jeff Layton <[email protected]> -- To unsubscribe from this list: send the line "unsubscribe linux-cifs" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
