linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Ingo Molnar <mingo@kernel.org>
To: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Josh Triplett <josh@joshtriplett.org>,
	Al Viro <viro@zeniv.linux.org.uk>,
	linux-fsdevel <linux-fsdevel@vger.kernel.org>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	Paul McKenney <paulmck@linux.vnet.ibm.com>
Subject: Re: [PATCH 17/17] RCU'd vfsmounts
Date: Fri, 4 Oct 2013 08:41:06 +0200	[thread overview]
Message-ID: <20131004064106.GG11399@gmail.com> (raw)
In-Reply-To: <CA+55aFw6DURpj+0Z9pJZdu+VX1Eas8=2AOqamQfR-5S+giyicw@mail.gmail.com>


* Linus Torvalds <torvalds@linux-foundation.org> wrote:

> On Thu, Oct 3, 2013 at 5:41 PM, Josh Triplett <josh@joshtriplett.org> wrote:
> >
> > Read, yes, but I don't think that's enough to force your example above 
> > to work in all cases.  That requires semantics beyond what RCU's 
> > primitives guarantee, and I don't think you can draw conclusions about 
> > those semantics without talking about CPU memory barriers.
> 
> We seriosly depend on nothing leaking out. Not just reads. The "U" in 
> RCU is "update". So it's reads, and it's writes. The fact that it says 
> "read" in "rcu_read_lock()" doesn't mean that only reads would be 
> affected.
> 
> And no, this still has nothing to do with memory barriers. Every single 
> RCU user depends on the memory freeing being delayed by RCU, for 
> example. And again, that's not just reads. It's people taking spinlocks 
> on things that are RCU-protected etc.
> 
> So no, there is no question about this. The only question would be 
> whether we have some RCU mode that is _buggy_, not whether you need 
> extra memory barriers. And that is certainly possible.

Broken RCU modes are not unheard of, but Paul is extremely methodical 
about testing and reviewing all the details - including formal proof 
testing methods. There are lots of high-profile, high-frequency RCU users 
in the kernel that make use of every aspect of RCU semantics and any 
breakage would affect them as well.

There are over 2000 RCU critical sections in the kernel today, so the 
likelyhood of the VFS triggering an unknown bug, without other users 
breaking already, is fairly low. If it happens it will be fixed like other 
RCU bugs.

So I really wouldn't worry about it too much. If you don't mind the 
additional sys_umount() delay then RCU is goodness.

Thanks,

	Ingo

  reply	other threads:[~2013-10-04  6:41 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-10-03  6:20 [PATCH 17/17] RCU'd vfsmounts Al Viro
     [not found] ` <CA+55aFzeDP6J4ekdn4-85yoXzX3xmEp_qc3npvqepJM+MFn=6Q@mail.gmail.com>
     [not found]   ` <20131003105130.GE13318@ZenIV.linux.org.uk>
     [not found]     ` <CA+55aFzh+n_2fs=aWcT_5gnLC_pWSHqQPJeQ+fg=+Xw7ib9=dQ@mail.gmail.com>
     [not found]       ` <20131003174439.GG13318@ZenIV.linux.org.uk>
2013-10-03 19:06         ` Linus Torvalds
2013-10-03 19:43           ` Al Viro
2013-10-03 20:19             ` Linus Torvalds
2013-10-03 20:41               ` Al Viro
2013-10-03 20:52                 ` Linus Torvalds
2013-10-03 21:14                   ` Al Viro
2013-10-04  2:53                     ` Al Viro
2013-10-04  8:37                       ` Christoph Hellwig
2013-10-04 12:58                         ` Al Viro
2013-10-04 14:00                           ` Christoph Hellwig
2013-10-03 23:28                   ` Josh Triplett
2013-10-03 23:51                     ` Linus Torvalds
2013-10-04  0:41                       ` Josh Triplett
2013-10-04  0:45                         ` Linus Torvalds
2013-10-04  6:41                           ` Ingo Molnar [this message]
2013-10-04  5:29                     ` Paul E. McKenney
2013-10-04  6:03                       ` Josh Triplett
2013-10-04  6:15                         ` Paul E. McKenney
2013-10-04  7:04                           ` Josh Triplett

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=20131004064106.GG11399@gmail.com \
    --to=mingo@kernel.org \
    --cc=josh@joshtriplett.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=paulmck@linux.vnet.ibm.com \
    --cc=torvalds@linux-foundation.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).