diff options
author | Keir Fraser <keir.fraser@citrix.com> | 2008-12-10 14:05:41 +0000 |
---|---|---|
committer | Keir Fraser <keir.fraser@citrix.com> | 2008-12-10 14:05:41 +0000 |
commit | aa9c44021251b17ad24add472751e03b5718cbde (patch) | |
tree | 7bc56f75c711db3a4900c2813481173b16827ffe /xen/drivers/cpufreq | |
parent | 7132ae7e553f5dead2cb246165490ad4155ee83b (diff) | |
download | xen-aa9c44021251b17ad24add472751e03b5718cbde.tar.gz xen-aa9c44021251b17ad24add472751e03b5718cbde.tar.bz2 xen-aa9c44021251b17ad24add472751e03b5718cbde.zip |
Avoid negative runstate pieces.
Also consolidate all places to get cpu idle time.
Signed-off-by: Kevin Tian <kevin.tian@intel.com>
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
Diffstat (limited to 'xen/drivers/cpufreq')
-rw-r--r-- | xen/drivers/cpufreq/cpufreq_ondemand.c | 15 |
1 files changed, 0 insertions, 15 deletions
diff --git a/xen/drivers/cpufreq/cpufreq_ondemand.c b/xen/drivers/cpufreq/cpufreq_ondemand.c index a34912cbc0..f5017beda6 100644 --- a/xen/drivers/cpufreq/cpufreq_ondemand.c +++ b/xen/drivers/cpufreq/cpufreq_ondemand.c @@ -95,21 +95,6 @@ int get_cpufreq_ondemand_para(uint32_t *sampling_rate_max, return 0; } -uint64_t get_cpu_idle_time(unsigned int cpu) -{ - uint64_t idle_ns; - struct vcpu *v; - - if ((v = idle_vcpu[cpu]) == NULL) - return 0; - - idle_ns = v->runstate.time[RUNSTATE_running]; - if (v->is_running) - idle_ns += NOW() - v->runstate.state_entry_time; - - return idle_ns; -} - static void dbs_check_cpu(struct cpu_dbs_info_s *this_dbs_info) { unsigned int load = 0; |