Cpufreq: prevent negative px resident time, add spinlock to avoid race
authorKeir Fraser <keir.fraser@citrix.com>
Mon, 5 Jan 2009 11:16:12 +0000 (11:16 +0000)
committerKeir Fraser <keir.fraser@citrix.com>
Mon, 5 Jan 2009 11:16:12 +0000 (11:16 +0000)
commit34c6decb5eea92e10aa157321ecb455b854aa351
tree9018e6217ae75611009f5963ff6d8b40071b895c
parent8005ca26cb1c8a42e4652fba9c8e5b9d5fc4b82b
Cpufreq: prevent negative px resident time, add spinlock to avoid race

Due to NOW() value may drift between different cpus, we add protection
to prevent negative px resident time.
Due to both cpufreq logic and xenpm may race accessing
cpufreq_statistic_data, we add spinlock to avoid race.

Signed-off-by: Liu, Jinsong <jinsong.liu@intel.com>
xen/drivers/acpi/pmstat.c
xen/drivers/cpufreq/utility.c
xen/include/acpi/cpufreq/cpufreq.h
xen/include/acpi/cpufreq/processor_perf.h