Re: [RFC][PATCH 1/4] perf: core, add group scheduling transactional APIs

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Lin Ming
Date: Thursday, April 22, 2010 - 7:08 pm

On Fri, 2010-04-23 at 01:31 +0800, Frederic Weisbecker wrote:

How about below changes?

Thanks for review.

diff --git a/include/linux/perf_event.h b/include/linux/perf_event.h
index b16cfba..bba4c60 100644
--- a/include/linux/perf_event.h
+++ b/include/linux/perf_event.h
@@ -544,9 +544,21 @@ struct pmu {
 	void (*stop)			(struct perf_event *event);
 	void (*read)			(struct perf_event *event);
 	void (*unthrottle)		(struct perf_event *event);
-	void (*start_txn)		(const struct pmu *pmu);
-	void (*stop_txn)		(const struct pmu *pmu);
-	int (*commit_txn)		(const struct pmu *pmu);
+
+	/*
+	 * group events scheduling is treated as a transaction,
+	 * add group events as a whole and perform one schedulability test.
+	 * If test fails, roll back the whole group
+	 */
+
+	/* start group events transaction  */
+	void (*start_group_trans)	(const struct pmu *pmu);
+
+	/* stop group events transaction  */
+	void (*stop_group_trans)	(const struct pmu *pmu);
+
+	/* commit group events transaction */
+	int (*commit_group_trans)	(const struct pmu *pmu);
 };
 
 /**


--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
Re: [RFC][PATCH 1/4] perf: core, add group scheduling tran ..., Frederic Weisbecker, (Thu Apr 22, 10:31 am)
Re: [RFC][PATCH 1/4] perf: core, add group scheduling tran ..., Lin Ming, (Thu Apr 22, 7:08 pm)
Re: [RFC][PATCH 1/4] perf: core, add group scheduling tran ..., Frederic Weisbecker, (Thu Apr 22, 7:12 pm)