Skip to content

Commit 969043a

Browse files
committed
tracing: Do not use per CPU array_buffer.data->disabled for cpumask
The per CPU "disabled" value was the original way to disable tracing when the tracing subsystem was first created. Today, the ring buffer infrastructure has its own way to disable tracing. In fact, things have changed so much since 2008 that many things ignore the disable flag. Do not bother setting the per CPU disabled flag of the array_buffer data to use to determine what CPUs can write to the buffer and only rely on the ring buffer code itself to disabled it. Cc: Masami Hiramatsu <[email protected]> Cc: Mark Rutland <[email protected]> Cc: Mathieu Desnoyers <[email protected]> Cc: Andrew Morton <[email protected]> Link: https://lore.kernel.org/[email protected] Signed-off-by: Steven Rostedt (Google) <[email protected]>
1 parent f62e3de commit 969043a

File tree

1 file changed

+0
-2
lines changed

1 file changed

+0
-2
lines changed

kernel/trace/trace.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5081,15 +5081,13 @@ int tracing_set_cpumask(struct trace_array *tr,
50815081
*/
50825082
if (cpumask_test_cpu(cpu, tr->tracing_cpumask) &&
50835083
!cpumask_test_cpu(cpu, tracing_cpumask_new)) {
5084-
atomic_inc(&per_cpu_ptr(tr->array_buffer.data, cpu)->disabled);
50855084
ring_buffer_record_disable_cpu(tr->array_buffer.buffer, cpu);
50865085
#ifdef CONFIG_TRACER_MAX_TRACE
50875086
ring_buffer_record_disable_cpu(tr->max_buffer.buffer, cpu);
50885087
#endif
50895088
}
50905089
if (!cpumask_test_cpu(cpu, tr->tracing_cpumask) &&
50915090
cpumask_test_cpu(cpu, tracing_cpumask_new)) {
5092-
atomic_dec(&per_cpu_ptr(tr->array_buffer.data, cpu)->disabled);
50935091
ring_buffer_record_enable_cpu(tr->array_buffer.buffer, cpu);
50945092
#ifdef CONFIG_TRACER_MAX_TRACE
50955093
ring_buffer_record_enable_cpu(tr->max_buffer.buffer, cpu);

0 commit comments

Comments
 (0)