[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20080930054939.GB16961@Krystal>
Date: Tue, 30 Sep 2008 01:49:39 -0400
From: Mathieu Desnoyers <mathieu.desnoyers@...ymtl.ca>
To: Ingo Molnar <mingo@...e.hu>,
"Paul E. McKenney" <paulmck@...ux.vnet.ibm.com>
Cc: linux-kernel@...r.kernel.org
Subject: [PATCH] Tracepoint use rcu sched
Make tracepoints use rcu sched. (cleanup)
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@...ymtl.ca>
CC: Ingo Molnar <mingo@...e.hu>
CC: "Paul E. McKenney" <paulmck@...ux.vnet.ibm.com>
---
kernel/tracepoint.c | 15 ++++++---------
1 file changed, 6 insertions(+), 9 deletions(-)
Index: linux-2.6-lttng/kernel/tracepoint.c
===================================================================
--- linux-2.6-lttng.orig/kernel/tracepoint.c 2008-09-30 01:36:26.000000000 -0400
+++ linux-2.6-lttng/kernel/tracepoint.c 2008-09-30 01:37:29.000000000 -0400
@@ -82,10 +82,7 @@ static void tracepoint_entry_free_old(st
entry->rcu_pending = 1;
/* write rcu_pending before calling the RCU callback */
smp_wmb();
-#ifdef CONFIG_PREEMPT_RCU
- synchronize_sched(); /* Until we have the call_rcu_sched() */
-#endif
- call_rcu(&entry->rcu, free_old_closure);
+ call_rcu_sched(&entry->rcu, free_old_closure);
}
static void debug_print_probes(struct tracepoint_entry *entry)
@@ -247,9 +244,9 @@ static int remove_tracepoint(const char
if (e->refcount)
return -EBUSY;
hlist_del(&e->hlist);
- /* Make sure the call_rcu has been executed */
+ /* Make sure the call_rcu_sched has been executed */
if (e->rcu_pending)
- rcu_barrier();
+ rcu_barrier_sched();
kfree(e);
return 0;
}
@@ -349,11 +346,11 @@ int tracepoint_probe_register(const char
}
}
/*
- * If we detect that a call_rcu is pending for this tracepoint,
+ * If we detect that a call_rcu_sched is pending for this tracepoint,
* make sure it's executed now.
*/
if (entry->rcu_pending)
- rcu_barrier();
+ rcu_barrier_sched();
old = tracepoint_entry_add_probe(entry, probe);
if (IS_ERR(old)) {
ret = PTR_ERR(old);
@@ -392,7 +389,7 @@ int tracepoint_probe_unregister(const ch
if (!entry)
goto end;
if (entry->rcu_pending)
- rcu_barrier();
+ rcu_barrier_sched();
old = tracepoint_entry_remove_probe(entry, probe);
mutex_unlock(&tracepoints_mutex);
tracepoint_update_probes(); /* may update entry */
--
Mathieu Desnoyers
OpenPGP key fingerprint: 8CD5 52C3 8E3C 4140 715F BA06 3F25 A8FE 3BAE 9A68
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists