On 28.05.2013 14:31, Philip Martin wrote:
Tobias Bading<tbad...@web.de> writes:
b) '{ while true; do echo "">t; ls -l --full-time t; rm t; done; } |
uniq' prints exactly *two* lines per second, one every 0.5 seconds,
exact down to the millisecond.
I have an Ubuntu 12.04 machine and I see the expected behaviour: lots of
different timestamps. I have run the Subversion tests on Ubuntu 10.04 in
the past without a problem.
Did you run the tests on Ubuntu 10.04 on an ext3 or ext4 filesystem? On
ext3 you might not encounter this problem because ext3 only has a
timestamp resolution of a second, thus you don't enter the
"if(finfo.mtime % APR_USEC_PER_SEC)" block in svn_io_sleep_for_timestamps.
If you do a Subversion checkout of something like
http://svn.apache.org/repos/asf/subversion/trunk/subversion/libsvn_wc do
you see all the working files with different timestamps? If you then
remove the working files and run 'svn revert -R' all the files should be
restored in a fraction of a second. Do they all have different
timestamps?
I've already checked a few build directories. The
two-timestamps-per-second effect is consistent, e.g. in
subversion/svn/.libs I have unique timestamps like these (from a 'make
-j 3'):
2013-05-27 11:27:17.279848045 +0200
2013-05-27 11:27:17.779847483 +0200
2013-05-27 11:27:18.279848246 +0200
2013-05-27 11:27:18.779846845 +0200
2013-05-27 11:27:19.279848307 +0200
2013-05-27 11:27:19.779848160 +0200
Multiple files have the exact same timestamp, but there are no
timestamps in between. It clearly seems that some code in the
kernel/ext4-driver/somewhere uses a cached timestamp that is updated
exactly every 0.5 seconds.
You could also try mounting a tmpfs filesystem:
sudo mount -t tmpfs tmpfs /mnt
Do you get the same timestamp behaviour on that filesystem?
Good idea :-). The tmpfs filesystem shows the same behaviour. So it's
nothing ext4 specific.