Re: [tip:perf/core] perf: Add group scheduling transactional APIs

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxx>
> AuthorDate: Fri, 23 Apr 2010 13:56:00 +0800
> Committer:  Ingo Molnar <mingo@xxxxxxx>
> 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@xxxxxxxxxx>
> Reviewed-by: Frederic Weisbecker <fweisbec@xxxxxxxxx>
> Signed-off-by: Lin Ming <ming.m.lin@xxxxxxxxx>
> Cc: David Miller <davem@xxxxxxxxxxxxx>
> Cc: Paul Mackerras <paulus@xxxxxxxxx>
> Signed-off-by: Peter Zijlstra <a.p.zijlstra@xxxxxxxxx>
> LKML-Reference: <1272002160.5707.60.camel@xxxxxxxxxxxxxxxxxxx>
> Signed-off-by: Ingo Molnar <mingo@xxxxxxx> 


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.

--
To unsubscribe from this list: send the line "unsubscribe linux-tip-commits" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Stable Commits]     [Linux Stable Kernel]     [Linux Kernel]     [Linux USB Devel]     [Linux Video &Media]     [Linux Audio Users]     [Yosemite News]     [Linux SCSI]

  Powered by Linux