From: Ingo Molnar <mingo@elte.hu>
To: Cyrill Gorcunov <gorcunov@gmail.com>
Cc: Don Zickus <dzickus@redhat.com>,
Stephane Eranian <eranian@google.com>,
Lin Ming <ming.m.lin@intel.com>,
Peter Zijlstra <a.p.zijlstra@chello.nl>,
Arnaldo Carvalho de Melo <acme@redhat.com>,
Frederic Weisbecker <fweisbec@gmail.com>,
LKML <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH -tip, final] perf, x86: Add hw_watchdog_set_attr() in a sake of nmi-watchdog on P4
Date: Tue, 5 Jul 2011 12:20:17 +0200 [thread overview]
Message-ID: <20110705102017.GA12458@elte.hu> (raw)
In-Reply-To: <20110705100320.GK17941@sun>
* Cyrill Gorcunov <gorcunov@gmail.com> wrote:
> +static void p4_hw_watchdog_set_attr(struct perf_event_attr *wd_attr)
> +{
> + /*
> + * Watchdog ticks are special on Netburst, we use
> + * 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) |
> + P4_ESCR_EMASK_BIT(P4_EVENT_EXECUTION_EVENT, NBOGUS0) |
> + P4_ESCR_EMASK_BIT(P4_EVENT_EXECUTION_EVENT, NBOGUS1) |
> + P4_ESCR_EMASK_BIT(P4_EVENT_EXECUTION_EVENT, NBOGUS2) |
> + P4_ESCR_EMASK_BIT(P4_EVENT_EXECUTION_EVENT, NBOGUS3) |
> + P4_ESCR_EMASK_BIT(P4_EVENT_EXECUTION_EVENT, BOGUS0) |
> + P4_ESCR_EMASK_BIT(P4_EVENT_EXECUTION_EVENT, BOGUS1) |
> + P4_ESCR_EMASK_BIT(P4_EVENT_EXECUTION_EVENT, BOGUS2) |
> + P4_ESCR_EMASK_BIT(P4_EVENT_EXECUTION_EVENT, BOGUS3)) |
> + p4_config_pack_cccr(P4_CCCR_THRESHOLD(15) | P4_CCCR_COMPLEMENT |
> + P4_CCCR_COMPARE);
> +}
So why don't we simply set this for all PERF_COUNT_HW_CPU_CYCLES
events in the P4 PMU driver? That would remove half of the patch
AFAICS.
Thanks,
Ingo
next prev parent reply other threads:[~2011-07-05 10:20 UTC|newest]
Thread overview: 29+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-07-05 10:03 [PATCH -tip, final] perf, x86: Add hw_watchdog_set_attr() in a sake of nmi-watchdog on P4 Cyrill Gorcunov
2011-07-05 10:20 ` Ingo Molnar [this message]
2011-07-05 10:34 ` Cyrill Gorcunov
2011-07-05 10:59 ` Ingo Molnar
2011-07-05 11:05 ` Cyrill Gorcunov
2011-07-05 11:20 ` Ingo Molnar
2011-07-05 11:36 ` Cyrill Gorcunov
2011-07-05 11:44 ` Ingo Molnar
2011-07-05 11:49 ` Cyrill Gorcunov
2011-07-05 12:14 ` Cyrill Gorcunov
2011-07-05 13:10 ` Ingo Molnar
2011-07-05 13:17 ` Peter Zijlstra
2011-07-05 13:31 ` Ingo Molnar
2011-07-05 14:19 ` Cyrill Gorcunov
2011-07-08 12:44 ` Ingo Molnar
2011-07-05 14:20 ` Peter Zijlstra
2011-07-05 14:40 ` Peter Zijlstra
2011-07-05 14:56 ` Ingo Molnar
2011-07-05 15:25 ` Cyrill Gorcunov
2011-07-06 7:01 ` Cyrill Gorcunov
2011-07-08 12:49 ` Ingo Molnar
2011-07-08 13:01 ` Cyrill Gorcunov
2011-07-08 13:09 ` Ingo Molnar
2011-07-08 13:12 ` Cyrill Gorcunov
2011-07-05 13:26 ` Cyrill Gorcunov
2011-07-05 12:24 ` Don Zickus
2011-07-05 12:26 ` Cyrill Gorcunov
2011-07-05 12:44 ` Don Zickus
2011-07-05 12:56 ` 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=20110705102017.GA12458@elte.hu \
--to=mingo@elte.hu \
--cc=a.p.zijlstra@chello.nl \
--cc=acme@redhat.com \
--cc=dzickus@redhat.com \
--cc=eranian@google.com \
--cc=fweisbec@gmail.com \
--cc=gorcunov@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=ming.m.lin@intel.com \
/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