From: Steven Rostedt <rostedt@goodmis.org>
To: Cyrill Gorcunov <gorcunov@gmail.com>
Cc: Ingo Molnar <mingo@elte.hu>,
Peter Zijlstra <a.p.zijlstra@chello.nl>,
Don Zickus <dzickus@redhat.com>,
Stephane Eranian <eranian@google.com>,
LKML <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH -tip/perf/core] perf, x86: P4 PMU - Drop redundant WARN_ON_ONCE
Date: Wed, 06 Jul 2011 13:38:41 -0400 [thread overview]
Message-ID: <1309973921.26417.188.camel@gandalf.stny.rr.com> (raw)
In-Reply-To: <20110706172454.GJ5485@sun>
On Wed, 2011-07-06 at 21:24 +0400, Cyrill Gorcunov wrote:
> This WARN_ON_ONCE triggers a false alarm on SMP because
> nmi-watchdog uses a single global 'wd_hw_attr' variable
> to serve perf event attributes and once p4_hw_watchdog_set_attr
> has modified it subsequent calls on the rest cpus trigger
> the warning.
>
> It is safe to simply drop it since we know the caller may
> pass already altered type and config.
>
> Repoted-by: Steven Rostedt <rostedt@goodmis.org>
Repoted? Hmm, maybe symbolically I put this code in a different pot.
Reported-and-tested-by: Steven Rostedt <rostedt@goodmis.org>
-- Steve
> Signed-off-by: Cyrill Gorcunov <gorcunov@openvz.org>
> ---
> arch/x86/kernel/cpu/perf_event_p4.c | 3 ---
> 1 file changed, 3 deletions(-)
>
> Index: linux-2.6.git/arch/x86/kernel/cpu/perf_event_p4.c
> ===================================================================
> --- linux-2.6.git.orig/arch/x86/kernel/cpu/perf_event_p4.c
> +++ linux-2.6.git/arch/x86/kernel/cpu/perf_event_p4.c
> @@ -726,9 +726,6 @@ static void p4_hw_watchdog_set_attr(stru
> * that named "non-sleeping" ticks as recommended
> * by Intel SDM Vol3b.
> */
> - WARN_ON_ONCE(wd_attr->type != PERF_TYPE_HARDWARE ||
> - wd_attr->config != PERF_COUNT_HW_CPU_CYCLES);
> -
> wd_attr->type = PERF_TYPE_RAW;
> wd_attr->config =
> p4_config_pack_escr(P4_ESCR_EVENT(P4_EVENT_EXECUTION_EVENT) |
next prev parent reply other threads:[~2011-07-06 17:38 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-07-06 17:24 Cyrill Gorcunov
2011-07-06 17:38 ` Steven Rostedt [this message]
2011-07-06 17:41 ` Cyrill Gorcunov
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=1309973921.26417.188.camel@gandalf.stny.rr.com \
--to=rostedt@goodmis.org \
--cc=a.p.zijlstra@chello.nl \
--cc=dzickus@redhat.com \
--cc=eranian@google.com \
--cc=gorcunov@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
/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
all inboxes | Powered by JetHome®