From: Andi Kleen <ak@linux.intel.com>
To: Kyle Huey <me@kylehuey.com>
Cc: Kan Liang <kan.liang@linux.intel.com>,
"Peter Zijlstra (Intel)" <peterz@infradead.org>,
Ingo Molnar <mingo@kernel.org>,
Robert O'Callahan <robert@ocallahan.org>,
Alexander Shishkin <alexander.shishkin@linux.intel.com>,
Arnaldo Carvalho de Melo <acme@redhat.com>,
Jiri Olsa <jolsa@redhat.com>,
Linus Torvalds <torvalds@linux-foundation.org>,
Stephane Eranian <eranian@google.com>,
Thomas Gleixner <tglx@linutronix.de>,
Vince Weaver <vincent.weaver@maine.edu>,
acme@kernel.org, open list <linux-kernel@vger.kernel.org>
Subject: Re: [REGRESSION] x86, perf: counter freezing breaks rr
Date: Tue, 20 Nov 2018 14:19:01 -0800 [thread overview]
Message-ID: <20181120221901.GG13936@tassilo.jf.intel.com> (raw)
In-Reply-To: <CAP045AprqsgphfBpUe37MjVFu4T9KTb_mYuMj=q0T+9-kbK0qw@mail.gmail.com>
On Tue, Nov 20, 2018 at 01:46:05PM -0800, Kyle Huey wrote:
> On Tue, Nov 20, 2018 at 1:18 PM Andi Kleen <ak@linux.intel.com> wrote:
> >
> > > I suppose that's fair that it's better for some use cases. The flip
> > > side is that it's no longer possible to get exactly accurate counts
> > > from user space if you're using the PMI (because any events between
> > > the overflow itself and the transition to the PMI handler are
> > > permanently lost) which is catastrophically bad for us :)
> >
> > Yes that's a fair point. For most usages it doesn't matter.
> >
> > I suspect that's a case for supporting opt-out for freezing
> > per perf event, and rr using that.
>
> I don't see how you could easily opt-out on a per perf event basis. If
> I'm reading the SDM correctly the Freeze_PerfMon_On_PMI setting is
> global and affects all counters on that CPU. Even counters that don't
> use the PMI at all will still be frozen if another counter overflows
> and counter freezing is enabled. It would seem that a counter that
> wants to use counter freezing and a counter that wants the behavior we
> want would be mutually exclusive. I suppose the kernel could handle
> all of that but it's a bit involved.
Yes it's a per CPU setting. You wouldn't be able to opt-in. If anyone opts
out on a CPU it would be disabled on that CPU while that event
is active.
-Andi
next prev parent reply other threads:[~2018-11-20 22:19 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-11-20 16:19 [REGRESSION] x86, perf: counter freezing breaks rr Kyle Huey
2018-11-20 17:08 ` Peter Zijlstra
2018-11-20 17:59 ` [tip:perf/urgent] perf/x86/intel: Fix regression by default disabling perfmon v4 interrupt handling tip-bot for Peter Zijlstra
2018-11-20 18:20 ` [REGRESSION] x86, perf: counter freezing breaks rr Stephane Eranian
2018-11-20 19:50 ` Kyle Huey
2018-11-20 19:41 ` Andi Kleen
2018-11-20 19:54 ` Kyle Huey
2018-11-20 20:11 ` Andi Kleen
2018-11-20 20:53 ` Kyle Huey
2018-11-20 21:18 ` Andi Kleen
2018-11-20 21:46 ` Kyle Huey
2018-11-20 22:19 ` Andi Kleen [this message]
2018-11-20 21:19 ` Stephane Eranian
2018-11-20 21:34 ` Kyle Huey
2018-11-20 22:16 ` Peter Zijlstra
2018-11-20 22:25 ` Peter Zijlstra
2018-11-20 22:38 ` Andi Kleen
2018-11-21 8:14 ` Peter Zijlstra
2018-11-27 22:08 ` Kyle Huey
2018-11-27 23:36 ` Andi Kleen
2018-11-28 1:25 ` Stephane Eranian
2018-11-29 14:50 ` Liang, Kan
2018-11-29 15:35 ` 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=20181120221901.GG13936@tassilo.jf.intel.com \
--to=ak@linux.intel.com \
--cc=acme@kernel.org \
--cc=acme@redhat.com \
--cc=alexander.shishkin@linux.intel.com \
--cc=eranian@google.com \
--cc=jolsa@redhat.com \
--cc=kan.liang@linux.intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=me@kylehuey.com \
--cc=mingo@kernel.org \
--cc=peterz@infradead.org \
--cc=robert@ocallahan.org \
--cc=tglx@linutronix.de \
--cc=torvalds@linux-foundation.org \
--cc=vincent.weaver@maine.edu \
/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