lkml.org 
[lkml]   [2015]   [Apr]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] smp/call: Detect stuck CSD locks

* Chris J Arges <chris.j.arges@canonical.com> 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


\
 
 \ /
  Last update: 2015-04-16 19:01    [W:0.118 / U:3.604 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site