Re: [PATCH 00/12] perf: more fixes

From: Borislav Petkov
Date: Thu Mar 17 2016 - 07:54:40 EST


On Wed, Mar 16, 2016 at 11:59:33PM +0100, Peter Zijlstra wrote:
> On Tue, Mar 15, 2016 at 04:38:30PM +0100, Peter Zijlstra wrote:
>
> > Running perf_fuzzer on that AMD box is still producing lots of fail, I
> > seen long strings of dazed and confused msgs, indicating we have a
> > 'spurious' NMI problem somewhere.
> >
> > And occasionally it locks up..
> >
> > So we're not there yet.
>
> So the below appears to alleviate some of this; but the hangs are
> quicker now, so maybe I just made it worse.
>
> ---
> Subject: perf, ibs: Fix race with IBS_STARTING state
> From: Peter Zijlstra <peterz@xxxxxxxxxxxxx>
> Date: Wed Mar 16 23:55:21 CET 2016
>
> While tracing the IBS bits I saw the NMI hitting between clearing
> IBS_STARTING and the actual MSR writes to disable the counter.
>
> Since IBS_STARTING was cleared, the handler assumed these were spurious
> NMIs and because STOPPING wasn't set yet either, insta-triggered an
> "Unknown NMI".
>
> Cure this by clearing IBS_STARTING after disabling the hardware.
>
> Signed-off-by: Peter Zijlstra (Intel) <peterz@xxxxxxxxxxxxx>

Tested-by: Borislav Petkov <bp@xxxxxxx>

--
Regards/Gruss,
Boris.

ECO tip #101: Trim your mails when you reply.