• Andrew Morton's avatar
    [PATCH] inode a/c/mtime modification speedup · fd2134bb
    Andrew Morton authored
    For some filesystems (ext3, reiserfs at least), ->dirty_inode() is very
    expensive.  The kernel is currently calling mark_inode_dirty() at up to 1000
    times/sec/inode.  But there is no need to do this if the filesystem cannot
    store high-resolution times on-disk.
    
    This patch restores the optimisation of only dirtying the filesystem inode
    when its on-disk representation has actually changed.
    
    The filesystem will set the MS_ONE_SECOND flag in sb->s_flags to indicate
    that it wishes to receive this treatment.
    
    The patch does reduce the call rate to ext3_mark_inode_dirty() from 1000/sec
    to 1/sec, but it doesn't make much difference at all to performance because
    we're calling ext3_mark_inode_dirty() from other callsites as well.  Those
    can be optimised too.
    fd2134bb
inode.c 34 KB