Re: [PATCH 1/3] perf/x86/intel: Factor out common code of PMI handler
From: Peter Zijlstra
Date: Mon Aug 06 2018 - 14:21:08 EST
On Mon, Aug 06, 2018 at 10:23:41AM -0700, kan.liang@xxxxxxxxxxxxxxx wrote:
> + if (++loops > 100) {
> + static bool warned;
> +
> + if (!warned) {
> + WARN(1, "perfevents: irq loop stuck!\n");
> + perf_event_print_debug();
> + warned = true;
> + }
Bah, that really reads like we want WARN_ONCE(), except for that
perf_event_print_debug() thing :/