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);
};
/**
--