diff options
| author | Joonwoo Park <joonwoop@codeaurora.org> | 2016-05-17 20:04:54 -0700 |
|---|---|---|
| committer | Jeevan Shriram <jshriram@codeaurora.org> | 2016-05-20 19:23:47 -0700 |
| commit | d9ff0d77afb3e5b79973b402f9a65bafa7d0cbd6 (patch) | |
| tree | bdb0465b2e5ad2b01db6a2e1e80e21d1698551c6 /include/linux | |
| parent | 167eebb0155f65077a1e5d57e3fb069fe9e6be70 (diff) | |
sched: simplify CPU frequency estimation and cycle counter API
Most of CPUs increase cycle counter by one every cycle which makes
frequency = cycles / time_delta is correct. Therefore it's reasonable
to get rid of current cpu_cycle_max_scale_factor and ask cycle counter
read callback function to return scaled counter value when it's needed
in such a case that cycle counter doesn't increase every cycle.
Thus multiply NSEC_PER_SEC / HZ_PER_KHZ to CPU cycle counter delta
as we calculate frequency in khz and remove cpu_cycle_max_scale_factor.
This allows us to simplify frequency estimation and cycle counter API.
Change-Id: Ie7a628d4bc77c9b6c769f6099ce8d75740262a14
Signed-off-by: Joonwoo Park <joonwoop@codeaurora.org>
Diffstat (limited to 'include/linux')
| -rw-r--r-- | include/linux/sched.h | 1 |
1 files changed, 0 insertions, 1 deletions
diff --git a/include/linux/sched.h b/include/linux/sched.h index bc7ad2e61018..7e107c3d7a5c 100644 --- a/include/linux/sched.h +++ b/include/linux/sched.h @@ -3370,7 +3370,6 @@ static inline unsigned long rlimit_max(unsigned int limit) struct cpu_cycle_counter_cb { u64 (*get_cpu_cycle_counter)(int cpu); - u32 (*get_cpu_cycles_max_per_us)(int cpu); }; int register_cpu_cycle_counter_cb(struct cpu_cycle_counter_cb *cb); |
