Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 21 Aug 1999 17:15:17 -0700 (PDT)
From:      John Polstra <jdp@FreeBSD.org>
To:        cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org
Subject:   cvs commit: src/sys/kern vfs_subr.c src/sys/sys vnode.h src/sys/ufs/ufs ufs_vnops.c
Message-ID:  <199908220015.RAA56901@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help
jdp         1999/08/21 17:15:17 PDT

  Modified files:
    sys/kern             vfs_subr.c 
    sys/sys              vnode.h 
    sys/ufs/ufs          ufs_vnops.c 
  Log:
  Support full-precision file timestamps.  Until now, only the seconds
  have been maintained, and that is still the default.  A new sysctl
  variable "vfs.timestamp_precision" can be used to enable higher
  levels of precision:
  
        0 = seconds only; nanoseconds zeroed (default).
        1 = seconds and nanoseconds, accurate within 1/HZ.
        2 = seconds and nanoseconds, truncated to microseconds.
      >=3 = seconds and nanoseconds, maximum precision.
  
  Level 1 uses getnanotime(), which is fast but can be wrong by up
  to 1/HZ.  Level 2 uses microtime().  It might be desirable for
  consistency with utimes() and friends, which take timeval structures
  rather than timespecs.  Level 3 uses nanotime() for the higest
  precision.
  
  I benchmarked levels 0, 1, and 3 by copying a 550 MB tree with
  "cpio -pdu".  There was almost negligible difference in the system
  times -- much less than 1%, and less than the variation among
  multiple runs at the same level.  Bruce Evans dreamed up a torture
  test involving 1-byte reads with intervening fstat() calls, but
  the cpio test seems more realistic to me.
  
  This feature is currently implemented only for the UFS (FFS and
  MFS) filesystems.  But I think it should be easy to support it in
  the others as well.
  
  An earlier version of this was reviewed by Bruce.  He's not to
  blame for any breakage I've introduced since then.
  
  Reviewed by:	bde (an earlier version of the code)
  
  Revision  Changes    Path
  1.218     +43 -1     src/sys/kern/vfs_subr.c
  1.95      +2 -1      src/sys/sys/vnode.h
  1.120     +19 -10    src/sys/ufs/ufs/ufs_vnops.c



To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe cvs-all" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199908220015.RAA56901>