Skip to content
  • Josef Bacik's avatar
    inode: add hlist_fake to avoid the inode hash lock in evict · cbedaac6
    Josef Bacik authored
    
    
    Some filesystems don't use the VFS inode hash and fake the fact they
    are hashed so that all the writeback code works correctly. However,
    this means the evict() path still tries to remove the inode from the
    hash, meaning that the inode_hash_lock() needs to be taken
    unnecessarily. Hence under certain workloads the inode_hash_lock can
    be contended even if the inode is never actually hashed.
    
    To avoid this add hlist_fake to test if the inode isn't actually
    hashed to avoid taking the hash lock on inodes that have never been
    hashed.  Based on Dave Chinner's
    
    inode: add IOP_NOTHASHED to avoid inode hash lock in evict
    
    basd on Al's suggestions.  Thanks,
    
    Signed-off-by: default avatarJosef Bacik <jbacik@fb.com>
    Reviewed-by: default avatarJan Kara <jack@suse.cz>
    Reviewed-by: default avatarChristoph Hellwig <hch@lst.de>
    Tested-by: default avatarDave Chinner <dchinner@redhat.com>
    cbedaac6