tracing: Replace synchronize_sched() and call_rcu_sched()
Now that synchronize_rcu() waits for preempt-disable regions of code as well as RCU read-side critical sections, synchronize_sched() can be replaced by synchronize_rcu(). Similarly, call_rcu_sched() can be replaced by call_rcu(). This commit therefore makes these changes. Signed-off-by: Paul E. McKenney <paulmck@linux.ibm.com> Cc: Ingo Molnar <mingo@redhat.com> Cc: <linux-kernel@vger.kernel.org> Acked-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
This commit is contained in:
parent
c93ffc15cc
commit
7440172974
7 changed files with 29 additions and 29 deletions
|
|
@ -1834,7 +1834,7 @@ int ring_buffer_resize(struct ring_buffer *buffer, unsigned long size,
|
|||
* There could have been a race between checking
|
||||
* record_disable and incrementing it.
|
||||
*/
|
||||
synchronize_sched();
|
||||
synchronize_rcu();
|
||||
for_each_buffer_cpu(buffer, cpu) {
|
||||
cpu_buffer = buffer->buffers[cpu];
|
||||
rb_check_pages(cpu_buffer);
|
||||
|
|
@ -3151,7 +3151,7 @@ static bool rb_per_cpu_empty(struct ring_buffer_per_cpu *cpu_buffer)
|
|||
* This prevents all writes to the buffer. Any attempt to write
|
||||
* to the buffer after this will fail and return NULL.
|
||||
*
|
||||
* The caller should call synchronize_sched() after this.
|
||||
* The caller should call synchronize_rcu() after this.
|
||||
*/
|
||||
void ring_buffer_record_disable(struct ring_buffer *buffer)
|
||||
{
|
||||
|
|
@ -3253,7 +3253,7 @@ bool ring_buffer_record_is_set_on(struct ring_buffer *buffer)
|
|||
* This prevents all writes to the buffer. Any attempt to write
|
||||
* to the buffer after this will fail and return NULL.
|
||||
*
|
||||
* The caller should call synchronize_sched() after this.
|
||||
* The caller should call synchronize_rcu() after this.
|
||||
*/
|
||||
void ring_buffer_record_disable_cpu(struct ring_buffer *buffer, int cpu)
|
||||
{
|
||||
|
|
@ -4191,7 +4191,7 @@ EXPORT_SYMBOL_GPL(ring_buffer_read_prepare);
|
|||
void
|
||||
ring_buffer_read_prepare_sync(void)
|
||||
{
|
||||
synchronize_sched();
|
||||
synchronize_rcu();
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(ring_buffer_read_prepare_sync);
|
||||
|
||||
|
|
@ -4363,7 +4363,7 @@ void ring_buffer_reset_cpu(struct ring_buffer *buffer, int cpu)
|
|||
atomic_inc(&cpu_buffer->record_disabled);
|
||||
|
||||
/* Make sure all commits have finished */
|
||||
synchronize_sched();
|
||||
synchronize_rcu();
|
||||
|
||||
raw_spin_lock_irqsave(&cpu_buffer->reader_lock, flags);
|
||||
|
||||
|
|
@ -4496,7 +4496,7 @@ int ring_buffer_swap_cpu(struct ring_buffer *buffer_a,
|
|||
goto out;
|
||||
|
||||
/*
|
||||
* We can't do a synchronize_sched here because this
|
||||
* We can't do a synchronize_rcu here because this
|
||||
* function can be called in atomic context.
|
||||
* Normally this will be called from the same CPU as cpu.
|
||||
* If not it's up to the caller to protect this.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue