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][PATCH] libxc bitmap utils and vcpu-affinity

To: Keir Fraser <keir.fraser@xxxxxxxxxxxxx>
Subject: Re: [Xen-devel][PATCH] libxc bitmap utils and vcpu-affinity
From: Dulloor <dulloor@xxxxxxxxx>
Date: Mon, 22 Mar 2010 13:44:25 -0400
Cc: "xen-devel@xxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxx>
Delivery-date: Mon, 22 Mar 2010 10:45:05 -0700
Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=b+3Cc1zTH8a2VcJeLmVAgpaIF9fL6LOcZ7pUl5rL850=; b=jQF0tzXtgjKQ2/ToR3f3b7r/dsLjnAltpI3HkWXyfQZh8PC5y5zBs4mUBR/PVAi+Lt Eg+uPS9yzJEdEZmfxZIIafLQQtkErxolK7GKbPL4HDmGqiCWkPX1G9eJ1dyW8+LUryVd JQRjvwhC/k9FhPciaCmJybdVmLZji5HQx+91Y=
Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; b=jqBhpaPCJ7y7hbIBNfFEv0iVQ+/1Kb23az0UxKnJdmoSt7QtF21479NOAihM+X5YBl rQc7hIfwmOV15uAhqyT8Mhkf479C28Uei03WnmB/+7Go+4cGtKf0voVe2COXnAaDghyN bnd734i1jpLCguZPhAtKQihRW35Zmvp1nbZiw=
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <C7CCCD05.D728%keir.fraser@xxxxxxxxxxxxx>
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>
References: <940bcfd21003212033t3c3bf074h663337b56dd5954e@xxxxxxxxxxxxxx> <C7CCCD05.D728%keir.fraser@xxxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
> I'm missing the motivation for this. It sounds less good than what we have
> already.
xenctl_cpumap is dynamic and could work for any size, but there are
many reasons for adding xenctl_cpumask.

Motivation for new data type and bitmap utils in libxc :
- xenctl_cpumask is a simple and useful data type in xen-tools. We
deal with cpumasks at several places and the need increases with numa
(for instance, node selection with guest numa).
- The bitmap utils in the patch could work with both xenctl_cpumap as
well as xenctl_cpumask structure. So, that part is independent of the
new structure. And, I can just submit that part alone, if we decide to
stay with xenctl_cpumap.

Motivation for using xenctl_cpumask in Xen interfaces :
- xenctl_cpumap is just 4 bytes smaller than static xenctl_cpumask for
128 cpus (128 would be good for quite some time). However, the new
data type cleans up the code considerably, as you can see from its use
in vcpu_(set|get)affinity - no need to read physinfo, lock pages
separately, etc.
- Maintaining the size of xenctl_cpumask consistent between xen and
xen-tools is simple. And, conversion between xenctl_cpumask and
cpumask inside xen is simple too (not much different from before).
- There are other interfaces where xenctl_cpumask could be used. For
pv guest numa, I pass cpumasks in the start-info and the structure
needs to be static. The size of the structure is kept consistent
through a numa-interface version.

-dulloor

On Mon, Mar 22, 2010 at 3:30 AM, Keir Fraser <keir.fraser@xxxxxxxxxxxxx> wrote:
> On 22/03/2010 03:33, "Dulloor" <dulloor@xxxxxxxxx> wrote:
>
>> This patch adds :
>>
>> * A byte-based cpumask type(xenctl_cpumask) for setting vcpu-affinity
>> as well as numa-node-affinity, etc in libxc.
>>
>> * Add common bitmap utils to libxc, which can be used both for
>> xenctl_cpumask (and with small changes for xenctl_cpumap, if desired),
>> so that we can do common operations on cpumask easily.
>>
>> As opposed to xenctl_cpumap, xenctl_cpumask is a static structure
>> (just 4 bytes larger for 128 cpus), but keeps the interface/code
>> cleaner. The domctl_interface version keeps the size of xenctl_cpumask
>> consistent between xen and xen-tools.
>
> I'm missing the motivation for this. It sounds less good than what we have
> already.
>
>  -- Keir
>
>
>

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