public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Robert Richter <rric@kernel.org>
To: Ingo Molnar <mingo@kernel.org>
Cc: suravee.suthikulpanit@amd.com, a.p.zijlstra@chello.nl,
	paulus@samba.org, mingo@redhat.com, acme@ghostprotocols.net,
	tglx@linutronix.de, hpa@zytor.com, x86@kernel.org,
	linux-kernel@vger.kernel.org, jacob.shin@amd.com
Subject: Re: [PATCH 1/1] Change IBS PMU to use perf_hw_context
Date: Mon, 17 Dec 2012 10:44:03 +0100	[thread overview]
Message-ID: <20121217094403.GF1893@rric.localhost> (raw)
In-Reply-To: <20121216090410.GC21690@gmail.com>

On 16.12.12 10:04:10, Ingo Molnar wrote:
> 
> * suravee.suthikulpanit@amd.com <suravee.suthikulpanit@amd.com> wrote:
> 
> > From: Suravee Suthikulpanit <suravee.suthikulpanit@amd.com>
> > 
> > Currently, the AMD IBS PMU initialize pmu.task_ctx_nr to 
> > perf_invalid_context which only allows IBS to be running only 
> > in system-wide mode (e.g. perf record -a). IBS hardware is 
> > available in each core and should be per-context.  This patch 
> > modifies the task_ctx_nr to use the perf_hw_context (default) 
> > instead.
> 
> I'm wondering how extensively was it tested/verified that it's 
> safe to enable IBS in per context mode as well, and that the 
> profiling results are precise and accurate?

>From the implementation's point of view this is very similar to hw
perf counters. I wouldn't expect any issues here. Since IBS can be
immediatly started/stopped and there is no caching, there won't be any
incomming sample that is not related to that context.

The only potential problem I see could be a security risk in a way
that an IBS sample might expose data related to other contexts such as
cache information. This is similar to uncore/northbridge events so I
don't think this is an issue, but we might want to evaluate this.

> We never used the IBS hardware in this fashion before, so some 
> extra care is prudent - and traces of that extra care should be 
> visible in the changelog as well.

Yeah, a comparison of numbers for IBS and hw counter (-e r076:p,r076
and -e r0C1:p,r0C1) in per-context mode would be useful here.

-Robert

  reply	other threads:[~2012-12-17  9:44 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-12-14 20:57 [PATCH 1/1] Change IBS PMU to use perf_hw_context suravee.suthikulpanit
2012-12-16  9:04 ` Ingo Molnar
2012-12-17  9:44   ` Robert Richter [this message]
2012-12-18 22:54     ` Suravee Suthikulpanit
2013-01-16 22:19       ` Suravee Suthikulpanit
2013-06-18 16:03         ` Suravee Suthikulanit

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=20121217094403.GF1893@rric.localhost \
    --to=rric@kernel.org \
    --cc=a.p.zijlstra@chello.nl \
    --cc=acme@ghostprotocols.net \
    --cc=hpa@zytor.com \
    --cc=jacob.shin@amd.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@kernel.org \
    --cc=mingo@redhat.com \
    --cc=paulus@samba.org \
    --cc=suravee.suthikulpanit@amd.com \
    --cc=tglx@linutronix.de \
    --cc=x86@kernel.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