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] Cpupools and pdata_alloc

To: George Dunlap <George.Dunlap@xxxxxxxxxxxxx>
Subject: Re: [Xen-devel] Cpupools and pdata_alloc
From: Juergen Gross <juergen.gross@xxxxxxxxxxxxxx>
Date: Tue, 11 May 2010 06:48:49 +0200
Cc: xen-devel@xxxxxxxxxxxxxxxxxxx, Keir Fraser <keir.fraser@xxxxxxxxxxxxx>
Delivery-date: Mon, 10 May 2010 21:50:02 -0700
Dkim-signature: v=1; a=rsa-sha256; c=simple/simple; d=ts.fujitsu.com; i=juergen.gross@xxxxxxxxxxxxxx; q=dns/txt; s=s1536b; t=1273552992; x=1305088992; h=message-id:date:from:mime-version:to:cc:subject: references:in-reply-to:content-transfer-encoding; z=Message-ID:=20<4BE8E1B1.2030305@xxxxxxxxxxxxxx>|Date:=20 Tue,=2011=20May=202010=2006:48:49=20+0200|From:=20Juergen =20Gross=20<juergen.gross@xxxxxxxxxxxxxx>|MIME-Version: =201.0|To:=20George=20Dunlap=20<George.Dunlap@xxxxxxxxxxx om>|CC:=20xen-devel@xxxxxxxxxxxxxxxxxxx,=20=0D=0A=20Keir =20Fraser=20<keir.fraser@xxxxxxxxxxxxx>|Subject:=20Re:=20 [Xen-devel]=20Cpupools=20and=20pdata_alloc|References:=20 <AANLkTin3dC9sCDP1-zwKog6BZtwaHAmkt53NqwAZtiNw@xxxxxxxxxx .com>|In-Reply-To:=20<AANLkTin3dC9sCDP1-zwKog6BZtwaHAmkt5 3NqwAZtiNw@xxxxxxxxxxxxxx>|Content-Transfer-Encoding:=207 bit; bh=aYOQEoAjQ2Go8D09OHvsmNHqQYlfmkSV/Y3i9aDSNAQ=; b=u6C3DZGPFhZCV3AjfhbB/GiyqI0f3cdxELaLYFBaWx02Kr84lXAiKw8F 4yTP8U2x3jaq7aHOmWzYhgj/9qGy4rkOZmEEeTWHGDMNcq6SFQPTtbFm4 1+fJHWutQ3RB/OZHIXjleGgQa3GAn7k2J6rCLb1iuEZccTzYEiL+aWr5a 8SXq9ubml4Vsds9GSo5VeAvnXBQf/d1c+uPHE26WZ/ef1axs3xirmmBk9 PO4ywbjJqb3J2d0EQLXg55+jq67gP;
Domainkey-signature: s=s1536a; d=ts.fujitsu.com; c=nofws; q=dns; h=X-SBRSScore:X-IronPort-AV:Received:X-IronPort-AV: Received:Received:Message-ID:Date:From:Organization: User-Agent:MIME-Version:To:CC:Subject:References: In-Reply-To:Content-Type:Content-Transfer-Encoding; b=op7TwVwQe2PlJz58qUDud/H15lkzbXHXrptAsrcEUKcWedD+YCnrByks wp+AXh1dBXifao+yizKpxM8bKI8Rr+xtjDuoNKdrOr4/ENzJHhyrhEZ3L NyvlCKdsOS7KMlEcxXEMiiHCElwv3wdGe6vHpqjKIIf0ilPfgQpHjGgQ9 BTegTF9t11IX72l9izbxquf9Sk6I9ROQvzslDn5FCu4zDMzL06T4jeoLu Z9SA7pNdbOUh1QyXH2itAj/EzGNbN;
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <AANLkTin3dC9sCDP1-zwKog6BZtwaHAmkt53NqwAZtiNw@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>
Organization: Fujitsu Technology Solutions
References: <AANLkTin3dC9sCDP1-zwKog6BZtwaHAmkt53NqwAZtiNw@xxxxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.9) Gecko/20100411 Iceowl/1.0b1 Icedove/3.0.4
On 05/10/2010 07:47 PM, George Dunlap wrote:
It appears that in the new cpupools code:
* pdata_allocate is called from alloc_vcpu() with that cpu for the first time.
* this happens usually when dom0's cpus are allocated, as it cycles
through all of the cpus

No. It happens when idle vcpus are allocated. At this time there is no cpupool
existing, all physical cpus are marked as "free", e.g. they are in no pool at
all.
Dom0 vcpus are allocated in Pool-0. This pool is created after allocation of
the idle vcpus.


This seems a bit strange to me.  Wouldn't it make more sense to pass,
or to make available, a cpumask of the cpus in a pool to the init
function?

No. A cpupool is created without any cpu in the beginning. Whenever a cpu is
added to a cpupool, alloc_pdata is called for this cpu.

BTW: Allocating the percpu data of the scheduler during the allocation of the
first vcpu on this cpu was in sched_credit.c before cpupools were introduced.


Also, is there documentation of the cpupool lifecycle anywhere, to
help scheduler writers understand what's going on?

Not yet.
I'll write something up in the next days.


Juergen

--
Juergen Gross                 Principal Developer Operating Systems
TSP ES&S SWE OS6                       Telephone: +49 (0) 89 3222 2967
Fujitsu Technology Solutions              e-mail: juergen.gross@xxxxxxxxxxxxxx
Domagkstr. 28                           Internet: ts.fujitsu.com
D-80807 Muenchen                 Company details: ts.fujitsu.com/imprint.html

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