Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

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 <mhiramat@kernel.org>
Cc: Mark Rutland <mark.rutland@arm.com>
Cc: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Cc: Andrew Morton <akpm@linux-foundation.org>
Link: https://lore.kernel.org/20250505212235.885452497@goodmis.org
Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org>

-2
-2
kernel/trace/trace.c
··· 5081 5081 */ 5082 5082 if (cpumask_test_cpu(cpu, tr->tracing_cpumask) && 5083 5083 !cpumask_test_cpu(cpu, tracing_cpumask_new)) { 5084 - atomic_inc(&per_cpu_ptr(tr->array_buffer.data, cpu)->disabled); 5085 5084 ring_buffer_record_disable_cpu(tr->array_buffer.buffer, cpu); 5086 5085 #ifdef CONFIG_TRACER_MAX_TRACE 5087 5086 ring_buffer_record_disable_cpu(tr->max_buffer.buffer, cpu); ··· 5088 5089 } 5089 5090 if (!cpumask_test_cpu(cpu, tr->tracing_cpumask) && 5090 5091 cpumask_test_cpu(cpu, tracing_cpumask_new)) { 5091 - atomic_dec(&per_cpu_ptr(tr->array_buffer.data, cpu)->disabled); 5092 5092 ring_buffer_record_enable_cpu(tr->array_buffer.buffer, cpu); 5093 5093 #ifdef CONFIG_TRACER_MAX_TRACE 5094 5094 ring_buffer_record_enable_cpu(tr->max_buffer.buffer, cpu);