]> git.ipfire.org Git - thirdparty/git.git/commit - cache.h
make USE_NSEC work as expected
authorKjetil Barvik <barvik@broadpark.no>
Thu, 19 Feb 2009 20:08:29 +0000 (21:08 +0100)
committerJunio C Hamano <gitster@pobox.com>
Fri, 20 Feb 2009 05:39:48 +0000 (21:39 -0800)
commitfba2f38a2c2cda458e490c18e0afbb12cbd37969
tree1702f1a42b940358bb9f5889bbbf1bf88f589f32
parent8cd6192e16d8bf590afa1105c840b72106d72941
make USE_NSEC work as expected

Since the filesystem ext4 is now defined as stable in Linux v2.6.28,
and ext4 supports nanonsecond resolution timestamps natively, it is
time to make USE_NSEC work as expected.

This will make racy git situations less likely to happen.  For 'git
checkout' this means it will be less likely that we have to open, read
the contents of the file into RAM, and check if file is really
modified or not.  The result sould be a litle less used CPU time, less
pagefaults and a litle faster program, at least for 'git checkout'.

Since the number of possible racy git situations would increase when
disks gets faster, this patch would be more and more helpfull as times
go by.  For a fast Solid State Disk, this patch should be helpfull.

Note that, when file operations starts to take less than 1 nanosecond,
one would again start to get more racy git situations.

For more info on racy git, see Documentation/technical/racy-git.txt
For more info on ext4, see http://kernelnewbies.org/Ext4

Signed-off-by: Kjetil Barvik <barvik@broadpark.no>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
cache.h
read-cache.c
unpack-trees.c