public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: "Liang, Kan" <kan.liang@linux.intel.com>
To: Peter Zijlstra <peterz@infradead.org>
Cc: tglx@linutronix.de, mingo@redhat.com, acme@kernel.org,
	linux-kernel@vger.kernel.org, eranian@google.com,
	ak@linux.intel.com, alexander.shishkin@linux.intel.com
Subject: Re: [PATCH 1/3] perf/x86/intel: Factor out common code of PMI handler
Date: Tue, 7 Aug 2018 11:29:01 -0400	[thread overview]
Message-ID: <3b2e234a-0c09-2c36-b555-54f3b9fd1e35@linux.intel.com> (raw)
In-Reply-To: <20180806182055.GQ2494@hirez.programming.kicks-ass.net>



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

      reply	other threads:[~2018-08-07 15:29 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-08-06 17:23 [PATCH 1/3] perf/x86/intel: Factor out common code of PMI handler kan.liang
2018-08-06 17:23 ` [PATCH 2/3] x86, perf: Add a separate Arch Perfmon v4 " kan.liang
2018-08-06 18:35   ` Peter Zijlstra
2018-08-06 21:33     ` Andi Kleen
2018-08-06 21:50       ` Peter Zijlstra
2018-08-07 15:29     ` Liang, Kan
2018-08-07 17:31       ` Peter Zijlstra
2018-08-06 17:23 ` [PATCH 3/3] perf/x86/intel: Add quirk for Goldmont Plus kan.liang
2018-08-06 18:39   ` Peter Zijlstra
2018-08-07 15:30     ` Liang, Kan
2018-08-06 18:20 ` [PATCH 1/3] perf/x86/intel: Factor out common code of PMI handler Peter Zijlstra
2018-08-07 15:29   ` Liang, Kan [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=3b2e234a-0c09-2c36-b555-54f3b9fd1e35@linux.intel.com \
    --to=kan.liang@linux.intel.com \
    --cc=acme@kernel.org \
    --cc=ak@linux.intel.com \
    --cc=alexander.shishkin@linux.intel.com \
    --cc=eranian@google.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=peterz@infradead.org \
    --cc=tglx@linutronix.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox