Skip to contentSkip to conversation

mtime (default) resolution and why is it such?

DISCUSSION Kalin KOZHUHAROV 1 participant 1 message Mar 12, 2006

lore
Share & tools
lore
#0 lore raw

Hi all,

There were some discussions on the subversion dev list about "svn and shell scripts: managing properties" that boiled down to very quick changes to a file (by sed) without changing its mtime ...

So I started to dig the kernel code to see what exactly is the mtime resolution...

I could pin it down to include/linux:824

	/* Granuality of c/m/atime in ns.
	   Cannot be worse than a second */
	u32		   s_time_gran;

*** I feel this comment is wrong, should be granuLARity, submitting *** a patch separately:
*** [PATCH][TRIVIAL] Fix comments in 2.6.16-rc6: s/granuality/granularity/

But looking further down, I found fs/super.c:88

		s->s_time_gran = 1000000000;

So it seems that the default s_time_gran is 1 second... I was interested for reiserfs, as that is the main fs I use.

Some filesystems use 1ns (nfs, jfs, xfs...), some 100ns (cifs, ntfs, smbfs)...

So I have quite a few questions popping in my head:

1. Is there any particular design concern with this?

2. Would speed performance be drowning if I (later we) play with the default, or at least patch reiserfs to use say 0.001s ?

3. What could be affected and how do I measure performance drop?

I understand that is not the root couse for the subversion problem, but it may help me understand the problem better, so if you can spare a bit of time to answer my quiestions I'd be gratefull.

Kalin.

Signature · 3 lines
|[ ~~~~~~~~~~~~~~~~~~~~~~ ]|
+-> http://ThinRope.net/ <-+
|[ ______________________ ]|