From: Dave Chinner <david@fromorbit.com>
To: viro@ZenIV.linux.org.uk
Cc: linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org,
eric.dumazet@gmail.com, paulmck@linux.vnet.ibm.com
Subject: fs: inode rcu freeing and hash walking V2
Date: Mon, 8 Nov 2010 18:28:21 +1100 [thread overview]
Message-ID: <1289201305-14866-1-git-send-email-david@fromorbit.com> (raw)
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
next reply other threads:[~2010-11-08 7:28 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-11-08 7:28 Dave Chinner [this message]
2010-11-08 7:28 ` [PATCH 1/4] fs: pull inode->i_lock up out of writeback_single_inode Dave Chinner
2010-11-08 7:28 ` [PATCH 2/4] fs: Convert inode slab creation to use consistent parameters Dave Chinner
2011-04-25 17:46 ` Christoph Hellwig
2010-11-08 7:28 ` [PATCH 3/4] fs: Use RCU freeing of inodes via SLAB_DESTROY_BY_RCU Dave Chinner
2010-11-08 7:28 ` [PATCH 4/4] fs: rcu protect inode hash lookups Dave Chinner
2010-11-08 8:53 ` Eric Dumazet
2010-11-08 11:10 ` Christoph Hellwig
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1289201305-14866-1-git-send-email-david@fromorbit.com \
--to=david@fromorbit.com \
--cc=eric.dumazet@gmail.com \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=paulmck@linux.vnet.ibm.com \
--cc=viro@ZenIV.linux.org.uk \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).