Re: [PATCH -tip, final] perf, x86: Add hw_watchdog_set_attr() in asake of nmi-watchdog on P4

From: Cyrill Gorcunov
Date: Tue Jul 05 2011 - 06:34:12 EST


On Tue, Jul 05, 2011 at 12:20:17PM +0200, Ingo Molnar wrote:
>
> * Cyrill Gorcunov <gorcunov@xxxxxxxxx> wrote:
...
>
> So why don't we simply set this for all PERF_COUNT_HW_CPU_CYCLES
> events in the P4 PMU driver? That would remove half of the patch
> AFAICS.
>
> Thanks,
>
> Ingo

Unfortunately it doesn't solve the main issue -- nmi-watchdog events
and cpu clock events should be a separate events with non-intersected
ESCRs, otherwise nmi-watchdog and cpu-cycles can't operate simultaneously
like other PMUs does.

non-sleeping ticks use

[P4_EVENT_EXECUTION_EVENT] = {
.escr_msr = { MSR_P4_CRU_ESCR2, MSR_P4_CRU_ESCR3 },
.cntr = { {12, 13, 16}, {14, 15, 17}
},

while cpu-cycles

[P4_EVENT_GLOBAL_POWER_EVENTS] = {
.escr_msr = { MSR_P4_FSB_ESCR0, MSR_P4_FSB_ESCR1 },
.cntr = { {0, -1, -1}, {2, -1, -1} },
},

Note non-intersection of { MSR_P4_CRU_ESCR2, MSR_P4_CRU_ESCR3 } and
{ MSR_P4_FSB_ESCR0, MSR_P4_FSB_ESCR1 } here (together with counters
itselves pointed by .cntr).

Cyrill
--
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/