Re: [PATCH -tip, final] perf, x86: Add hw_watchdog_set_attr() in asake of nmi-watchdog on P4
From: Ingo Molnar
Date: Fri Jul 08 2011 - 08:44:52 EST
* Cyrill Gorcunov <gorcunov@xxxxxxxxx> wrote:
> On Tue, Jul 05, 2011 at 03:31:05PM +0200, Ingo Molnar wrote:
> >
> > * Peter Zijlstra <a.p.zijlstra@xxxxxxxxx> wrote:
> >
> > > > So the question is, why does the NMI watchdog prevent 'perf top'
> > > > from working on a P4?
> > >
> > > because the NMI watchdog is a pinned event, you don't want to share
> > > the counter, that would be very bad, suppose you lock up when the
> > > NMI watchdog was scheduled out. Unreliably debug tools are worse
> > > than no tools.
> >
> > Yeah, indeed that explains the symptom.
> >
> > Firstly, we should fix/enhance perf top to print out an error message
> > in this case, not just hang there doing nothing.
>
> It waits for event to be scheduled, so seems first the kernel
> should have top level context-schedule-in functions changed from
> void to int (so I have admit I might be missin something here).
>
> >
> > Secondly, the proper solution would be to allow the multiplexing of
> > like-minded hw events. Here if we have two events:
> >
> > - pinned NMI watchdog, set to a period of 2 billion cycles
> > - perf top with a default of 1 khz auto-freq cycles
> >
> > We should first change the NMI watchdog to use auto-freq samples -
> > the hw_nmi_get_sample_period() looks unnecessary - if we set the NMI
> > watchdog to 1 Hz by default it should be more than enough.
>
> Should we drop tunability of watchdog period as well? At moment
> there is a way to setup period via /sys.
Well, the tunable can remain - there's some real usecases that want
to increased/decrease the frequency.
Thanks,
Ingo
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/