Re: [PATCH -v3] perf, x86: try to handle unknown nmis with running perfctrs

Don Zickus
2010-08-26T16:41:12Z

On Thu, Aug 26, 2010 at 07:34:04PM +0400, Cyrill Gorcunov wrote:
> > I'll keep looking for the race condition to better fix it.
> >
> > Cheers,
> > Don
> >
>
> Sounds promising, mind to post new inter-diff? Ie what you have
> changed from Robert's patch.

It was really in Peter's patch, just a stupid hack for now.

Cheers,
Don

diff --git a/arch/x86/kernel/cpu/perf_event_intel.c b/arch/x86/kernel/cpu/perf_event_intel.c
index 4539b4b..9e65a7b 100644
--- a/arch/x86/kernel/cpu/perf_event_intel.c
+++ b/arch/x86/kernel/cpu/perf_event_intel.c
@@ -777,7 +777,9 @@ again:

done:
intel_pmu_enable_all(0);
- return handled;
+ if (!handled)
+ return handled;
+ return ++handled;
}

static struct event_constraint *