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] scheduler independent forced vcpu selection

To: Ryan Harper <ryanh@xxxxxxxxxx>
Subject: Re: [Xen-devel] scheduler independent forced vcpu selection
From: Stephan Diestelhorst <sd386@xxxxxxxxxxxx>
Date: Wed, 18 May 2005 13:10:36 +0100
Cc: xen-devel@xxxxxxxxxxxxxxxxxxx
Delivery-date: Wed, 18 May 2005 12:10:17 +0000
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <20050517204832.GH7305@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: <20050517204832.GH7305@xxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Mozilla Thunderbird 1.0 (Windows/20041206)
That is a good idea, there is quite a number of other spinlock
optimisations on the way...

> I'm working on a new hypercall, do_confer, which allows the directed
> yielding of a vcpu to another vcpu.  It is mainly used when a vcpu fails
> to acquire a spinlock, yielding to the lock holder instead of spinning. I
> ported the ppc64 spinlock implementation for the i386 linux portion.  In
> implementing the hypercall, I've been trying to figure out how to get
> the scheduler (I've only played with bvt) to run the vcpu passed in the
> hypercall (after some validation) but I've run into various bad state
> situations (do_softirq pending != 0 assert, '!active_ac_timer(timer)'
> failed , and __task_on_runqueue(prev) failed) which tells me I
> don't fully understand all of the book-keeping that is needed.  Has
> anyone thought about how to do this with either BVT or the new EDF
> scheduler?

Building code similar to do_block and __enter_scheduler in
xen/common/schedule.c should be working fine, except of course running
the original scheduler, but switching directly to the hinted domain.

Are you calling do_softirq directly? If not then it is quite strange,
that this assertion fails.
The timer assertion might be the old scheduling timer, which gets
probably reset, but not deleted beforehand... And the on runqueue
assertion suggests that you are 'stealing' the domain from the
schedulers queues without giving it a chance to notice.

I'd guess cloning do_block and appending code from __enter_scheduler
with some checks (is the 'receiver' domain runnable? if not run proper
sched.do_schedule) should give you a solid base to start from.

Cheers,
  Stephan


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