Mirror of the lttng-dev mailing list
 help / color / mirror / Atom feed
From: paulmck@linux.vnet.ibm.com (Paul E. McKenney)
Subject: [ltt-dev] [rp] [PATCH RFC urcu 1/2] Provide pthread_atfork-friendly interfaces
Date: Mon, 4 Apr 2011 21:11:27 -0700	[thread overview]
Message-ID: <20110405041127.GB3125@linux.vnet.ibm.com> (raw)
In-Reply-To: <BLU0-SMTP27EA77FA8AD9A87249AAF496BE0@phx.gbl>

On Fri, Apr 01, 2011 at 04:52:50PM -0400, Mathieu Desnoyers wrote:
> * Paul E. McKenney (paulmck at linux.vnet.ibm.com) wrote:
> > Provides call_rcu_before_fork() and call_rcu_after_fork_parent() to
> > go with the existing call_rcu_after_fork_child().
> > 
> > Signed-off-by: Paul E. McKenney <paulmck at linux.vnet.ibm.com>
> > ---
> >  README          |    4 ++++
> >  urcu-call-rcu.c |   29 ++++++++++++++++++++++++++++-
> >  2 files changed, 32 insertions(+), 1 deletions(-)
> > 
> > diff --git a/README b/README
> > index f7f0dec..56e98d7 100644
> > --- a/README
> > +++ b/README
> > @@ -204,3 +204,7 @@ Interaction with fork()
> >  	liburcu-bp, which is designed to handle fork() by calling
> >  	rcu_bp_before_fork, rcu_bp_after_fork_parent and
> >  	rcu_bp_after_fork_child.
> > +
> > +	Applications that use call_rcu() are required to invoke
> > +	call_rcu_after_fork_child() from the child process after a
> > +	successful fork() system call that is not followed by exec().
> 
> Should you say something about the before hook, and after hook in the
> parent too ?

Good point, fixed as follows:

diff --git a/README b/README
index 56e98d7..3e23120 100644
--- a/README
+++ b/README
@@ -205,6 +205,8 @@ Interaction with fork()
 	rcu_bp_before_fork, rcu_bp_after_fork_parent and
 	rcu_bp_after_fork_child.
 
-	Applications that use call_rcu() are required to invoke
-	call_rcu_after_fork_child() from the child process after a
-	successful fork() system call that is not followed by exec().
+	Applications that use call_rcu() and that fork() without
+	doing an immediate exec() must take special action.  The parent
+	must invoke call_rcu_before_fork() before the fork() and
+	call_rcu_after_fork_parent() after the fork().  The child
+	process must invoke call_rcu_after_fork_child().



  parent reply	other threads:[~2011-04-05  4:11 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20110323183635.GA21074@linux.vnet.ibm.com>
     [not found] ` <1300905482-21272-1-git-send-email-paulmck@linux.vnet.ibm.com>
2011-04-01 20:52   ` Mathieu Desnoyers
     [not found]   ` <BLU0-SMTP27EA77FA8AD9A87249AAF496BE0@phx.gbl>
2011-04-05  4:11     ` Paul E. McKenney [this message]
2011-04-05  4:32       ` Josh Triplett
2011-04-05  5:24         ` Paul E. McKenney
2011-04-06  4:48           ` Paul E. McKenney
     [not found] ` <1300905482-21272-2-git-send-email-paulmck@linux.vnet.ibm.com>
2011-04-01 20:59   ` [ltt-dev] [rp] [PATCH RFC urcu 2/2] Map symbols to allow multiple RCU flavors to be used in one binary Mathieu Desnoyers
     [not found]   ` <BLU0-SMTP48C1EEEDB818CAFC96070D96BE0@phx.gbl>
2011-04-05  4:15     ` Paul E. McKenney

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=20110405041127.GB3125@linux.vnet.ibm.com \
    --to=paulmck@linux.vnet.ibm.com \
    /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