WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-changelog

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

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] Improve vcpu_migration_delay handling.
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Wed, 11 Mar 2009 03:30:31 -0700
Delivery-date: Wed, 11 Mar 2009 03:31:26 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# 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

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [xen-unstable] Improve vcpu_migration_delay handling., Xen patchbot-unstable <=