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] credit scheduler and HYPERVISOR_yield()

To: Emmanuel Ackaouy <ackaouy@xxxxxxxxx>, George Dunlap <gdunlap@xxxxxxxxxxxxx>
Subject: Re: [Xen-devel] credit scheduler and HYPERVISOR_yield()
From: Keir Fraser <Keir.Fraser@xxxxxxxxxxxx>
Date: Mon, 15 Oct 2007 18:45:52 +0100
Cc: xen-devel@xxxxxxxxxxxxxxxxxxx, John Levon <levon@xxxxxxxxxxxxxxxxx>
Delivery-date: Mon, 15 Oct 2007 10:41:22 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
In-reply-to: <62a4e0ddaadc2502a86b8bfae4a35caa@xxxxxxxxx>
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: AcgPUzqbeR8+F3tGEdyKqQAWy6hiGQ==
Thread-topic: [Xen-devel] credit scheduler and HYPERVISOR_yield()
User-agent: Microsoft-Entourage/11.3.6.070618
On 15/10/07 18:13, "Emmanuel Ackaouy" <ackaouy@xxxxxxxxx> wrote:

> In the case of IPIs, you're already going into the hypervisor so you
> should be able to do something straightforward with a sleeping
> semaphore. Maybe you spin a little before you sleep though to give
> running VCPUs a chance to respond before you give up the end of
> your time slice.

Actually a blocking spinlock could be implemented with no Xen changes.
Change the spinlock function in Linux to spin a few times and then set a
waiting bit in a cpumask and then SCHEDOP_poll on a per-VCPU spinlock-wakeup
event channel. On spin_unlock, the unlocker sends an event to any VCPU in
the cpumask, using each VCPU's spinlock-wakeup event channel.

Yes, this is probably nicer than using yield() and praying.

 -- Keir



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