lkml.org 
[lkml]   [2001]   [Nov]   [30]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    SubjectRe: [patch] smarter atime updates
    From
    Date
    Hi,

    Andrew Morton <akpm@zip.com.au> writes:

    > mark_inode_dirty() is quite expensive for journalling filesystems,
    > and we're calling it a lot more than we need to.
    >
    > --- linux-2.4.17-pre1/fs/inode.c Mon Nov 26 11:52:07 2001
    > +++ linux-akpm/fs/inode.c Thu Nov 29 21:53:02 2001
    > @@ -1187,6 +1187,8 @@ void __init inode_init(unsigned long mem
    >
    > void update_atime (struct inode *inode)
    > {
    > + if (inode->i_atime == CURRENT_TIME)
    > + return;
    > if ( IS_NOATIME (inode) ) return;
    > if ( IS_NODIRATIME (inode) && S_ISDIR (inode->i_mode) ) return;
    > if ( IS_RDONLY (inode) ) return;

    in include/linux/fs.h:

    #define UPDATE_ATIME(inode) \
    do { \
    if ((inode)->i_atime != CURRENT_TIME) \
    update_atime (inode); \
    } while (0)

    How about this macro? (add likely()?)
    --
    OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>
    -
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at http://www.tux.org/lkml/

    \
     
     \ /
      Last update: 2005-03-22 13:18    [W:0.023 / U:32.276 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site