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

RE: [Xen-devel] Re: A credit scheduler issue

To: "Keir Fraser" <Keir.Fraser@xxxxxxxxxxxx>, "Kamble, Nitin A" <nitin.a.kamble@xxxxxxxxx>
Subject: RE: [Xen-devel] Re: A credit scheduler issue
From: "Li, Xin B" <xin.b.li@xxxxxxxxx>
Date: Thu, 6 Jul 2006 18:50:26 +0800
Cc: Ian Pratt <m+Ian.Pratt@xxxxxxxxxxxx>, xen-devel@xxxxxxxxxxxxxxxxxxx, Emmanuel Ackaouy <ack@xxxxxxxxxxxxx>
Delivery-date: Thu, 06 Jul 2006 03:50:58 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
Thread-index: AcacFJzRWXT2iFvbSlmiMrtTDqv9gQE09GqA
Thread-topic: [Xen-devel] Re: A credit scheduler issue
>Although you may have spotted a performance bug that should be looked 
>into (if this migration happens significantly frequently), it *should 
>not* be a correctness bug! I don't think the fixes for the 
>HVM-and-credit-sched bugs lie in the credit scheduler itself. :-)
>

Hi Keir,
we just found the root cause of IA32 HVM guests can not run on 64 bit
host with the default credit scheduler.
credit scheduler migrates HVM vcpu from logical precessor from time to
time, but on x86_64 hypervisor, in __context_switch, we have 

    if ( !is_idle_vcpu(p) )
    {
        memcpy(&p->arch.guest_context.user_regs,
               stack_regs,
               CTXT_SWITCH_STACK_BYTES);
        unlazy_fpu(p);
        p->arch.ctxt_switch_from(p);
    }

    if ( !is_idle_vcpu(n) )
    {
        memcpy(stack_regs,
               &n->arch.guest_context.user_regs,
               CTXT_SWITCH_STACK_BYTES);

And CTXT_SWITCH_STACK_BYTES is defined as (offsetof(struct
cpu_user_regs, es)).

The definition of CTXT_SWITCH_STACK_BYTES on x86_64 is OK for 64 bit
guests, no matter para guests or HVM guests, but for 32 bit HVM guests,
since segments registers are skipped, it's buggy.

I'd perfer to define CTXT_SWITCH_STACK_BYTES to sizeof(struct
cpu_user_regs).

How about your opinion?

Thanks

-Xin 

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

<Prev in Thread] Current Thread [Next in Thread>
  • RE: [Xen-devel] Re: A credit scheduler issue, Li, Xin B <=