Re: [PATCH] smp/call: Detect stuck CSD locks
From: Ingo Molnar
Date: Thu Apr 16 2015 - 12:31:55 EST
* Chris J Arges <chris.j.arges@xxxxxxxxxxxxx> wrote:
> A previous backtrace of a 3.19 series kernel is here and showing interrupts
> enabled on both CPUs on L1:
> https://lkml.org/lkml/2015/2/23/234
> http://people.canonical.com/~inaddy/lp1413540/BACKTRACES.txt
>
> [...]
>
> Yes, I think at this point I'll go through the various backtraces
> and try to narrow things down. I think overall we're seeing a single
> effect from multiple code paths.
Now what would be nice is to observe it whether the CPU that is not
doing the CSD wait is truly locked up.
It might be executing random KVM-ish workloads and the various
backtraces we've seen so far are just a random sample of those
workloads (from L1's perspective).
Yet the fact that the kdump's NMI gets through is a strong indication
that the CPU's APIC is fine: NMIs are essentially IPIs too, they just
go to the NMI vector, which punches through irqs-off regions.
So maybe another debug trick would be useful: instead of re-sending
the IPI, send a single non-destructive NMI every second or so,
creating a backtrace on the other CPU. From that we'll be able to see
whether it's locked up permanently in an irqs-off section.
I.e. basically you could try to trigger the 'show NMI backtraces on
all CPUs' logic when the lockup triggers, and repeat it every couple
of seconds.
The simplest method to do that would be to call:
trigger_all_cpu_backtrace();
every couple of seconds, in the CSD polling loop - after the initial
timeout has passed. I'd suggest to collect at least 10 pairs of
backtraces that way.
Thanks,
Ingo
--
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/