From: Al Viro <viro@zeniv.linux.org.uk>
To: David Howells <dhowells@redhat.com>
Cc: linux-afs@lists.infradead.org, linux-ext4@vger.kernel.org,
linux-ntfs-dev@lists.sourceforge.net,
linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 3/6] vfs: Allow searching of the icache under RCU conditions [ver #2]
Date: Thu, 25 Apr 2019 16:19:11 +0100 [thread overview]
Message-ID: <20190425151911.GR2217@ZenIV.linux.org.uk> (raw)
In-Reply-To: <155620453168.4720.4510967359017466912.stgit@warthog.procyon.org.uk>
On Thu, Apr 25, 2019 at 04:02:11PM +0100, David Howells wrote:
> Allow searching of the inode cache under RCU conditions - but with a
> footnote that this is redone under lock under certain conditions.
>
> The following changes are made:
>
> (1) Use hlist_add_head_rcu() and hlist_del_init_rcu() to add and remove
> an inode to/from a bucket.
>
> (2) In rehash_inode(), called by Coda to change the identifying parameters
> on an inode during resolution of disconnected operation, lock
> inode_hash_lock with write_seqlock(), which takes the spinlock and
> bumps the sequence counter.
>
> (3) Provide __find_inode_rcu() and __find_inode_by_ino rcu() which do an
> RCU-safe crawl through a hash bucket.
>
> (4) Provide find_inode_rcu() and find_inode_by_ino_rcu() which do a
> read_seqbegin_or_lock() conditional lock-loop on inode_hash_lock to
> cover searching the icache. Normally this will work without needing
> to retry, but in case (4), where an inode may be moved between lists,
> we need to retry with the lock held.
Hmm... Why do these stores to ->i_state need WRITE_ONCE, while an arseload
of similar in fs/fs-writeback.c does not?
next prev parent reply other threads:[~2019-04-25 15:19 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-04-25 15:01 [PATCH 0/6] vfs: Make icache searchable under RCU [ver #2] David Howells
2019-04-25 15:01 ` [PATCH 1/6] vfs, coda: Fix the lack of locking in FID replacement inode rehashing " David Howells
2019-04-25 15:01 ` [PATCH 2/6] vfs: Change inode_hash_lock to a seqlock " David Howells
2019-04-25 15:02 ` [PATCH 3/6] vfs: Allow searching of the icache under RCU conditions " David Howells
2019-04-25 15:19 ` Al Viro [this message]
2019-04-25 15:45 ` David Howells
2019-04-25 15:02 ` [PATCH 4/6] afs: Use RCU inode cache search for callback resolution " David Howells
2019-04-25 15:02 ` [PATCH 5/6] ext4: Search for an inode to update under the RCU lock if we can " David Howells
2019-04-25 15:02 ` [PATCH 6/6] vfs: Delete find_inode_nowait() " David Howells
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=20190425151911.GR2217@ZenIV.linux.org.uk \
--to=viro@zeniv.linux.org.uk \
--cc=dhowells@redhat.com \
--cc=linux-afs@lists.infradead.org \
--cc=linux-ext4@vger.kernel.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-ntfs-dev@lists.sourceforge.net \
/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