[lkml]   [2004]   [May]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
    SubjectRe: dentry bloat.
    On Sat, May 08, 2004 at 03:11:59AM -0700, Andrew Morton wrote:
    > Andrew Morton <> wrote:
    > >
    > > Here be another patch.
    > Can't help myself!
    > - d_vfs_flags can be removed - just use d_flags. It looks like someone
    > added d_vfs_flags with the intent of doing bitops on it, but all
    > modifications are under dcache_lock. 4 bytes saved.

    Bzzert. ->d_vfs_flags modifications are under dcache_lock; ->d_flags ones
    are *not* - they are up to whatever filesystem code happens to use them.

    > - Pack things so that dentry.d_name.len and dentry.d_flags occupy the same
    > word. 4 bytes saved.

    d_name.len is accessed on very hot paths. In particular, we are looking
    at it while traversing hash chains and we do that without dcache_lock
    (see callers of ->d_compare()).

    If we are going to hold dcache_lock in __d_lookup(), we can get rid of
    a _lot_ more than 2 bytes. 32 bytes that came from RCU are there pretty
    much for a single reason - to avoid dcache_lock on that path.
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to
    More majordomo info at
    Please read the FAQ at

     \ /
      Last update: 2005-03-22 14:03    [W:0.020 / U:5.420 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site