aboutsummaryrefslogtreecommitdiff
path: root/sys/i386
diff options
context:
space:
mode:
authorJohn Polstra <jdp@FreeBSD.org>1999-08-22 00:15:16 +0000
committerJohn Polstra <jdp@FreeBSD.org>1999-08-22 00:15:16 +0000
commita2801b7731259a6562751bcd706d0430113f8834 (patch)
treea986948f34a11980c0ac2287abbdbb56f132b83f /sys/i386
parentaeea9b369552df330a0fcea5785dfdca199e8e90 (diff)
downloadsrc-a2801b7731259a6562751bcd706d0430113f8834.tar.gz
src-a2801b7731259a6562751bcd706d0430113f8834.zip
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)
Notes
Notes: svn path=/head/; revision=50137
Diffstat (limited to 'sys/i386')
0 files changed, 0 insertions, 0 deletions