lkml.org 
[lkml]   [2008]   [Oct]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: SLUB defrag pull request?
    Miklos Szeredi wrote:
    >
    >>> It should be the other way round: first make sure nothing is
    >>> referencing the inode, and _then_ start cleaning it up with
    >>> appropriate locks held. See prune_icache().

    The code was initially taken from prune_icache.

    >> kick_inodes() only works on inodes that first have undergone
    >> get_inodes() where we establish a refcount under inode_lock(). The final
    >> cleanup in kick_inodes() is done under iprune_mutex. You are looking at
    >> the loop that does writeback and invalidates attached dentries. This can
    >> fail for various reasons.
    >
    > Yes, but I'm not at all sure that calling remove_inode_buffers() or
    > invalidate_mapping_pages() is OK on a live inode. They should be done
    > after checking the refcount, just like prune_icache() does.

    Dont we do the same on a truncate?

    > Also, while d_invalidate() is not actually wrong here, because you
    > check S_ISDIR(), but it's still the wrong function to use. You really
    > just want to shrink the children. Invalidation means: the filesystem
    > found out that the cached inode is invalid, so we want to throw it
    > away. In the future it might actually be able to do it for
    > directories as well, but currently it cannot because of possible
    > mounts on the dentry.

    Thats the same issue as with the dentries. The new function could deal with
    both situations?




    \
     
     \ /
      Last update: 2008-10-20 17:03    [W:3.617 / U:0.128 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site