1 From: Mathieu Desnoyers <mathieu.desnoyers@polymtl.ca>
2 Subject: Markers use rcu_read_lock_sched()
4 Use the new rcu_read_lock_sched/unlock_sched() in marker code around the call
5 site instead of preempt_disable/enable(). It helps reviewing the code more
8 Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@polymtl.ca>
9 CC: Peter Zijlstra <peterz@infradead.org>
10 CC: Paul E McKenney <paulmck@linux.vnet.ibm.com>
11 CC: akpm@linux-foundation.org
12 Acked-by: Jan Blunck <jblunck@suse.de>
14 kernel/marker.c | 16 ++++++++--------
15 1 file changed, 8 insertions(+), 8 deletions(-)
17 Index: b/kernel/marker.c
18 ===================================================================
21 @@ -103,11 +103,11 @@ void marker_probe_cb(const struct marker
25 - * preempt_disable does two things : disabling preemption to make sure
26 - * the teardown of the callbacks can be done correctly when they are in
27 - * modules and they insure RCU read coherency.
28 + * rcu_read_lock_sched does two things : disabling preemption to make
29 + * sure the teardown of the callbacks can be done correctly when they
30 + * are in modules and they insure RCU read coherency.
33 + rcu_read_lock_sched();
36 marker_probe_func *func;
37 @@ -145,7 +145,7 @@ void marker_probe_cb(const struct marker
42 + rcu_read_unlock_sched();
44 EXPORT_SYMBOL_GPL(marker_probe_cb);
46 @@ -162,7 +162,7 @@ void marker_probe_cb_noarg(const struct
47 va_list args; /* not initialized */
51 + rcu_read_lock_sched();
54 marker_probe_func *func;
55 @@ -195,7 +195,7 @@ void marker_probe_cb_noarg(const struct
56 multi[i].func(multi[i].probe_private, call_private,
57 mdata->format, &args);
60 + rcu_read_unlock_sched();
62 EXPORT_SYMBOL_GPL(marker_probe_cb_noarg);
64 @@ -560,7 +560,7 @@ static int set_marker(struct marker_entr
65 * Disable a marker and its probe callback.
66 * Note: only waiting an RCU period after setting elem->call to the empty
67 * function insures that the original callback is not used anymore. This insured
68 - * by preempt_disable around the call site.
69 + * by rcu_read_lock_sched around the call site.
71 static void disable_marker(struct marker *elem)