All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jeff Layton <jlayton-eUNUBHrolfbYtjvyW6yDsg@public.gmane.org>
To: Jeff Layton <jlayton-eUNUBHrolfbYtjvyW6yDsg@public.gmane.org>
Cc: "Steve French" <smfrench-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>,
	"Björn JACKE" <bj-3ekOc4rQMZmzQB+pC5nmwQ@public.gmane.org>,
	linux-cifs-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: Re: monotonic time for mount.cifs timeouts
Date: Tue, 24 Aug 2010 14:34:33 -0400	[thread overview]
Message-ID: <20100824143433.5049ebe1@tlielax.poochiereds.net> (raw)
In-Reply-To: <20100824142248.164caebe-9yPaYZwiELC+kQycOl6kW4xkIHaj4LzF@public.gmane.org>

On Tue, 24 Aug 2010 14:22:48 -0400
Jeff Layton <jlayton-eUNUBHrolfbYtjvyW6yDsg@public.gmane.org> wrote:

> On Tue, 24 Aug 2010 13:07:55 -0500
> Steve French <smfrench-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> 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-eUNUBHrolfbYtjvyW6yDsg@public.gmane.org>

  parent reply	other threads:[~2010-08-24 18:34 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-08-24 16:16 monotonic time for mount.cifs timeouts Björn JACKE
     [not found] ` <E1OnwAo-008Rzd-Bd-dqLtpHMqGvUyWpdLl23E4A@public.gmane.org>
2010-08-24 17:34   ` Jeff Layton
     [not found]     ` <20100824133418.6319ead7-9yPaYZwiELC+kQycOl6kW4xkIHaj4LzF@public.gmane.org>
2010-08-24 18:07       ` Steve French
     [not found]         ` <AANLkTi==5ZbC7Fb8wnCea50OndXZ=QwV5xPwv19K1Fyz-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2010-08-24 18:22           ` Jeff Layton
     [not found]             ` <20100824142248.164caebe-9yPaYZwiELC+kQycOl6kW4xkIHaj4LzF@public.gmane.org>
2010-08-24 18:34               ` Jeff Layton [this message]
     [not found]                 ` <20100824143433.5049ebe1-9yPaYZwiELC+kQycOl6kW4xkIHaj4LzF@public.gmane.org>
2010-08-24 20:08                   ` Björn JACKE
     [not found]                     ` <E1OnznA-008e2X-Fm-dqLtpHMqGvUyWpdLl23E4A@public.gmane.org>
2010-08-24 23:30                       ` Jeff Layton
     [not found]                         ` <20100824193025.24b0f8c4-4QP7MXygkU+dMjc06nkz3ljfA9RmPOcC@public.gmane.org>
2010-08-25  0:47                           ` Steve French

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20100824143433.5049ebe1@tlielax.poochiereds.net \
    --to=jlayton-eunubhrolfbytjvyw6ydsg@public.gmane.org \
    --cc=bj-3ekOc4rQMZmzQB+pC5nmwQ@public.gmane.org \
    --cc=linux-cifs-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=smfrench-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.