RFC perf: remove __weak function hw_perf_group_sched_in()
Get series with b4
b4 am [email protected]Versions newest first · linked by author and title
- v2 RFC Latest4 patches 8 repliesIn review
- v1 RFC4 patches 7 repliesSuperseded
Patches in v2 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/4 | perf: core, add group scheduling transactional APIsinclude/ kernel/ | +37 | 6 replies | |
| 2/4 | perf: x86, implement group scheduling transactional APIsarch/ | +73 | 1 reply | |
| 3/4 | perf: powerpc, implement group scheduling transactional APIsarch/ | +66 | 0 replies | |
| 4/4 | perf: sparc, implement group scheduling transactional APIsarch/ | +65 | 1 reply |
Reviews trailers per patch
3 of 4 patches have a Reviewed-by or Acked-by.
| Patch | Stephane Eranian | Peter Zijlstra | Frederic Weisbecker | David Miller |
|---|---|---|---|---|
| 1/4 | R-b R-b | R-b | R-b R-b | |
| 2/4 | R-b R-b | R-b | ||
| 3/4 | ||||
| 4/4 | A-b |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes. Scroll the table sideways for all 4 reviewers.
Cover letter [RFC][PATCH v2 0/4] perf: remove __weak function hw_perf_group_sched_in()
Hi, all
Quoted 1 line
From the discussion of thread "[RFC]
perf_events: support for uncore
a.k.a. nest units", in order to support multiple hw pmu, Peter suggested the first thing that needs to be done is get rid of all the __weak functions (with exception of perf_callchain*, since that really is arch specific), includes
hw_perf_group_sched_inhw_perf_event_inithw_perf_disablehw_perf_enable
Quoted 12 lines · Peter Zijlstra
One thing not on that list, which should happen first I guess, is to remove
hw_perf_group_sched_in(). The idea is to add some sort of transactional API to the struct pmu, so that we can delay the schedulability check until commit time (and roll back when it fails).Something as simple as:
struct pmu { void start_txn(struct pmu *); void commit_txn(struct pmu *); ,,,
Quoted 6 lines
};
and then change
group_sched_in()to use this instead ofhw_perf_group_sched_in(), whose implementations mostly replicategroup_sched_in()in various buggy ways anyway.
This patch series is to remove hw_perf_group_sched_in() first.
patch 1: core, add group scheduling transactional APIs patch 2: x86, implement group scheduling transactional APIs patch 3: powerpc, implement group scheduling transactional APIs patch 4: sparc, implement group scheduling transactional APIs
I have tested these patches on x86, but for powerpc and sparc it's only cross build tested.
It's very appreciated if anybody has powerpc or sparc can help to test.
Thanks for any comment.
Changes log:
v2.
Change transaction flag(cpu_hw_events->group_flag) from u8 to unsigned int. RISC architecture deals better with word sized variable than u8. (Peter Zijlstra)
Rename callback names, *_txn -> *_group_trans for better readability. Add a few comments to describe the callbacks. (Frederic Weisbecker)
v1.
remove __weak function hw_perf_group_sched_in() based on Peter's idea.
Thanks,
Lin Ming