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] CPU and scheduler init, Part 2

To: George Dunlap <dunlapg@xxxxxxxxx>, <xen-devel@xxxxxxxxxxxxxxxxxxx>
Subject: Re: [Xen-devel] CPU and scheduler init, Part 2
From: Keir Fraser <keir@xxxxxxx>
Date: Thu, 09 Dec 2010 14:16:52 +0000
Cc:
Delivery-date: Thu, 09 Dec 2010 06:18:04 -0800
Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:sender:user-agent:date :subject:from:to:message-id:thread-topic:thread-index:in-reply-to :mime-version:content-type:content-transfer-encoding; bh=cLpEZjPEDq7xDAxsJzPwY00eyUM+jO6PHfdluEcNhFw=; b=F5A0gHBs6ZW+7xbIU0GkYIMdaeZ+kCO2SoAiFs1swb4KFxnt5NePhHzcbFC3DeqvZI dP8jrI/pPqtWJFVkqrT0uCEx16weV0fGXAsDl92HBZKPSjg0JVdNNAx9VuxJJvyh6Alp wM8bIKDWsJD3ecWuAZVVME07a/yEPJBNL+lBs=
Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=sender:user-agent:date:subject:from:to:message-id:thread-topic :thread-index:in-reply-to:mime-version:content-type :content-transfer-encoding; b=pJu2M8wjqihfOo5Wa6em7aSdBY7cGE64m5r74xRq8mAL90ZEpCAatefKTgpmoy5GFS 16el3jIS0KCEfRSWFaGi9IzyTibIWVaycr8H2iXRGVUmH/z626vIYYSu98OibQW+xMmz Jy52RMG1zA72E0svH0+kEuK70rTiaq8aA+LF4=
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <AANLkTi=HxSEEEmQZK7=psgtaUMURp+3Vaen5jpn04NWe@xxxxxxxxxxxxxx>
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/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
Thread-index: AcuXq7mlXDRUlsbA4UW8k8SpsJeo3Q==
Thread-topic: [Xen-devel] CPU and scheduler init, Part 2
User-agent: Microsoft-Entourage/12.27.0.100910
On 09/12/2010 12:49, "George Dunlap" <dunlapg@xxxxxxxxx> wrote:

> Keir,
> 
> I made a cpu status notifier for sched_credit2() to actually read an
> arrange the runqueue information, and found the next niggle: the
> callbacks are not guaranteed to finish before the cpu tried to go
> through the scheduler.  The callback notifiers are handled on the cpu
> that issues the boot command (i.e., cpu 0 during boot), and there's no
> interlock to prevent the booted cpu from continuing until the
> notifiers have completed execution.
> 
> Making a simple interlock (similar to the one in __cpu_up()) allows
> the system to boot properly.  Another possibility would be to run the
> notifiers on the freshly booted cpu before calling into the scheduler,
> rather than on the cpu that issued the cpu boot sequence.

I could bring Linux's CPU_STARTING notifier over into Xen. Runs in context
of new CPU before it is fully online (e.g., before interrupts are enabled).
So you couldn't do any allocations there, or anything else that can fail.
This might require some juggling to pre-allocate memory (e.g., for
possibly-required new runqueue) on CPU_UP_PREPARE/alloc_pdata, and
potentially free that memory if unused on CPU_ONLINE. Or not, if actually
you require no dynamic memory allocation.

This might be the best solution overall I think? I can knock up a patch for
CPU_STARTING if that sounds good.

 -- Keir

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



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