lkml.org 
[lkml]   [2018]   [Aug]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH 1/3] perf/x86/intel: Factor out common code of PMI handler
From
Date


On 8/6/2018 2:20 PM, Peter Zijlstra wrote:
> 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 :/
>

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

\
 
 \ /
  Last update: 2018-08-07 17:29    [W:0.140 / U:8.932 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site