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] SMP Guest Proposal RFC

To: "Ryan Harper" <ryanh@xxxxxxxxxx>, <xen-devel@xxxxxxxxxxxxxxxxxxx>
Subject: RE: [Xen-devel] SMP Guest Proposal RFC
From: "Ian Pratt" <m+Ian.Pratt@xxxxxxxxxxxx>
Date: Sat, 2 Apr 2005 01:21:31 +0100
Cc: Bryan Rosenburg <rosnbrg@xxxxxxxxxx>, Orran Krieger <okrieg@xxxxxxxxxx>
Delivery-date: Sat, 02 Apr 2005 00:21:41 +0000
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
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: AcU22TDMLppLggedSuuZZdMhvYeL6gAO45dQ
Thread-topic: [Xen-devel] SMP Guest Proposal RFC
 
> Attached is a proposal authored by Bryan Rosenburg, Orran 
> Krieger and Ryan Harper.  Comments, questions, and criticism 
> requested.

Ryan,

Much of what you're proposing closely matches our own plans: It's always
better that a domain have the minimum number of VCPUs active that are
required to meet its CPU load, and gang scheduling is clearly preferred
where possible. 

However, I'm convinced that pre-emption notifcations are not the way to
go: Kernels typically have no way to back-out of holding a lock early,
so giving them an active call-back is not very useful.

I think its better to have a counter that the VCPU increments whenever
it grabs a lock and decrements when it releases a lock. When the
pre-emption timer goes off, the hypervisor can check the counter. If its
non zero, the hypervisor can choose to hold-off the preemption for e.g.
50us. It can also set a bit in another word indiciating that a
pre-emption is pending. Whenever the '#locks held' counter is
decremented to zero, the pre-emption pending bit can be checked, and the
VCPU should imediately yield if it is.

An alternative/complementary scheme would be to have each lock able to
store the number of the VCPU that's holding it. If a VCPU finds that a
lock is already taken, it can look in the shared info page to see if the
VCPU that's holding the lock is actually running. If its not, it can
issue a hypervisor_yield_to_VCPU X hypercall and avoid further spinning,
passing its time slice to the VCPU holding the lock. 

Anyhow, good stuff to discuss next week.

Best,
Ian







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

<Prev in Thread] Current Thread [Next in Thread>