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 2/3] xend: Add multiple cpumasks support

To: Ian Pratt <m+Ian.Pratt@xxxxxxxxxxxx>
Subject: Re: [Xen-devel] [PATCH 2/3] xend: Add multiple cpumasks support
From: Ryan Harper <ryanh@xxxxxxxxxx>
Date: Mon, 14 Aug 2006 13:47:09 -0500
Cc: Ryan Harper <ryanh@xxxxxxxxxx>, xen-devel@xxxxxxxxxxxxxxxxxxx
Delivery-date: Mon, 14 Aug 2006 11:48:01 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
In-reply-to: <A95E2296287EAD4EB592B5DEEFCE0E9D5723BB@xxxxxxxxxxxxxxxxxxxxxxxxxxx>
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: <A95E2296287EAD4EB592B5DEEFCE0E9D5723BB@xxxxxxxxxxxxxxxxxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Mutt/1.5.6+20040907i
* Ian Pratt <m+Ian.Pratt@xxxxxxxxxxxx> [2006-08-14 13:12]:
> > This patch modifies xend to accept and parse multiple cpumask strings
> > from the cpus parameter.  The cpus string stays the same, but it now
> > can parse either a python list of strings:
> 
> According to the example config file, we currently take a string
> containing the list of CPUs that the *domain* can run on. We should be
> putting this CPU mask into all of the VCPUs for the domain (rather than
> one bit in each as we currently do).
> 
> Adding support to enable separate masks for each VCPU isn't a bad idea,
> but we certainly don't want to break the behaviour of being able to set
> the mask for a domain.

This doesn't break the previous behavior though maybe the description or
implementation is misleading.  We may have dropped the behavior over time
as I seem to recall having a cpumap_t/cpumask in the domain structure,
but there isn't a domain-wide cpumask anymore.  Instead there is a
cpumask per vcpu.  The cpus parameter is used to restrict which
physical cpus the domains' vcpus' can use.  This is done by mapping
each vcpu to a value from the list of physical cpus the domain can
use.  The side-effect of that is that the cpumask of the vcpu has
only that cpu set, which prevents balancing when using the credit
scheduler.

Are you asking that we introduce in addition to the per-vcpu cpumask
another domain-wide mask that we would use to further restrict the vcpu
masks (think cpus_and(d->affinity, v->affinity))?  And have two config
variables like below?

vcpus=2
domain_cpus = "0-7"
vcpu_cpus = "0-3, 4-7"

> 
> Allowing a list of masks to be passed in (as well as a single string)
> isn't a bad idea.
> 
> Surely the comma separated list of vcpus isn't compatible with the
> current parsing? Or are you using the quotes to try and separate the
> different vcpu masks? That's horrid.

I didn't want the quotes either, nor the python list.  I guess I
misinterpreted your suggestion for requirements.  As for the commas, it
is certainly functional, but it sounds like we need some other cpumask
field delimiter, any takers for "|" ?

cpus = "0-3,^2|4-7|8|9-12"


> 
> BTW: As syntactic sugar, if the string starts with an exclusion, should
> it implicitly mean that mask starts off containing all 1's rather than
> all 0's? [avoiding the need to do "0-255,^0"]

That makes sense.  I'm not sure what happens right now if you lead with
an exclusion.  I can look into that after we settle on what do with
current patches.

-- 
Ryan Harper
Software Engineer; Linux Technology Center
IBM Corp., Austin, Tx
(512) 838-9253   T/L: 678-9253
ryanh@xxxxxxxxxx

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