On Wed, 12 Apr 2023 02:27:53 +0000 Tze-nan Wu (吳澤南) Tze-nan.Wu@mediatek.com wrote:
@@ -5368,7 +5372,7 @@ void ring_buffer_reset_online_cpus(struct trace_buffer *buffer) /* Make sure all commits have finished */ synchronize_rcu();
for_each_online_buffer_cpu(buffer, cpu) {
for_each_cpu_and(cpu, buffer->cpumask, &reset_online_cpumask)
Maybe we should use for_each_buffer_cpu(buffer, cpu) here? since a CPU may also came offline during synchronize_rcu().
Yeah, I guess that works too (not looking at the code at the moment though).
-- Steve
{ cpu_buffer = buffer->buffers[cpu];