Tian, Kevin
2008-Dec-10 13:09 UTC
[Xen-devel] [PATCH] Initialize state_entry_time to zero for all idle vcpus
Initialize state_entry_time to zero for all idle vcpus
NOW() is not usable since xen time sub-system hasn''t
been initialized yet. On my box, it gives a initial
stamp ~60s due to local tsc stamp as zero and TSC
count is started from power on. Then a negative value
is added to runstate of that idle vcpu at schedule
point. The net effect is for some tool like xenpm
to show a big idle time gap between BSP and other APs.
Signed-off-by Kevin Tian <kevin.tian@intel.com>
diff -r bf41be7bddea xen/common/domain.c
--- a/xen/common/domain.c Mon Dec 01 14:46:11 2008 -0500
+++ b/xen/common/domain.c Tue Dec 09 20:56:23 2008 -0500
@@ -135,7 +135,8 @@
v->vcpu_id = vcpu_id;
v->runstate.state = is_idle_vcpu(v) ? RUNSTATE_running :
RUNSTATE_offline;
- v->runstate.state_entry_time = NOW();
+ /* Don''t use NOW() before xen time sub-system is intialized */
+ v->runstate.state_entry_time = is_idle_vcpu(v) ? 0 : NOW();
spin_lock_init(&v->virq_lock);
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xensource.com
http://lists.xensource.com/xen-devel
Seemingly Similar Threads
- [PATCH][cpufreq] Xen support for the ondemand governor [1/2] (hypervisor code)
- [PATCH,RFC 6/17] 32-on-64 shared info handling
- sedf: remove useless tracing printk and harmonize comments style.
- [PATCH] x86/S3: Restore broken vcpu affinity on resume (v3)
- [PATCH 0 of 3] credit2 updates
