|
|
|
|
|
|
|
|
|
|
xen-changelog
[Xen-changelog] [xen-unstable] Initialize state_entry_time to zero for a
# HG changeset patch
# User Keir Fraser <keir.fraser@xxxxxxxxxx>
# Date 1228916494 0
# Node ID 2a349db39496263fb326af12042c8ebdf421b071
# Parent 415a69b41397923ec27c5b8a821e72b5eb0d4e53
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@xxxxxxxxx>
Signed-off-by: Keir Fraser <keir.fraser@xxxxxxxxxx>
---
xen/common/domain.c | 13 ++++++++-----
1 files changed, 8 insertions(+), 5 deletions(-)
diff -r 415a69b41397 -r 2a349db39496 xen/common/domain.c
--- a/xen/common/domain.c Wed Dec 10 13:30:10 2008 +0000
+++ b/xen/common/domain.c Wed Dec 10 13:41:34 2008 +0000
@@ -144,13 +144,16 @@ struct vcpu *alloc_vcpu(
v->domain = d;
v->vcpu_id = vcpu_id;
- v->runstate.state = is_idle_vcpu(v) ? RUNSTATE_running : RUNSTATE_offline;
- v->runstate.state_entry_time = NOW();
-
spin_lock_init(&v->virq_lock);
- if ( !is_idle_domain(d) )
- {
+ if ( is_idle_domain(d) )
+ {
+ v->runstate.state = RUNSTATE_running;
+ }
+ else
+ {
+ v->runstate.state = RUNSTATE_offline;
+ v->runstate.state_entry_time = NOW();
set_bit(_VPF_down, &v->pause_flags);
v->vcpu_info = (void *)&shared_info(d, vcpu_info[vcpu_id]);
}
_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog
|
<Prev in Thread] |
Current Thread |
[Next in Thread> |
- [Xen-changelog] [xen-unstable] Initialize state_entry_time to zero for all idle vcpus,
Xen patchbot-unstable <=
|
|
|
|
|