Re: [PATCH 1/3] perf/x86/intel: Factor out common code of PMI handler

Peter Zijlstra
2018-08-06T18:21:07Z

On Mon, Aug 06, 2018 at 10:23:41AM -0700, kan.liang@linux.intel.com 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 :/