Markers Use RCU sched
RFC PATCH 1/1 Markers Use RCU sched
rcu_barrier_sched and call_rcu_sched has been introduced in 2.6.26 for the Markers. Change the marker code to use them.
Signed-off-by Mathieu Desnoyers <[email protected]>
CC Paul McKenney <[email protected]>
CC Andrew Morton <[email protected]>
--- kernel/marker.c | 25 ++++++++----------------- 1 file changed, 8 insertions(+), 17 deletions(-)
kernel/marker.c +8 -17
@@ -442,7 +442,7 @@hlist_del (&e->hlist);/* Make sure the call_rcu has been executed */ if (e->rcu_pending) -rcu_barrier (); +rcu_barrier_sched ();kfree (e);return 0 ; }
@@ -477,7 +477,7 @@hlist_del (&(*entry)->hlist);/* Make sure the call_rcu has been executed */ if ((*entry)->rcu_pending) -rcu_barrier (); +rcu_barrier_sched ();kfree (*entry); *entry = e; trace_mark(core_marker_format, "name %s format %s",
@@ -659,7 +659,7 @@* make sure it's executed now. */ if (entry->rcu_pending) -rcu_barrier (); +rcu_barrier_sched (); old =marker_entry_add_probe (entry, probe, probe_private);if (IS_ERR (old)) { ret =PTR_ERR (old);
@@ -674,10 +674,7 @@ 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); end:mutex_unlock (&markers_mutex);return ret;
@@ -708,7 +705,7 @@if (!entry) goto end;if (entry->rcu_pending) -rcu_barrier (); +rcu_barrier_sched (); old =marker_entry_remove_probe (entry, probe, probe_private);mutex_unlock (&markers_mutex);marker_update_probes ();/* may update entry */
@@ -720,10 +717,7 @@ 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);remove_marker (name);/* Ignore busy error message */ ret =0 ; end:
@@ -790,7 +784,7 @@ goto end; }if (entry->rcu_pending) -rcu_barrier (); +rcu_barrier_sched (); old =marker_entry_remove_probe (entry,NULL , probe_private);mutex_unlock (&markers_mutex);marker_update_probes ();/* may update entry */
@@ -801,10 +795,7 @@ 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);remove_marker (entry->name);/* Ignore busy error message */ end:mutex_unlock (&markers_mutex);
Signature · 2 lines
Mathieu Desnoyers OpenPGP key fingerprint: 8CD5 52C3 8E3C 4140 715F BA06 3F25 A8FE 3BAE 9A68