Re: kupdate & laptop's [patch for integration of mobile-update]

Zack Weinberg (zack@bitmover.com)
Sun, 15 Aug 1999 17:13:00 -0700


Richard Gooch wrote:
> Zack Weinberg writes:
> > I'd like to see atime updates be recorded in memory but not flushed
> > back until the inode cache is shrunk, the fs is unmounted, or we
> > need to write back the inode for some other reason. Sort of like
> > the current handling of dtime in ext2. This should give the speed
> > improvement without losing the information.
>
> Except a big recursive diff can then lead to a delayed storm of
> writes. Very annoying. One of the reasons I mount with noatime.

If delayed atime is implemented correctly, this shouldn't happen. The
inodes will sit in memory until we need the memory for something else;
if your recursive diff doesn't thrash the disk cache, you're fine. If
it does thrash the cache, you were going to lose anyway.

Hmm... looking at fs/inode.c, we could do this by setting
inode->i_state & I_DIRTY in update_atime, but leaving it on the
in-use list. __mark_inode_dirty would have to move to the dirty list
irrespective of whether I_DIRTY was set or not, and we'd have to make
sure this didn't cause problems in clear_inode etc.

Incidentally: mark_inode_dirty checks i_state & I_DIRTY, then calls
__mark_inode_dirty, which grabs the inode_lock and checks it again.
Is the second check necessary?

zw

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/