From: Peter Zijlstra <peterz@infradead.org>
To: Andi Kleen <andi@firstfloor.org>
Cc: "Yan, Zheng" <zheng.z.yan@intel.com>,
linux-kernel@vger.kernel.org, mingo@kernel.org,
acme@infradead.org, eranian@google.com
Subject: Re: [PATCH v3 6/9] perf, x86: handle multiple records in PEBS buffer
Date: Fri, 25 Jul 2014 17:53:32 +0200 [thread overview]
Message-ID: <20140725155332.GC6758@twins.programming.kicks-ass.net> (raw)
In-Reply-To: <20140725150445.GG18735@two.firstfloor.org>
[-- Attachment #1: Type: text/plain, Size: 1292 bytes --]
On Fri, Jul 25, 2014 at 05:04:45PM +0200, Andi Kleen wrote:
> > You can't.. the events might have different security context.
> >
> > Remember, the overflow bit is set from the overflow until the PEBS
> > event is generated, this is quite a long time. So if another PEBS event
> > gets generated while the other is still pending it will have both bits
> > set. Even though the second bit is for another (unrelated) counter.
>
> When an event is not allowed by some policy it should be disabled
> in global ctrl right? And disabling makes sure overflow is cleared,
> and PEBS will not report it.
>
> When it's not disabled it could happen any time and there
> is no isolation.
>
> Or is the concern that the PEBS buffer may not be flushed
> on event switch/disable and you see something stale? I believe it is
> flushed.
Suppose two pebs events, one has exclude_kernel set. It overflows,
before entering the kernel, the other event generates PEBS records from
inside the kernel with both events marked in the overflow field.
And only once we leave the kernel can the exclude_kernel event tick
again and trigger the assist, finalyl clearing the bit.
If you were to report the records to both events, one would get a lot of
kernel info he was not entitled to.
[-- Attachment #2: Type: application/pgp-signature, Size: 836 bytes --]
next prev parent reply other threads:[~2014-07-25 15:53 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-07-22 8:09 [PATCH v3 0/7] perf, x86: large PEBS interrupt threshold Yan, Zheng
2014-07-22 8:09 ` [PATCH v3 1/9] perf, core: introduce pmu context switch callback Yan, Zheng
2014-07-22 8:09 ` [PATCH v3 2/9] perf, x86: use context switch callback to flush LBR stack Yan, Zheng
2014-07-22 8:09 ` [PATCH v3 3/9] perf, x86: use the PEBS auto reload mechanism when possible Yan, Zheng
2014-07-22 8:09 ` [PATCH v3 4/9] perf, x86: introduce setup_pebs_sample_data() Yan, Zheng
2014-07-22 8:09 ` [PATCH v3 5/9] perf, x86: large PEBS interrupt threshold Yan, Zheng
2014-07-22 16:16 ` Andi Kleen
2014-07-23 0:59 ` Yan, Zheng
2014-07-22 8:09 ` [PATCH v3 6/9] perf, x86: handle multiple records in PEBS buffer Yan, Zheng
2014-07-25 8:10 ` Peter Zijlstra
2014-07-25 8:34 ` Yan, Zheng
2014-07-25 14:06 ` Peter Zijlstra
2014-07-28 2:24 ` Yan, Zheng
2014-07-28 3:36 ` Andi Kleen
2014-07-28 6:52 ` Peter Zijlstra
2014-07-31 7:31 ` Yan, Zheng
2014-07-31 14:44 ` Andi Kleen
2014-07-31 15:25 ` Peter Zijlstra
2014-07-25 15:04 ` Andi Kleen
2014-07-25 15:53 ` Peter Zijlstra [this message]
2014-07-25 16:40 ` Andi Kleen
2014-07-28 3:20 ` Yan, Zheng
2014-07-28 3:34 ` Andi Kleen
2014-07-28 6:54 ` Peter Zijlstra
2014-07-22 8:10 ` [PATCH v3 7/9] perf, x86: drain PEBS buffer during context switch Yan, Zheng
2014-07-22 8:10 ` [PATCH v3 8/9] perf, x86: enlarge PEBS buffer Yan, Zheng
2014-07-22 8:10 ` [PATCH v3 9/9] tools, perf: Allow the user to disable time stamps Yan, Zheng
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=20140725155332.GC6758@twins.programming.kicks-ass.net \
--to=peterz@infradead.org \
--cc=acme@infradead.org \
--cc=andi@firstfloor.org \
--cc=eranian@google.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@kernel.org \
--cc=zheng.z.yan@intel.com \
/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