Re: monotonic time for mount.cifs timeouts

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, 24 Aug 2010 14:22:48 -0400
Jeff Layton <jlayton@xxxxxxxxx> wrote:

> On Tue, 24 Aug 2010 13:07:55 -0500
> Steve French <smfrench@xxxxxxxxx> 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 <jlayton@xxxxxxxxx>
--
To unsubscribe from this list: send the line "unsubscribe linux-cifs" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux