From: Richard Weinberger <richard@nod.at>
To: Christoph Hellwig <hch@lst.de>
Cc: viro@zeniv.linux.org.uk, dchinner@redhat.com,
eric.dumazet@gmail.com, linux-fsdevel@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] fs/inode: No need to take ->i_lock right after alloc_inode()
Date: Fri, 10 Jan 2014 10:48:57 +0100 [thread overview]
Message-ID: <14058048.nDrCfeHD0z@sandpuppy> (raw)
In-Reply-To: <20140110092229.GA556@lst.de>
Am Freitag, 10. Januar 2014, 10:22:29 schrieb Christoph Hellwig:
> On Wed, Jan 08, 2014 at 11:21:13AM +0100, Richard Weinberger wrote:
> > > In all three cases, new_inode_pseudo(), iget_locked() and
> > > iget5_locked(),
> > > we own the new inode exclusively at this point and therefore taking
> > > ->i_lock to protect ->i_state/->i_hash against concurrent access is
> > > superfluous.
>
> We'd still need some sort of barrier to make sure the state is visible
> to all CPUs before it becomes visible, usually by another spin_unlock
> happing later. If you have a workload where removing these is critical
> please document these issues in the code and resubmit it with an explanation
> of the workload where it helps. If it's just a cleanup I wouldn't bother
> with it.
The patch was indented as cleanup patch, but as you pointed out I've failed to
think about the barrier.
Let's drop the patch. :D
Thanks,
//richard
prev parent reply other threads:[~2014-01-10 9:49 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-12-14 20:54 [PATCH] fs/inode: No need to take ->i_lock right after alloc_inode() Richard Weinberger
2014-01-08 10:21 ` Richard Weinberger
2014-01-10 9:22 ` Christoph Hellwig
2014-01-10 9:48 ` Richard Weinberger [this message]
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=14058048.nDrCfeHD0z@sandpuppy \
--to=richard@nod.at \
--cc=dchinner@redhat.com \
--cc=eric.dumazet@gmail.com \
--cc=hch@lst.de \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--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).