Skip to contentSkip to conversation

perf: remove __weak function hw_perf_group_sched_in()

RFC PATCH Superseded Lin Ming 2 participants 3 messages Apr 22, 2010 – Apr 23, 2010

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore

Lin Ming

author
#0 lore raw

cover 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_in
hw_perf_event_init
hw_perf_disable
hw_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 of hw_perf_group_sched_in(), whose implementations mostly replicate group_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

Thanks for any comment.

Lin Ming

#1 lore raw
Quoted 8 lines · Lin Ming

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

Thanks for any comment.

Don't RISC architectures deal better with word sized variables than with u8? I thought it curious you used u8 for the flags thing instead of int or long, but I'm not quite sure it really matters one way or the other.

author
#2 lore raw
Quoted 9 lines · Peter Zijlstra
Quoted 7 lines · Lin Ming

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

Quoted 5 lines
Quoted 1 line

Thanks for any comment.

Don't RISC architectures deal better with word sized variables than with u8? I thought it curious you used u8 for the flags thing instead of int or long, but I'm not quite sure it really matters one way or the other.

Will change it to "unsigned int".

Thanks.