Re: linux-next: Tree for Feb 4

From: Dave Hansen
Date: Thu Feb 05 2015 - 02:15:07 EST


On 02/04/2015 05:53 PM, Sedat Dilek wrote:
> The architecture-specific switch_mm() function can be called by offline
> CPUs, but includes event tracing, which cannot be legally carried out
> on offline CPUs. This results in a lockdep-RCU splat. This commit fixes
> this splat by omitting the tracing when the CPU is offline.
...
>>> >> > load_cr3(next->pgd);
>>> >> > - trace_tlb_flush(TLB_FLUSH_ON_TASK_SWITCH, TLB_FLUSH_ALL);
>>> >> > + if (cpu_online(smp_processor_id()))
>>> >> > + trace_tlb_flush(TLB_FLUSH_ON_TASK_SWITCH, TLB_FLUSH_ALL);

Is this, perhaps, something that we should be doing in the generic trace
code so that all of the trace users don't have to worry about it? Also,
this patch will add overhead to the code when tracing is off. It would
be best if we could manage to make the cpu_online() check only in the
cases where the tracepoint is on.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/