WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-changelog

[Xen-changelog] [xen-unstable] rcupdate: Implement rcu_barrier() to sync

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] rcupdate: Implement rcu_barrier() to synchronously flush RCU work.
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Mon, 17 Jan 2011 08:00:34 -0800
Delivery-date: Mon, 17 Jan 2011 08:21:14 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# HG changeset patch
# User Keir Fraser <keir@xxxxxxx>
# Date 1295014602 0
# Node ID bb0d0141ebf7f4ffec54c0c5775e964a41978a4c
# Parent  2d4fe1a048cd8ae4c8aa0a50f65d0211c8ecf4d2
rcupdate: Implement rcu_barrier() to synchronously flush RCU work.

Signed-off-by: Keir Fraser <keir@xxxxxxx>
---
 xen/common/rcupdate.c      |   25 +++++++++++++++++++++++++
 xen/include/xen/rcupdate.h |    2 ++
 2 files changed, 27 insertions(+)

diff -r 2d4fe1a048cd -r bb0d0141ebf7 xen/common/rcupdate.c
--- a/xen/common/rcupdate.c     Fri Jan 14 14:16:04 2011 +0000
+++ b/xen/common/rcupdate.c     Fri Jan 14 14:16:42 2011 +0000
@@ -44,6 +44,7 @@
 #include <xen/percpu.h>
 #include <xen/softirq.h>
 #include <xen/cpu.h>
+#include <xen/stop_machine.h>
 
 /* Definition for rcupdate control block. */
 struct rcu_ctrlblk rcu_ctrlblk = {
@@ -59,6 +60,30 @@ static int qhimark = 10000;
 static int qhimark = 10000;
 static int qlowmark = 100;
 static int rsinterval = 1000;
+
+static int rcu_barrier_action(void *unused)
+{
+    unsigned int cpu = smp_processor_id();
+
+    ASSERT(!local_irq_is_enabled());
+    local_irq_enable();
+
+    while ( rcu_needs_cpu(cpu) )
+    {
+        rcu_check_callbacks(cpu);
+        process_pending_softirqs();
+        cpu_relax();
+    }
+
+    local_irq_disable();
+
+    return 0;
+}
+
+int rcu_barrier(void)
+{
+    return stop_machine_run(rcu_barrier_action, NULL, NR_CPUS);
+}
 
 static void force_quiescent_state(struct rcu_data *rdp,
                                   struct rcu_ctrlblk *rcp)
diff -r 2d4fe1a048cd -r bb0d0141ebf7 xen/include/xen/rcupdate.h
--- a/xen/include/xen/rcupdate.h        Fri Jan 14 14:16:04 2011 +0000
+++ b/xen/include/xen/rcupdate.h        Fri Jan 14 14:16:42 2011 +0000
@@ -197,4 +197,6 @@ void fastcall call_rcu(struct rcu_head *
 void fastcall call_rcu(struct rcu_head *head, 
                        void (*func)(struct rcu_head *head));
 
+int rcu_barrier(void);
+
 #endif /* __XEN_RCUPDATE_H */

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [xen-unstable] rcupdate: Implement rcu_barrier() to synchronously flush RCU work., Xen patchbot-unstable <=