Re: [RESEND PATCH V3] perf/x86: Consider pinned events for group validation

From: Peter Zijlstra
Date: Fri Jan 17 2020 - 03:58:53 EST


On Thu, Jan 16, 2020 at 11:00:25AM -0800, kan.liang@xxxxxxxxxxxxxxx wrote:
> From: Kan Liang <kan.liang@xxxxxxxxxxxxxxx>
>
> perf stat -M metrics relies on weak groups to reject unschedulable
> groups and run them as non-groups.
> This uses the group validation code in the kernel. Unfortunately
> that code doesn't take pinned events, such as the NMI watchdog, into
> account. So some groups can pass validation, but then later still
> never schedule.
>
> For example,
>
> $echo 1 > /proc/sys/kernel/nmi_watchdog
> $perf stat -M Page_Walks_Utilization
>
> Performance counter stats for 'system wide':
>
> <not counted> itlb_misses.walk_pending
> (0.00%)
> <not counted> dtlb_load_misses.walk_pending
> (0.00%)
> <not counted> dtlb_store_misses.walk_pending
> (0.00%)
> <not counted> ept.walk_pending
> (0.00%)
> <not counted> cycles
> (0.00%)
>
> 1.176613558 seconds time elapsed

More unreadable mess.