All of lore.kernel.org
 help / color / mirror / Atom feed
From: Peter Zijlstra <peterz@infradead.org>
To: speck@linutronix.de
Subject: [MODERATED] Re: [RFC][PATCH] performance walnuts
Date: Mon, 11 Feb 2019 11:40:44 +0100	[thread overview]
Message-ID: <20190211104044.GW32511@hirez.programming.kicks-ass.net> (raw)
In-Reply-To: <20190208180753.GC16922@tassilo.jf.intel.com>

On Fri, Feb 08, 2019 at 10:07:53AM -0800, speck for Andi Kleen wrote:
> On Fri, Feb 08, 2019 at 11:53:18AM +0100, speck for Peter Zijlstra wrote:

> >  	 * 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.

This is what Thomas wants and makes sense to me. I'm done talking about
this.

> > +
> > +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.

It needs no such thing. Userspace has the one knob.

And I want to hear from Thomas and Paolo on what KVM wants; Andrew
already said he doesn't want this crap exposed to virt. And the less I
have to worry about virt the happier I am.

I've yet to see compelling arguments for making this more complicated.

Minimal and correct are the name of the game here; we need to backport
this because that fscking ucode default screws us over.

If you want complicated; you can try arguing that after we've gone
public.

> > @@ -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.

This is more explicit; the 'feature' is tsx_force_abort and will be
called so in /proc/cpuid.

> >  static struct attribute *intel_pmu_attrs[] = {
> >  	&dev_attr_freeze_on_smi.attr,
> >  	NULL,
> 
> This needs a comment, as done in my patch.

Sure can do.

> > +	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.

Already gone.

> >  		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.

Then WTH expose us to it in the first place?

  reply	other threads:[~2019-02-11 10:40 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           ` [MODERATED] " Andi Kleen
2019-02-11 10:40             ` Peter Zijlstra [this message]
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=20190211104044.GW32511@hirez.programming.kicks-ass.net \
    --to=peterz@infradead.org \
    --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.