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

[Xen-devel] Re: [PATCH] x86 hvm: fix missing ticks bug of c/s 20218



Keir Fraser writes:
> Moving the line 'pt->scheduled += pt->period' inside the if statement looks
> pretty dubious. Does your fix still work if we don't move that line? For the
> default timer mode I'm not sure it should make any difference either way,
> but it would for timer mode 0.

Oops, my brain was dead. You are right. 
New one is attached. Of course it works. 

Thanks,
Kouya

> 
>  -- Keir
> 
> On 18/09/2009 06:24, "Kouya Shimura" <kouya@xxxxxxxxxxxxxx> wrote:
> 
> > With c/s 20218, timer ticks might be missed when IRQs of a timer are queued.
> > Next scheduled time is accumulated wrongly.
> > 
> > Thanks to Christoph for the report.
> > 
> > Thanks,
> > Kouya
> > 
> > Signed-off-by: Kouya Shimura <kouya@xxxxxxxxxxxxxx>
> > Reported-by: Christoph Egger <Christoph.Egger@xxxxxxx>
> > 
> 

Signed-off-by: Kouya Shimura <kouya@xxxxxxxxxxxxxx>
Reported-by: Christoph Egger <Christoph.Egger@xxxxxxx>

diff -r 72d130772f36 xen/arch/x86/hvm/vpt.c
--- a/xen/arch/x86/hvm/vpt.c    Wed Sep 16 09:30:41 2009 +0100
+++ b/xen/arch/x86/hvm/vpt.c    Fri Sep 18 17:13:25 2009 +0900
@@ -309,7 +309,6 @@ void pt_intr_post(struct vcpu *v, struct
     else
     {
         pt->scheduled += pt->period;
-        pt_process_missed_ticks(pt);
 
         if ( mode_is(v->domain, one_missed_tick_pending) ||
              mode_is(v->domain, no_missed_ticks_pending) )
@@ -324,7 +323,11 @@ void pt_intr_post(struct vcpu *v, struct
         }
 
         if ( pt->pending_intr_nr == 0 )
+        {
+            pt_process_missed_ticks(pt);
+            pt->do_not_freeze = 0;
             set_timer(&pt->timer, pt->scheduled);
+        }
     }
 
     if ( mode_is(v->domain, delay_for_missed_ticks) &&
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel

 


Rackspace

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