Re: [Patch] BME, noatime and nodiratime

From: Russell King
Date: Tue Apr 06 2004 - 18:37:38 EST


On Wed, Apr 07, 2004 at 12:11:36AM +0100, viro@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx wrote:
> Note that the last one means that doing stat() in a loop will sometimes
> give atime going backwards. We also completely ignore noatime here.
>
> There are similar places in some other char drivers. Obvious step would
> be to have them do file_accessed() instead; however, I'd really like to
> hear the rationale for existing behaviour. Comments?

I believe its so that we update the data in the cache, and avoid writing
it back to disk unnecessarily - consider the case where you have a lot
of tty activity (which updates atime). You don't particularly want to
be committing atime updates to disk every, what, 5 seconds, or performing
the NFS operations for the same.

The above is my understanding of the situation, which comes from when I
looked into these issues back in 2.0.3x days on a root-NFS machine and
asked (iirc) Alan Cox about it. - in other words, don't attach too much
reliability on it. 8)

[And for those who don't know - why are tty atimes updated in the
first place? For 'w' 'finger' etc which report login idle times
( := now - tty atime ).]

--
Russell King
Linux kernel 2.6 ARM Linux - http://www.arm.linux.org.uk/
maintainer of: 2.6 PCMCIA - http://pcmcia.arm.linux.org.uk/
2.6 Serial core
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/