[lkml]   [2010]   [Nov]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
    Subjectfs: inode rcu freeing and hash walking V2
    Hi Al,

    The following four patches implement the extra functionality you
    wanted on top of the inode lock breakup. They lift the i_lock up out
    of writeback_single_inode(), implements RCU freeing of inodes via
    SLAB_DESTROY_BY_RCU, converts inode hash lookup operations to use
    RCU list walks. Comments are welcome.

    I'm undecided whether passing the bucket identifier along with the
    hash head is the best way to handle the hash-chain-being-jumped
    detection. It might be cleaner to just push the hash chain
    calculation all the way in.

    Most of the changes in this version are as a result of Eric
    Dumazet's initial review.

    Version 2:
    - split the inode slabcache config changes into a separate patch.
    - convert inode hash lists to use hlist_nulls variant to enable
    simple checking of whether RCU hash list traversals jumped chains.
    - recheck i_ino and i_sb after gaining i_lock during RCU lookups to
    ensure we've got a hold of the correct inode.
    - clear i_ino when destroying an inode to allow hash lookups to
    discover freed inodes without needing to lock the inode.
    - moved inode->i_lock initialisation to slab constructor so that it
    can be safely used during RCU traversals
    - introduced hlist_nulls_add_fake() and converted filesystems to use

     \ /
      Last update: 2010-11-08 08:33    [W:0.018 / U:8.948 seconds]
    ©2003-2017 Jasper Spaans. hosted at Digital OceanAdvertise on this site