[PATCH tip/core/rcu 03/10] Update call_rcu() usage, add synchronize_rcu()

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Paul E. McKenney
Date: Monday, August 9, 2010 - 3:15 pm

Reported-by: Kyle Hubert <khubert@gmail.com>
Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Reviewed-by: Josh Triplett <josh@joshtriplett.org>
---
 Documentation/DocBook/kernel-locking.tmpl |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/Documentation/DocBook/kernel-locking.tmpl b/Documentation/DocBook/kernel-locking.tmpl
index e6cc574..ed64d22 100644
--- a/Documentation/DocBook/kernel-locking.tmpl
+++ b/Documentation/DocBook/kernel-locking.tmpl
@@ -1645,7 +1645,9 @@ the amount of locking which needs to be done.
       all the readers who were traversing the list when we deleted the
       element are finished.  We use <function>call_rcu()</function> to
       register a callback which will actually destroy the object once
-      the readers are finished.
+      all pre-existing readers are finished.  Alternatively,
+      <function>synchronize_rcu()</function> may be used to block until
+      all pre-existing are finished.
     </para>
     <para>
       But how does Read Copy Update know when the readers are
@@ -1714,7 +1716,7 @@ the amount of locking which needs to be done.
 -        object_put(obj);
 +        list_del_rcu(&amp;obj-&gt;list);
          cache_num--;
-+        call_rcu(&amp;obj-&gt;rcu, cache_delete_rcu, obj);
++        call_rcu(&amp;obj-&gt;rcu, cache_delete_rcu);
  }
 
  /* Must be holding cache_lock */
-- 
1.7.0.6

--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[PATCH tip/core/rcu 01/10] rcu head remove init, Paul E. McKenney, (Mon Aug 9, 3:15 pm)
[PATCH tip/core/rcu 03/10] Update call_rcu() usage, add sy ..., Paul E. McKenney, (Mon Aug 9, 3:15 pm)
[PATCH tip/core/rcu 07/10] rcu: Fix RCU_FANOUT help message, Paul E. McKenney, (Mon Aug 9, 3:15 pm)
[PATCH tip/core/rcu 08/10] rcu: Add a TINY_PREEMPT_RCU, Paul E. McKenney, (Mon Aug 9, 3:15 pm)
Re: [PATCH tip/core/rcu 09/10] rcu: update obsolete rcu_re ..., Mathieu Desnoyers, (Mon Aug 16, 7:45 am)
Re: [PATCH tip/core/rcu 08/10] rcu: Add a TINY_PREEMPT_RCU, Mathieu Desnoyers, (Mon Aug 16, 8:07 am)
Re: [PATCH tip/core/rcu 09/10] rcu: update obsolete rcu_re ..., Paul E. McKenney, (Mon Aug 16, 10:55 am)
Re: [PATCH tip/core/rcu 09/10] rcu: update obsolete rcu_re ..., Mathieu Desnoyers, (Mon Aug 16, 11:24 am)
Re: [PATCH tip/core/rcu 08/10] rcu: Add a TINY_PREEMPT_RCU, Paul E. McKenney, (Mon Aug 16, 11:33 am)
Re: [PATCH tip/core/rcu 08/10] rcu: Add a TINY_PREEMPT_RCU, Mathieu Desnoyers, (Mon Aug 16, 12:19 pm)
Re: [PATCH tip/core/rcu 08/10] rcu: Add a TINY_PREEMPT_RCU, Paul E. McKenney, (Mon Aug 16, 2:32 pm)
Re: [PATCH tip/core/rcu 08/10] rcu: Add a TINY_PREEMPT_RCU, Mathieu Desnoyers, (Mon Aug 16, 2:41 pm)
Re: [PATCH tip/core/rcu 08/10] rcu: Add a TINY_PREEMPT_RCU, Paul E. McKenney, (Mon Aug 16, 2:55 pm)
Re: [PATCH tip/core/rcu 08/10] rcu: Add a TINY_PREEMPT_RCU, Mathieu Desnoyers, (Mon Aug 16, 3:07 pm)
Re: [PATCH tip/core/rcu 08/10] rcu: Add a TINY_PREEMPT_RCU, Paul E. McKenney, (Mon Aug 16, 3:24 pm)
Re: [PATCH tip/core/rcu 08/10] rcu: Add a TINY_PREEMPT_RCU, Steven Rostedt, (Tue Aug 17, 6:27 am)
Re: [PATCH tip/core/rcu 08/10] rcu: Add a TINY_PREEMPT_RCU, Mathieu Desnoyers, (Tue Aug 17, 7:16 am)
Re: [PATCH tip/core/rcu 08/10] rcu: Add a TINY_PREEMPT_RCU, Paul E. McKenney, (Tue Aug 17, 7:35 am)
Re: [PATCH tip/core/rcu 08/10] rcu: Add a TINY_PREEMPT_RCU, Steven Rostedt, (Tue Aug 17, 7:54 am)
Re: [PATCH tip/core/rcu 08/10] rcu: Add a TINY_PREEMPT_RCU, Mathieu Desnoyers, (Tue Aug 17, 8:55 am)
Re: [PATCH tip/core/rcu 08/10] rcu: Add a TINY_PREEMPT_RCU, Steven Rostedt, (Tue Aug 17, 9:04 am)
Re: [PATCH tip/core/rcu 08/10] rcu: Add a TINY_PREEMPT_RCU, Steven Rostedt, (Tue Aug 17, 9:06 am)
Re: [PATCH tip/core/rcu 08/10] rcu: Add a TINY_PREEMPT_RCU, Mathieu Desnoyers, (Tue Aug 17, 9:25 am)
Re: [PATCH tip/core/rcu 08/10] rcu: Add a TINY_PREEMPT_RCU, Paul E. McKenney, (Tue Aug 17, 12:33 pm)
Re: [PATCH tip/core/rcu 08/10] rcu: Add a TINY_PREEMPT_RCU, Paul E. McKenney, (Tue Aug 17, 1:00 pm)