From: Stephane Eranian <eranian@google.com>
To: Peter Zijlstra <peterz@infradead.org>
Cc: Frederic Weisbecker <fweisbec@gmail.com>,
linux-kernel@vger.kernel.org, mingo@elte.hu, paulus@samba.org,
davem@davemloft.net, perfmon2-devel@lists.sf.net,
eranian@gmail.com
Subject: Re: [PATCH] perf_events: improve x86 event scheduling (v5)
Date: Thu, 21 Jan 2010 11:38:54 +0100 [thread overview]
Message-ID: <bd4cb8901001210238hae424b4qe5788f2a025c897a@mail.gmail.com> (raw)
In-Reply-To: <1264069717.4283.1148.camel@laptop>
On Thu, Jan 21, 2010 at 11:28 AM, Peter Zijlstra <peterz@infradead.org> wrote:
> On Thu, 2010-01-21 at 11:21 +0100, Stephane Eranian wrote:
>
>> Are you suggesting a speculative approach where you first try simply
>> accumulate then schedule and if this fails, then restart the whole
>> loop but this time adding and scheduling each event individually?
>> For groups, you'd have to fail the group if one of its events fails.
>
> No, I'm only talking about groups. The complaint from frederic was that
> current hw_perf_group_sched_in() implementations have to basically
> replicate all of the group_sched_in() and event_sched_in() stuff, which
> seems wasteful.
>
I agree about the replication problem. But this comes from the fact that
if you call hw_perf_group_sched_in() and you succeed, you want to only
execute part of what group_sched_in() normally does, namely mark the
event as active, update timing but skip event_sched_in() stuff, incl. enable().
Actual activation is deferred until perf_enable() which avoids having some
events actually measuring while you are still scheduling events.
> So I was thinking of an alternative interface that would give the same
> end result but not as much code replication.
>
> I'm now leaning towards adding a parameter to ->enable() to postpone
> schedulability and add a hw_perf_validate() like call.
>
> With that I'm also looking at what would be the sanest way to multiplex
> all the current weak hw_perf* functions in the light of multiple pmu
> implementations.
>
>
--
Stephane Eranian | EMEA Software Engineering
Google France | 38 avenue de l'Opéra | 75002 Paris
Tel : +33 (0) 1 42 68 53 00
This email may be confidential or privileged. If you received this
communication by mistake, please
don't forward it to anyone else, please erase all copies and
attachments, and please let me know that
it went to the wrong person. Thanks
next prev parent reply other threads:[~2010-01-21 10:38 UTC|newest]
Thread overview: 40+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-01-18 8:58 Stephane Eranian
2010-01-18 13:43 ` Frederic Weisbecker
2010-01-18 13:54 ` Peter Zijlstra
2010-01-18 14:12 ` Stephane Eranian
2010-01-18 14:20 ` Peter Zijlstra
2010-01-18 14:33 ` Peter Zijlstra
2010-01-18 14:20 ` Frederic Weisbecker
2010-01-18 14:32 ` Peter Zijlstra
2010-01-18 14:45 ` Frederic Weisbecker
2010-01-18 14:56 ` Peter Zijlstra
2010-01-18 16:18 ` Frederic Weisbecker
2010-01-18 16:26 ` Peter Zijlstra
2010-01-18 16:51 ` Frederic Weisbecker
2010-01-18 17:13 ` Peter Zijlstra
2010-01-18 17:29 ` Frederic Weisbecker
2010-01-18 20:01 ` Peter Zijlstra
2010-01-19 12:22 ` Peter Zijlstra
2010-01-19 13:24 ` Peter Zijlstra
2010-01-19 15:55 ` Frederic Weisbecker
2010-01-19 16:25 ` Peter Zijlstra
2010-02-27 17:38 ` Frederic Weisbecker
2010-01-19 15:40 ` Frederic Weisbecker
2010-01-21 10:08 ` Stephane Eranian
2010-01-21 10:11 ` Peter Zijlstra
2010-01-21 10:21 ` Stephane Eranian
2010-01-21 10:28 ` Peter Zijlstra
2010-01-21 10:38 ` Stephane Eranian [this message]
2010-01-21 10:45 ` Frederic Weisbecker
2010-01-21 11:44 ` Stephane Eranian
2010-01-21 12:02 ` Frederic Weisbecker
2010-01-18 14:37 ` Peter Zijlstra
2010-01-18 14:53 ` Frederic Weisbecker
2010-01-18 14:59 ` Peter Zijlstra
2010-01-18 16:22 ` Frederic Weisbecker
2010-01-21 10:36 ` Peter Zijlstra
2010-01-21 10:43 ` Stephane Eranian
2010-01-21 10:46 ` Peter Zijlstra
2010-01-21 14:06 ` Stephane Eranian
2010-01-21 13:55 ` [tip:perf/urgent] perf: x86: Add support for the ANY bit tip-bot for Stephane Eranian
2010-01-29 9:26 ` [tip:perf/core] perf_events, x86: Improve x86 event scheduling tip-bot for Stephane Eranian
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=bd4cb8901001210238hae424b4qe5788f2a025c897a@mail.gmail.com \
--to=eranian@google.com \
--cc=davem@davemloft.net \
--cc=eranian@gmail.com \
--cc=fweisbec@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=paulus@samba.org \
--cc=perfmon2-devel@lists.sf.net \
--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
all inboxes | Powered by JetHome®