* [PATCH -tip/perf/core] perf, x86: P4 PMU - Drop redundant WARN_ON_ONCE
@ 2011-07-06 17:24 Cyrill Gorcunov
2011-07-06 17:38 ` Steven Rostedt
0 siblings, 1 reply; 3+ messages in thread
From: Cyrill Gorcunov @ 2011-07-06 17:24 UTC (permalink / raw)
To: Ingo Molnar, Peter Zijlstra, Steven Rostedt
Cc: Don Zickus, Stephane Eranian, LKML
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>
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) |
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH -tip/perf/core] perf, x86: P4 PMU - Drop redundant WARN_ON_ONCE
2011-07-06 17:24 [PATCH -tip/perf/core] perf, x86: P4 PMU - Drop redundant WARN_ON_ONCE Cyrill Gorcunov
@ 2011-07-06 17:38 ` Steven Rostedt
2011-07-06 17:41 ` Cyrill Gorcunov
0 siblings, 1 reply; 3+ messages in thread
From: Steven Rostedt @ 2011-07-06 17:38 UTC (permalink / raw)
To: Cyrill Gorcunov
Cc: Ingo Molnar, Peter Zijlstra, Don Zickus, Stephane Eranian, LKML
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) |
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH -tip/perf/core] perf, x86: P4 PMU - Drop redundant WARN_ON_ONCE
2011-07-06 17:38 ` Steven Rostedt
@ 2011-07-06 17:41 ` Cyrill Gorcunov
0 siblings, 0 replies; 3+ messages in thread
From: Cyrill Gorcunov @ 2011-07-06 17:41 UTC (permalink / raw)
To: Steven Rostedt
Cc: Ingo Molnar, Peter Zijlstra, Don Zickus, Stephane Eranian, LKML
On Wed, Jul 06, 2011 at 01:38:41PM -0400, Steven Rostedt wrote:
> 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>
>
Oh, really sorry, Steven :/ Fingers... Just to have all in place.
---
perf, x86: P4 PMU - Drop redundant WARN_ON_ONCE
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.
Reported-and-tested-by: Steven Rostedt <rostedt@goodmis.org>
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) |
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2011-07-06 17:41 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-07-06 17:24 [PATCH -tip/perf/core] perf, x86: P4 PMU - Drop redundant WARN_ON_ONCE Cyrill Gorcunov
2011-07-06 17:38 ` Steven Rostedt
2011-07-06 17:41 ` Cyrill Gorcunov
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).