From: Peter Zijlstra <peterz@infradead.org>
To: mingo@redhat.com, hpa@zytor.com, eranian@google.com,
paulus@samba.org, linux-kernel@vger.kernel.org,
davem@davemloft.net, fweisbec@gmail.com, ming.m.lin@intel.com,
tglx@linutronix.de, mingo@elte.hu
Cc: linux-tip-commits@vger.kernel.org
Subject: Re: [tip:perf/core] perf: Add group scheduling transactional APIs
Date: Fri, 07 May 2010 23:55:55 +0200 [thread overview]
Message-ID: <1273269355.1642.383.camel@laptop> (raw)
In-Reply-To: <tip-6bde9b6ce0127e2a56228a2071536d422be31336@git.kernel.org>
On Fri, 2010-05-07 at 18:44 +0000, tip-bot for Lin Ming wrote:
> Commit-ID: 6bde9b6ce0127e2a56228a2071536d422be31336
> Gitweb: http://git.kernel.org/tip/6bde9b6ce0127e2a56228a2071536d422be31336
> Author: Lin Ming <ming.m.lin@intel.com>
> AuthorDate: Fri, 23 Apr 2010 13:56:00 +0800
> Committer: Ingo Molnar <mingo@elte.hu>
> CommitDate: Fri, 7 May 2010 11:31:02 +0200
>
> perf: Add group scheduling transactional APIs
>
> Add group scheduling transactional APIs to struct pmu.
> These APIs will be implemented in arch code, based on Peter's idea as
> below.
>
> > the idea behind hw_perf_group_sched_in() is to not perform
> > schedulability tests on each event in the group, but to add the group
> > as a whole and then perform one test.
> >
> > Of course, when that test fails, you'll have to roll-back the whole
> > group again.
> >
> > So start_txn (or a better name) would simply toggle a flag in the pmu
> > implementation that will make pmu::enable() not perform the
> > schedulablilty test.
> >
> > Then commit_txn() will perform the schedulability test (so note the
> > method has to have a !void return value.
> >
> > This will allow us to use the regular
> > kernel/perf_event.c::group_sched_in() and all the rollback code.
> > Currently each hw_perf_group_sched_in() implementation duplicates all
> > the rolllback code (with various bugs).
>
> ->start_txn:
> Start group events scheduling transaction, set a flag to make
> pmu::enable() not perform the schedulability test, it will be performed
> at commit time.
>
> ->commit_txn:
> Commit group events scheduling transaction, perform the group
> schedulability as a whole
>
> ->cancel_txn:
> Stop group events scheduling transaction, clear the flag so
> pmu::enable() will perform the schedulability test.
>
> Reviewed-by: Stephane Eranian <eranian@google.com>
> Reviewed-by: Frederic Weisbecker <fweisbec@gmail.com>
> Signed-off-by: Lin Ming <ming.m.lin@intel.com>
> Cc: David Miller <davem@davemloft.net>
> Cc: Paul Mackerras <paulus@samba.org>
> Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
> LKML-Reference: <1272002160.5707.60.camel@minggr.sh.intel.com>
> Signed-off-by: Ingo Molnar <mingo@elte.hu>
Paul, are you ok with the powerpc patch that goes with this:
https://patchwork.kernel.org/patch/94620/
(I've got a slightly modified version because I did rename things back
to txn)
Dave already said he was OK with the sparc bits.
If you don't object, I'll push both patches to Ingo.
next prev parent reply other threads:[~2010-05-07 21:56 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-04-23 5:56 [RFC][PATCH v2 1/4] perf: core, add " Lin Ming
2010-05-07 18:44 ` [tip:perf/core] perf: Add " tip-bot for Lin Ming
2010-05-07 21:55 ` Peter Zijlstra [this message]
2010-05-08 10:28 ` Paul Mackerras
2010-05-10 8:11 ` Peter Zijlstra
2010-05-10 11:38 ` Paul Mackerras
2010-05-11 15:43 ` [tip:perf/core] perf, powerpc: Implement " tip-bot for Lin Ming
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=1273269355.1642.383.camel@laptop \
--to=peterz@infradead.org \
--cc=davem@davemloft.net \
--cc=eranian@google.com \
--cc=fweisbec@gmail.com \
--cc=hpa@zytor.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-tip-commits@vger.kernel.org \
--cc=ming.m.lin@intel.com \
--cc=mingo@elte.hu \
--cc=mingo@redhat.com \
--cc=paulus@samba.org \
--cc=tglx@linutronix.de \
/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
Powered by JetHome