[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-changelog] [xen-unstable] Improve vcpu_migration_delay handling.



# HG changeset patch
# User Keir Fraser <keir.fraser@xxxxxxxxxx>
# Date 1236766334 0
# Node ID cfacba42091c651290b025e6de7716ec860f448e
# Parent  2cd96ef839966d18a977fa4e32bd823e8a63ca33
Improve vcpu_migration_delay handling.

Signed-off-by: Xiaowei Yang <xiaowei.yang@xxxxxxxxx>
---
 xen/common/sched_credit.c |    2 +-
 xen/common/schedule.c     |    1 +
 xen/include/xen/sched.h   |    3 +++
 3 files changed, 5 insertions(+), 1 deletion(-)

diff -r 2cd96ef83996 -r cfacba42091c xen/common/sched_credit.c
--- a/xen/common/sched_credit.c Wed Mar 11 10:10:15 2009 +0000
+++ b/xen/common/sched_credit.c Wed Mar 11 10:12:14 2009 +0000
@@ -328,7 +328,7 @@ static inline int
 static inline int
 __csched_vcpu_is_cache_hot(struct vcpu *v)
 {
-    int hot = ((NOW() - v->runstate.state_entry_time) <
+    int hot = ((NOW() - v->last_run_time) <
                ((uint64_t)vcpu_migration_delay * 1000u));
 
     if ( hot )
diff -r 2cd96ef83996 -r cfacba42091c xen/common/schedule.c
--- a/xen/common/schedule.c     Wed Mar 11 10:10:15 2009 +0000
+++ b/xen/common/schedule.c     Wed Mar 11 10:12:14 2009 +0000
@@ -836,6 +836,7 @@ static void schedule(void)
         (test_bit(_VPF_blocked, &prev->pause_flags) ? RUNSTATE_blocked :
          (vcpu_runnable(prev) ? RUNSTATE_runnable : RUNSTATE_offline)),
         now);
+    prev->last_run_time = now;
 
     ASSERT(next->runstate.state != RUNSTATE_running);
     vcpu_runstate_change(next, RUNSTATE_running, now);
diff -r 2cd96ef83996 -r cfacba42091c xen/include/xen/sched.h
--- a/xen/include/xen/sched.h   Wed Mar 11 10:10:15 2009 +0000
+++ b/xen/include/xen/sched.h   Wed Mar 11 10:12:14 2009 +0000
@@ -102,6 +102,9 @@ struct vcpu
     } runstate_guest; /* guest address */
 #endif
 
+    /* last time when vCPU is scheduled out */
+    uint64_t last_run_time;
+
     /* Has the FPU been initialised? */
     bool_t           fpu_initialised;
     /* Has the FPU been used since it was last saved? */

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.