differences in the time precision used within linux can bite you

krishnaakishore at gmail.com krishnaakishore at gmail.com
Sun Feb 3 19:58:41 UTC 2008


@Bruke: I don't think that is what he is referring to. The problem was
with preserving timestamps when the copy is being made.

It has got something to do with struct timespec, struct timeval usage
may be. Just a guess.

KK

On Feb 3, 2008 9:47 PM, Burke, Thomas G. <tg.burke at ngc.com> wrote:
> I gotta wonder about a drive to nanosecond precision...  Latencies within the kernel by themselves should be enough to make timestamping inconsistent below a few 10's of micriseconds, even on the fastest processors.
>
> Or so I would think, anyway.
>
>
>
> ----- Original Message -----
> From: redhat-list-bounces at redhat.com <redhat-list-bounces at redhat.com>
> To: redhat-list at redhat.com <redhat-list at redhat.com>
> Sent: Sun Feb 03 10:02:25 2008
> Subject: differences in the time precision used within linux can bite you
>
> I am using RHEL4 and encountered a problem which is essentially caused by the
> fact that efforts are underway to increase the precision of timestamps that are
> used by various linux commands. However, as these efforts are implemented,
> one can get non-intuitive results.
>
> My particular situation is demonstrated by this:
>         # echo xxx > jnk
>         # ls --full-time jnk
>         -rw-------  1 root root 4 2008-01-31 18:40:27.879358240 -0800 jnk
>         # cp -p jnk jnkcopy
>         # ls --full-time jnk*
>         -rw-------  1 root root 4 2008-01-31 18:40:27.879358240 -0800 jnk
>         -rw-------  1 root root 4 2008-01-31 18:40:27.879358000 -0800 jnkcopy
>
> Note that the timestamp values are NOT the same.
>
> I ran into this when (trying) to use cp -p as a way of remembering exactly
> when the original version of a file was created (i.e., I later then compared
> the timestamps of jnk and jnkcopy ... but due to the loss of precision
> in the copy, they will rarely be equal).
>
> I sent a bug report to gnu, and they were very helpful.
>
> The situation as I understand it is this: an effort is underway to increase
> the precision of timestamps used in linux into the nanosecond range,
> but that effort is necessarily actually implemented for different parts
> of linux at different times, so one can have the above type of thing occur.
>
> Thus this is not just a "problem" with using cp.
>
> I have access to several different linux/cygwin installations, and so ran
> the above test and found that the problem is fairly common. So this is not
> a criticism of RedHat.
>
> I would by the way be interested if anyone at RedHat cares to comment on
> the state of this issue in RHEL5. I am still on RHEL4 (and so are many
> people). I was thinking anyway of going to RHEL5, but it would be nice
> to know where RHEL5 is at with respect to the nanosecond consistency issue.
>
> Ray Liere
>
> --
> redhat-list mailing list
> unsubscribe mailto:redhat-list-request at redhat.com?subject=unsubscribe
> https://www.redhat.com/mailman/listinfo/redhat-list
>
> --
> redhat-list mailing list
> unsubscribe mailto:redhat-list-request at redhat.com?subject=unsubscribe
> https://www.redhat.com/mailman/listinfo/redhat-list
>




More information about the redhat-list mailing list