From: Andi Kleen <ak@linux.intel.com>
To: Peter Zijlstra <peterz@infradead.org>
Cc: Andi Kleen <andi@firstfloor.org>,
linux-kernel@vger.kernel.org, Ingo Molnar <mingo@kernel.org>,
Thomas Gleixner <tglx@linutronix.de>
Subject: Re: [PATCH] x86, perf: Use INST_RETIRED.PREC_DIST for cycles:pp on Skylake
Date: Wed, 21 Oct 2015 08:26:08 -0700 [thread overview]
Message-ID: <20151021152608.GG15102@tassilo.jf.intel.com> (raw)
In-Reply-To: <20151021080947.GA2881@worktop.programming.kicks-ass.net>
> Right, but suppose one user (root) would be sampling machine wide with
> PEBS whilst another user is using it just on his one task.
The root case is likely perf top which does not use PEBS.
> > > And you having killed the flag bits for PEBS events precludes people
> > > from using this manually, right? I think we want to exempt .inv=1
> > > .cmask=16 from that general rule on general utility value.
> >
> > I don't want to do this for every event. It has caused problems
> > in the past. There's also no reason to use the other events.
>
> But it does allow users to play around with alternative encodings for
> cycles etc.. We've made use of this in the past when SNB turned out to
> have broken the event.
If they want to violate the SDM they can hack the kernel.
It's risky to do as you well know.
> > > We could maybe abuse .precise_ip = 3 for this?
> >
> > I implemented this now, even though it's ugly.
>
> Agreed, its not ideal.
So it turns out that UOPS_RETIRED.ALL+pebs only works by accident
on Skylake. It's not in the specification.
So on Skylake it has to be unconditional for any cycles:p
On earlier parts it can be only for three p to handle your
unlikely scenario.
-Andi
--
ak@linux.intel.com -- Speaking for myself only
next prev parent reply other threads:[~2015-10-21 15:26 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-10-19 22:58 [PATCH] x86, perf: Use INST_RETIRED.PREC_DIST for cycles:pp on Skylake Andi Kleen
2015-10-20 11:36 ` Peter Zijlstra
2015-10-20 22:28 ` Andi Kleen
2015-10-21 8:09 ` Peter Zijlstra
2015-10-21 15:26 ` Andi Kleen [this message]
2015-10-21 16:52 ` Peter Zijlstra
2015-10-21 16:55 ` Andi Kleen
2015-10-21 18:57 ` 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=20151021152608.GG15102@tassilo.jf.intel.com \
--to=ak@linux.intel.com \
--cc=andi@firstfloor.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@kernel.org \
--cc=peterz@infradead.org \
--cc=tglx@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 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).