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

[Xen-changelog] [xen-unstable] x86, hvm: More fixes to no-missed-tick-accounting mode.



# HG changeset patch
# User Keir Fraser <keir@xxxxxxxxxxxxx>
# Date 1194257350 0
# Node ID 070da619e65e87b69b2d99794840d84998fdf083
# Parent  650cadd1b28303dae4927ca65e64eb2507e3a3f3
x86, hvm: More fixes to no-missed-tick-accounting mode.
Signed-off-by: Keir Fraser <keir@xxxxxxxxxxxxx>
---
 xen/arch/x86/hvm/vpt.c |   31 ++++++++++++++++++-------------
 1 files changed, 18 insertions(+), 13 deletions(-)

diff -r 650cadd1b283 -r 070da619e65e xen/arch/x86/hvm/vpt.c
--- a/xen/arch/x86/hvm/vpt.c    Fri Nov 02 16:38:11 2007 +0000
+++ b/xen/arch/x86/hvm/vpt.c    Mon Nov 05 10:09:10 2007 +0000
@@ -47,21 +47,26 @@ static void pt_unlock(struct periodic_ti
 
 static void pt_process_missed_ticks(struct periodic_time *pt)
 {
-    s_time_t missed_ticks;
+    s_time_t missed_ticks, now = NOW();
+
+    if ( pt->one_shot )
+        return;
+
+    missed_ticks = now - pt->scheduled;
+    if ( missed_ticks <= 0 )
+        return;
 
     if ( mode_is(pt->vcpu->domain, no_missed_tick_accounting) )
-        return;
-
-    if ( pt->one_shot )
-        return;
-
-    missed_ticks = NOW() - pt->scheduled;
-    if ( missed_ticks <= 0 )
-        return;
-
-    missed_ticks = missed_ticks / (s_time_t) pt->period + 1;
-    pt->pending_intr_nr += missed_ticks;
-    pt->scheduled += missed_ticks * pt->period;
+    {
+        pt->pending_intr_nr = 1;
+        pt->scheduled = now + pt->scheduled;
+    }
+    else
+    {
+        missed_ticks = missed_ticks / (s_time_t) pt->period + 1;
+        pt->pending_intr_nr += missed_ticks;
+        pt->scheduled += missed_ticks * pt->period;
+    }
 }
 
 static void pt_freeze_time(struct vcpu *v)

_______________________________________________
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®.