[PATCH 2/2] powerpc: Add ppc64 hard lockup detector support

Scott Wood scottwood at freescale.com
Fri Apr 10 09:48:01 AEST 2015


On Thu, 2015-04-09 at 12:52 +1000, Anton Blanchard wrote:
> The hard lockup detector uses a PMU event as a periodic NMI to
> detect if we are stuck (where stuck means no timer interrupts have
> occurred).
> 
> Ben's rework of the ppc64 soft disable code has made ppc64 PMU
> exceptions a partial NMI. They can get disabled if an external
> interrupt comes in, but otherwise PMU interrupts will fire in
> interrupt disabled regions.
> 
> We disable the hard lockup detector by default for a few reasons:
> 
> - It breaks userspace event based branches on POWER8.
> - It is likely to produce false positives on KVM guests.

What causes the false positives with KVM?  I'm wondering if it makes
sense to enable this by default for book3e.

> - Since PMCs can only count to 2^31, counting cycles means we might
>   take multiple PMU exceptions per second per hardware thread even
>   if our hard lockup timeout is 10 seconds.

It'd be nice if this could be used with some event other than
PERF_COUNT_HW_CPU_CYCLES, such as something based on the timebase -- or
using the actual watchdog on book3e which would not consume a perf
counter and would be a full NMI as long as MSR[CE] is left on.

-Scott




More information about the Linuxppc-dev mailing list