[PATCH RFC tip/core/rcu 21/30] Update call_rcu() usage, add synchronize_rcu()

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Paul E. McKenney
Date: Wednesday, July 14, 2010 - 1:09 pm

Reported-by: Kyle Hubert <khubert@gmail.com>
Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
---
 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 RFC tip/core/rcu 04/30] cgroups: __rcu annotations, Paul E. McKenney, (Wed Jul 14, 1:09 pm)
[PATCH RFC tip/core/rcu 05/30] credentials: rcu annotation, Paul E. McKenney, (Wed Jul 14, 1:09 pm)
[PATCH RFC tip/core/rcu 06/30] keys: __rcu annotations, Paul E. McKenney, (Wed Jul 14, 1:09 pm)
[PATCH RFC tip/core/rcu 07/30] nfs: __rcu annotations, Paul E. McKenney, (Wed Jul 14, 1:09 pm)
[PATCH RFC tip/core/rcu 08/30] net: __rcu annotations for ..., Paul E. McKenney, (Wed Jul 14, 1:09 pm)
[PATCH RFC tip/core/rcu 09/30] perf_event: __rcu annotations, Paul E. McKenney, (Wed Jul 14, 1:09 pm)
[PATCH RFC tip/core/rcu 10/30] notifiers: __rcu annotations, Paul E. McKenney, (Wed Jul 14, 1:09 pm)
[PATCH RFC tip/core/rcu 11/30] radix-tree: __rcu annotations, Paul E. McKenney, (Wed Jul 14, 1:09 pm)
[PATCH RFC tip/core/rcu 0/30] RCU commits queued for 2.6.36/7, Paul E. McKenney, (Wed Jul 14, 1:09 pm)
[PATCH RFC tip/core/rcu 12/30] idr: __rcu annotations, Paul E. McKenney, (Wed Jul 14, 1:09 pm)
[PATCH RFC tip/core/rcu 13/30] input: __rcu annotations, Paul E. McKenney, (Wed Jul 14, 1:09 pm)
[PATCH RFC tip/core/rcu 15/30] kvm: add __rcu annotations, Paul E. McKenney, (Wed Jul 14, 1:09 pm)
[PATCH RFC tip/core/rcu 16/30] kernel: __rcu annotations, Paul E. McKenney, (Wed Jul 14, 1:09 pm)
[PATCH RFC tip/core/rcu 17/30] net: __rcu annotations, Paul E. McKenney, (Wed Jul 14, 1:09 pm)
[PATCH RFC tip/core/rcu 18/30] kvm: more __rcu annotations, Paul E. McKenney, (Wed Jul 14, 1:09 pm)
[PATCH RFC tip/core/rcu 19/30] vhost: add __rcu annotations, Paul E. McKenney, (Wed Jul 14, 1:09 pm)
[PATCH RFC tip/core/rcu 21/30] Update call_rcu() usage, ad ..., Paul E. McKenney, (Wed Jul 14, 1:09 pm)
[PATCH RFC tip/core/rcu 23/30] rcu head remove init, Paul E. McKenney, (Wed Jul 14, 1:09 pm)
[PATCH RFC tip/core/rcu 26/30] rcu: simplify the usage of ..., Paul E. McKenney, (Wed Jul 14, 1:10 pm)
[PATCH RFC tip/core/rcu 29/30] rcu: add boot parameter to ..., Paul E. McKenney, (Wed Jul 14, 1:10 pm)
[PATCH RFC tip/core/rcu 30/30] rcu: improve kerneldoc for ..., Paul E. McKenney, (Wed Jul 14, 1:10 pm)
Re: [PATCH RFC tip/core/rcu 07/30] nfs: __rcu annotations, Trond Myklebust, (Wed Jul 14, 3:07 pm)