linux-perf-users.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Andi Kleen <andi@firstfloor.org>
To: Peter Zijlstra <peterz@infradead.org>
Cc: Andi Kleen <andi@firstfloor.org>,
	Taylor Andrews <andrewst@vmware.com>,
	"linux-perf-users@vger.kernel.org"
	<linux-perf-users@vger.kernel.org>
Subject: Re: Question about Perf's handling of in-use performance counters
Date: Fri, 28 Oct 2016 06:53:25 -0700	[thread overview]
Message-ID: <20161028135325.GB26852@two.firstfloor.org> (raw)
In-Reply-To: <20161027210012.GN3102@twins.programming.kicks-ass.net>

On Thu, Oct 27, 2016 at 11:00:12PM +0200, Peter Zijlstra wrote:
> On Thu, Oct 27, 2016 at 11:11:24AM -0700, Andi Kleen wrote:
> > 
> > Taylor Andrews <andrewst@vmware.com> writes:
> > 
> > > First some background:
> > >
> > > VMware's virtual x86 performance counter implementation aims to expose
> > > in-use (unavailable) performance counters to the guest operating
> > > system in the hopes that software agents will recognize it as an
> > > "in-use" resource and follow the PMU sharing guidelines outlined in
> > > Intel's Performance Monitoring Unit Sharing Guide
> > > (https://software.intel.com/en-us/articles/performance-monitoring-unit-guidelines/).
> 
> I would have to dig out the thread, but that wasn't followed on purpose
> and is unlikely to ever be followed.

If I remember correctly it was about difficulty of implementation.

An already used generic counter could be just handled like a pinned
counter. The only change needed would be a hook into the scheduler to
allocate a specific counter. I don't think it would be that difficult
frankly.

The only open question is how often this would need to be rechecked. But
we already have some code to reserve the PMU when it is first used after
being idle (for the old oprofile code). This would probably be the right
place to (re-)do such a check.

-Andi

  reply	other threads:[~2016-10-28 13:53 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-10-21 21:59 Question about Perf's handling of in-use performance counters Taylor Andrews
2016-10-27 18:11 ` Andi Kleen
2016-10-27 21:00   ` Peter Zijlstra
2016-10-28 13:53     ` Andi Kleen [this message]
2016-10-28 14:03       ` Peter Zijlstra
2016-10-28 15:40         ` Andi Kleen
2016-10-28 16:28           ` Peter Zijlstra
2016-10-28 16:33             ` Andi Kleen
2016-10-28 18:28               ` Taylor Andrews
2016-11-30 15:44                 ` Taylor Andrews
2016-11-30 18:17                   ` Peter Zijlstra
2016-11-07 22:25               ` Taylor Andrews

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=20161028135325.GB26852@two.firstfloor.org \
    --to=andi@firstfloor.org \
    --cc=andrewst@vmware.com \
    --cc=linux-perf-users@vger.kernel.org \
    --cc=peterz@infradead.org \
    /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).