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] Vcpu allocation for a newly created domU

To: Sandesh <sandesh.ahiremath@xxxxxxxxx>
Subject: Re: [Xen-devel] Vcpu allocation for a newly created domU
From: "Grzegorz Miłoś" <gm281@xxxxxxxxx>
Date: Wed, 18 Jun 2008 12:13:53 +0100
Cc: "xen-devel@xxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxx>
Delivery-date: Wed, 18 Jun 2008 04:14:15 -0700
Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:sender :to:subject:cc:in-reply-to:mime-version:content-type :content-transfer-encoding:content-disposition:references :x-google-sender-auth; bh=0Sl+27dl+C8S+on1bU8iwlltLSuI3pFf4AyvCIztWHQ=; b=VBwuW0FTlSHWV7/6EdOWf6fYLamDb6v1iAiWQhVMqAquGXw6bY+FaKpScwvNgDbios Q4Q8x4IBz3NMqbnQL4BAjJUWuBYY9CnC36gPP0+2FKqfLdOCoqrUgrHU7LBw3gO/V52t nAnFmUbrUhrXjgqLZI1AzY032+a7FoQFYZ8nU=
Domainkey-signature: a=rsa-sha1; c=nofws; d=googlemail.com; s=gamma; h=message-id:date:from:sender:to:subject:cc:in-reply-to:mime-version :content-type:content-transfer-encoding:content-disposition :references:x-google-sender-auth; b=jUWIP1ZZ7PjbIBQmuw37nqlDCtbWAEj+HGOAWfuPB3b4oMM0KQl4LoilkTBTaUZxyo IhmIRxIPwB9TGkUBsE7jlNXaPz6KfTHQAuqh+4uccqY73P4jLCAsrpPNB8xQkXTepUBV zpQ0+6lYNknnOOIaEMWDtnwkpK0YD4jw4hxGU=
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
In-reply-to: <1213636037.4215.39.camel@ec4t16cg-1518809>
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: <1213636037.4215.39.camel@ec4t16cg-1518809>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
> Hi all,
>
>  I am having confusion regarding the way a newly created domain is
> allocated vcpu.
>  Initially during dom0 creation alloc_vcpu is called to create vcpu
> structs for all the available cpu's and assigned to dom0. But its not
> the case for domU creation.
> 1. So how will dom0 relinquish/share vcpu to/with a newly created domU.
> Does this happen as part of the shared_info page mapping??

vcpus are created for each new domain, they are not shared with Dom0.

> 2. Till the end of DOMCTL_createdomain hypercall d->vcpu is null but by
> the start of xc_linux_bulid_internal function d->vcpu is pointing to
> some vcpu. How is this??

vcpus are created as a part of DOMCTL_max_vcpus. This hypercall is
issued by the tools in Dom0, specifically by: _constructDomain() in
python/xen/xend/XendDomainInfo.py. Look for the following line:
xc.domain_max_vcpus(self.domid, int(self.info['VCPUs_max']))

> 3. As part of the domU config file we can constraint the domU to a
> specific CPU. How is this achieved unless there is an explict way of
> assigning vcpu associated with that cpu number.

This is done by the following call chain:
DOMCTL_setvcpuaffinity ->
vcpu_set_affinity ->
__vcpu_set_affinity

Hope this helps.

cheers
Gr(z)egor(z)

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