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-ia64-devel

[Xen-ia64-devel] xen_timer_interrupt: can someone explain the code ?

To: xen-ia64-devel@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-ia64-devel] xen_timer_interrupt: can someone explain the code ?
From: Tristan Gingold <Tristan.Gingold@xxxxxxxx>
Date: Fri, 17 Feb 2006 10:45:55 +0100
Delivery-date: Fri, 17 Feb 2006 09:54:31 +0000
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-ia64-devel-request@lists.xensource.com?subject=help>
List-id: Discussion of the ia64 port of Xen <xen-ia64-devel.lists.xensource.com>
List-post: <mailto:xen-ia64-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-ia64-devel>, <mailto:xen-ia64-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-ia64-devel>, <mailto:xen-ia64-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-ia64-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: KMail/1.5
Hi,

I am currently enabling SMP guest using SMP host.
I have made some progresses, but I have just hit a barrier: I got a *lot* of
  Oops: timer tick before it's due

The good news is the message always appear and very frequently.  So it is time 
to fix it.

I have look on the xen_timer_interrupt function in xentime.c, but I don't 
really understand it.  The questions are before the statements:



What is the purpose of this statement ?
        if (current->domain == dom0) {
                // FIXME: there's gotta be a better way of doing this...
                // We have to ensure that domain0 is launched before we
                // call vcpu_timer_expired on it
                //domain0_ready = 1; // moved to xensetup.c
                VCPU(current,pending_interruption) = 1;
        }

Here dom0 is awaken if its timer has expired, correct ?
Why is dom0 special ? (and why only vcpu[0] ?)
        if (domain0_ready && current->domain != dom0) {
                if(vcpu_timer_expired(dom0->vcpu[0])) {
                        vcpu_pend_timer(dom0->vcpu[0]);
                        //vcpu_set_next_timer(dom0->vcpu[0]);
                        vcpu_wake(dom0->vcpu[0]);
                }
        }


This is the core job.
The only question is why vcpu_wake ?
        if (!is_idle_domain(current->domain))  {
                if (vcpu_timer_expired(current)) {
                        vcpu_pend_timer(current);
                        // ensure another timer interrupt happens even if 
domain doesn't
                        vcpu_set_next_timer(current);
                        vcpu_wake(current);
                }
        }
        new_itm = local_cpu_data->itm_next;

        if (!VMX_DOMAIN(current) && !time_after(ia64_get_itc(), new_itm))
                return;

Why current must be always awaken in VTI ?
        if (VMX_DOMAIN(current))
                vcpu_wake(current);


Thank you,
Tristan.


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

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-ia64-devel] xen_timer_interrupt: can someone explain the code ?, Tristan Gingold <=