Home
Reading
Searching
Subscribe
Sponsors
Statistics
Posting
Contact
Spam
Lists
Links
About
Hosting
Filtering
Features Download
Marketing
Archives
FAQ
Blog
 
Gmane
From: Dave Chinner <david <at> fromorbit.com>
Subject: fs: inode rcu freeing and hash walking V2
Newsgroups: gmane.linux.kernel
Date: Monday 8th November 2010 07:28:21 UTC (over 6 years ago)
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
  that
 
CD: 3ms