[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20101118211949.GG6028@lenovo>
Date: Fri, 19 Nov 2010 00:19:49 +0300
From: Cyrill Gorcunov <gorcunov@...il.com>
To: Don Zickus <dzickus@...hat.com>
Cc: Robert Richter <robert.richter@....com>,
Jason Wessel <jason.wessel@...driver.com>,
Peter Zijlstra <peterz@...radead.org>,
Ingo Molnar <mingo@...e.hu>, ying.huang@...el.com,
Andi Kleen <andi@...stfloor.org>,
LKML <linux-kernel@...r.kernel.org>,
Frederic Weisbecker <fweisbec@...il.com>
Subject: Re: [V2 PATCH 0/6] x86, NMI: give NMI handler a face-lift
On Thu, Nov 18, 2010 at 04:02:31PM -0500, Don Zickus wrote:
...
> > > Don, Robert,
> > >
> > > I still have suspicious on ours 'pending' nmi handler. Look what I mean --
> > > (keep in mind that p4 has a a way more counters than others).
> > >
> >
> > To be precise -- it seems this scenario may force the back-to-back
> > nmi handler to eat unknown nmi.
>
> That was the point of the change to do exactly that.
I missed the word, I meant to eat 'real' unknown nmi, not those
generated by counters and stand 'in-fly', so that unknown_nmi_error()
will be eaten. what is worse the NMI generated by kgdb may be eaten as
well and treated as being 'pending' one, though there is quite a small
probability of such situation I believe.
>
> The problem is/was when you go to check to see if the period expired in
> x86_perf_event_set_period(), you refresh the perf counter. The next step
> is to see if the event period has expired, if so disabled the 'active'
> bit.
>
> However, there is a race between when you refresh the counter to when you
> actually disable it, such that you may cause the counter to overflow again
> and thus generate another NMI. The whole ->running thing was implemented
> by Robert to try and check for that condition and eat the NMI as we have
> no intention of handling it (because it is bogus).
>
> The alternative is to use another rdmsrl to actually see if we trigger
> another NMI. This was deemed a performance hit for such a small case.
>
> Cheers,
> Don
>
yeah, I recall now, thanks for refresh Don!
Cyrill
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists