Re: [patch V6 04/37] x86: Make hardware latency tracing explicit

From: Thomas Gleixner
Date: Wed May 20 2020 - 18:20:50 EST


Andy Lutomirski <luto@xxxxxxxxxxxxxx> writes:
>> On May 20, 2020, at 1:10 PM, Thomas Gleixner <tglx@xxxxxxxxxxxxx> wrote:
>> ïPeter Zijlstra <peterz@xxxxxxxxxxxxx> writes:
>>> We probably have to anyway. But I can do that later I suppose.
>>
>> Second thoughts. For #DB and #INT3 we can just keep nmi_enter(), needs
>> just annotation in nmi_enter() around that trace muck.
>>
>> For #NMI and #MCE I rather avoid the early trace call and do it once we
>> have reached "stable" state, i.e. avoid it in the whole nested NMI mess.
>
> Whatâs the issue? The actual meat is mostly in the asm for NMI, and
> for MCE itâs just the sync-all-the-cores thing. The actual
> simultaneous NMI-and-MCE case is utterly busted regardless, and Iâve
> been thinking about how to fix it. It wonât be pretty, but nmi_enter()
> will have nothing to do with it.

The issue is that I want to avoid anything which is not essential just
for pure paranoia reasons.

I can drop that and just move the trace muck after RCU is safe and
annotate it properly.