[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <3b2e234a-0c09-2c36-b555-54f3b9fd1e35@linux.intel.com>
Date: Tue, 7 Aug 2018 11:29:01 -0400
From: "Liang, Kan" <kan.liang@...ux.intel.com>
To: Peter Zijlstra <peterz@...radead.org>
Cc: tglx@...utronix.de, mingo@...hat.com, acme@...nel.org,
linux-kernel@...r.kernel.org, eranian@...gle.com,
ak@...ux.intel.com, alexander.shishkin@...ux.intel.com
Subject: Re: [PATCH 1/3] perf/x86/intel: Factor out common code of PMI handler
On 8/6/2018 2:20 PM, Peter Zijlstra wrote:
> On Mon, Aug 06, 2018 at 10:23:41AM -0700, kan.liang@...ux.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 :/
>
Yes. I went though the log. To make the WARN text pair with
perf_event_print_debug(), we open-coded WARN_ONCE()'s
one-time-only logic here since commit ae0def05ed85 ("perf/x86: Only
print PMU state when also WARN()'ing")
I think I will still keep the logic here and just fix the complaint from
checkpatch.pl.
Thanks,
Kan
Powered by blists - more mailing lists