lkml.org 
[lkml]   [2010]   [Aug]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH -v3] perf, x86: try to handle unknown nmis with running perfctrs
On Fri, Aug 27, 2010 at 04:05:23PM +0200, Robert Richter wrote:
> > What is funny is that this problem was masked by the
> > perf_event_nmi_handler swallowing all the nmis. I wonder if we were
> > losing events as a result of this bug too because if you think about it,
> > we processed the first event, a second event came in and we accidentally
> > ack'd it, thus dropping it on the floor.
>
> Yes, this could be the case, but only for handled counters. So it
> would be interesting to see for this case the status mask of the
> current and previous get_status call.

The status masks seem to be identical, 0x1 (and when I forced pmc0
unusable, everything was 0x2).

>
> > Now I wonder how the event was
> > ever reloaded, unless it was by accident because of how the scheduler
> > deals with perf counters (perf_start/stop all the time).
>
> The nmi might be queued be the cpu regardless of of the overflow
> state.
>
> I am wondering why this happens at all, because events are disabled by
> wrmsrl(MSR_CORE_PERF_GLOBAL_CTRL, 0). Hmm, maybe this is exactly the

Heh. Not sure why it isn't working then. Then again you shouldn't need
the loop if it was working I would think.

> reason because the nmi could fire again after reenabling the counters.
>
> Is there a reason for disabling all counters?

It would be a nice to have that way we wouldn't have to 'eat' all these
extra nmis. But I guess it isn't working correctly.

Cheers,
Don


\
 
 \ /
  Last update: 2010-08-27 17:09    [W:0.064 / U:48.848 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site