From: Andi Kleen <ak@linux.intel.com>
To: speck@linutronix.de
Subject: [MODERATED] Re: [RFC][PATCH] performance walnuts
Date: Fri, 8 Feb 2019 10:07:53 -0800 [thread overview]
Message-ID: <20190208180753.GC16922@tassilo.jf.intel.com> (raw)
In-Reply-To: <20190208105318.GE32534@hirez.programming.kicks-ass.net>
On Fri, Feb 08, 2019 at 11:53:18AM +0100, speck for Peter Zijlstra wrote:
> On Fri, Feb 08, 2019 at 10:39:50AM +0100, Peter Zijlstra wrote:
> > Ah, I think I found a way to avoid having to rely on this. Let me try.
>
> Something like so. Can someone with access to a relevant machine test
> this?
>
> If it works, I'll write a Changelog and this'll be it.
I'll test this, but I would appreciate it if you spin
new versions you at least merge the fixes from my patchkits
first.
This is missing several.
Also note that some of the other patches have also changed.
> * From here on, the constraint is dynamic.
> @@ -3345,6 +3387,26 @@ glp_get_event_constraints(struct cpu_hw_events *cpuc, int idx,
> return c;
> }
>
> +static bool allow_tsx_force_abort = true;
The default needs more discussion.
> +
> +static struct event_constraint *
> +skl_get_event_constraints(struct cpu_hw_events *cpuc, int idx,
> + struct perf_event *event)
> +{
> + struct event_constraint *c = hsw_get_event_constraints(cpuc, idx, event);
> +
> + /*
> + * Without TFA we must not use PMC3.
> + */
> + if (!allow_tsx_force_abort && test_bit(3, c->idxmsk)) {
This still needs the extra changes in my patchkit to allow user/kvm opt-in/out.
> @@ -4061,9 +4126,12 @@ static struct attribute *intel_pmu_caps_attrs[] = {
> NULL
> };
>
> +DEVICE_BOOL_ATTR(allow_tsx_force_abort, 0644, allow_tsx_force_abort);
I still think "enable_all_counters" is a far better name.
> +
> static struct attribute *intel_pmu_attrs[] = {
> &dev_attr_freeze_on_smi.attr,
> NULL,
This needs a comment, as done in my patch.
> + NULL,
> };
>
> static __init struct attribute **
> @@ -4546,6 +4614,7 @@ __init int intel_pmu_init(void)
> x86_pmu.flags |= PMU_FL_HAS_RSP_1;
> x86_pmu.flags |= PMU_FL_NO_HT_SHARING;
>
> +
Unnecessary change.
> x86_pmu.hw_config = hsw_hw_config;
> x86_pmu.get_event_constraints = hsw_get_event_constraints;
> extra_attr = boot_cpu_has(X86_FEATURE_RTM) ?
> @@ -4557,6 +4626,16 @@ __init int intel_pmu_init(void)
> tsx_attr = hsw_tsx_events_attrs;
> intel_pmu_pebs_data_source_skl(
> boot_cpu_data.x86_model == INTEL_FAM6_SKYLAKE_X);
> +
> + /* If our CPU haz a walnut */
> + if (boot_cpu_has(X86_FEATURE_TSX_FORCE_ABORT)) {
> + x86_pmu.flags |= PMU_FL_WALNUT;
I don't think the Walnut name will be publicly documented, so it will be just confusing.
Better to give it an descriptive name. TSX_COUNTER3 or something like this.
-Andi
next prev parent reply other threads:[~2019-02-08 18:07 UTC|newest]
Thread overview: 33+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-02-07 23:41 [MODERATED] [PATCH v3 0/6] PERFv3 Andi Kleen
2019-02-07 23:41 ` [MODERATED] [PATCH v3 1/6] PERFv3 Andi Kleen
2019-02-08 8:45 ` [MODERATED] " Peter Zijlstra
2019-02-07 23:41 ` [MODERATED] [PATCH v3 2/6] PERFv3 Andi Kleen
2019-02-08 0:51 ` [MODERATED] Re: [SUSPECTED SPAM][PATCH " Andrew Cooper
2019-02-08 9:01 ` Peter Zijlstra
2019-02-08 9:31 ` [MODERATED] Re: [PATCH " Andrew Cooper
2019-02-08 9:39 ` [MODERATED] Re: [SUSPECTED SPAM][PATCH " Peter Zijlstra
2019-02-08 10:53 ` [MODERATED] [RFC][PATCH] performance walnuts Peter Zijlstra
2019-02-08 18:07 ` Andi Kleen [this message]
2019-02-11 10:40 ` [MODERATED] " Peter Zijlstra
2019-02-11 14:06 ` Thomas Gleixner
2019-02-11 20:17 ` [MODERATED] " Konrad Rzeszutek Wilk
2019-02-11 23:39 ` Thomas Gleixner
2019-02-09 0:28 ` [MODERATED] " Linus Torvalds
2019-02-09 4:34 ` Andi Kleen
2019-02-09 8:57 ` Peter Zijlstra
2019-02-13 2:56 ` mark gross
2019-02-15 17:32 ` mark gross
2019-02-15 17:44 ` Peter Zijlstra
2019-02-15 20:47 ` mark gross
2019-02-15 21:33 ` Thomas Gleixner
2019-02-19 13:35 ` [MODERATED] [RFC][PATCH v2] " Peter Zijlstra
2019-02-15 23:45 ` [MODERATED] Encrypted Message Jon Masters
2019-02-08 8:50 ` [MODERATED] Re: [PATCH v3 2/6] PERFv3 Peter Zijlstra
2019-02-08 17:26 ` Andi Kleen
2019-02-07 23:41 ` [MODERATED] [PATCH v3 3/6] PERFv3 Andi Kleen
2019-02-08 9:02 ` [MODERATED] " Peter Zijlstra
2019-02-07 23:41 ` [MODERATED] [PATCH v3 4/6] PERFv3 Andi Kleen
2019-02-07 23:41 ` [MODERATED] [PATCH v3 5/6] PERFv3 Andi Kleen
2019-02-08 0:54 ` [MODERATED] " Andrew Cooper
2019-02-07 23:41 ` [MODERATED] [PATCH v3 6/6] PERFv3 Andi Kleen
2019-02-08 9:07 ` [MODERATED] " Peter Zijlstra
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=20190208180753.GC16922@tassilo.jf.intel.com \
--to=ak@linux.intel.com \
--cc=speck@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.