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

[Xen-devel] Re: lazy context switching

To: Hollis Blanchard <hollisb@xxxxxxxxxx>
Subject: [Xen-devel] Re: lazy context switching
From: Keir Fraser <Keir.Fraser@xxxxxxxxxxxx>
Date: Fri, 26 Aug 2005 10:37:59 +0100
Cc: Jimi Xenidis <jimix@xxxxxxxxxxxxxx>, xen-devel@xxxxxxxxxxxxxxxxxxx
Delivery-date: Fri, 26 Aug 2005 09:31:32 +0000
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <200508251655.09988.hollisb@xxxxxxxxxx>
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>
References: <200508251655.09988.hollisb@xxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx

On 25 Aug 2005, at 22:55, Hollis Blanchard wrote:

Later on, if it turns out we are switching domains, we save/restore all the state we can, then return to the exception handler which saves the old set of nonvolatiles and loads the new one. Until that point, some domain state is
spread arbitrarily across our stack.

That means that context_switch() cannot actually save all of @prev's state to memory (and neither can __sync_lazy_execstate()) -- only by returning all the
way to assembly can we accomplish that.

Thoughts?

What you need is a synchronisation point, visible to other CPUs, beyond which things like DOM0_GETVCPUCONTEXT can be sure to read consistent current state for the descheduled vcpu. See domain_sleep_sync() for the current way we ensure that state is committed to memory.

If you have a lot of register state, have you considered maintaining a Xen stack per VCPU? The context-switch interface already supports this, for ia64.

 -- Keir


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