[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Xen-devel] [PATCH] Reflect cpupool in numa node affinity
 
- To: Jan Beulich <JBeulich@xxxxxxxx>
 
- From: Juergen Gross <juergen.gross@xxxxxxxxxxxxxx>
 
- Date: Mon, 23 Jan 2012 11:45:28 +0100
 
- Cc: xen-devel@xxxxxxxxxxxxxxxxxxx
 
- Delivery-date: Mon, 23 Jan 2012 10:45:50 +0000
 
- 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=fXgDOp+ssRKX4CG+BTrjCD7kOI30EOkUFx7FqFX6up1PDekk+7bPWnf9	yBVNAFtqMSCUZl3HNfrmCeDpCDiAhNjErKErSZotN94lNM9KuZRAtC+SK	1Sran4Pi21JnIi/cD3/X3tFsisDf3yEM4J+rxshRo1ooMIM7DdTCLRqL2	glmZTd8MbKyu/rnuXlU1R+DgdbcAj8fLl7JOEK2mabmk7UPuwi4qkqNrk	jxPCGykk7erliNn3gMlnzrEzioSdx;
 
- List-id: Xen developer discussion <xen-devel.lists.xensource.com>
 
 
 
On 01/23/2012 11:27 AM, Jan Beulich wrote:
 
On 23.01.12 at 10:51, Juergen Gross<juergen.gross@xxxxxxxxxxxxxx>  wrote:
 
 
 
 
@@ -365,15 +366,21 @@ void domain_update_node_affinity(struct
 
void domain_update_node_affinity(struct domain *d)
{
     cpumask_t cpumask;
+    cpumask_t online_affinity;
 
If at all possible, please don't introduce new automatic cpumask_t
variables. Allocating them will of course mean that the function can
fail, and that callers need to deal with the failure. (Probably a prior
patch should then first convert the 'cpumask' variable.)
 
 
In this case I don't think it is very complicated.
Not doing anything in domain_update_node_affinity() will just produce a
lower performance. So doing a return in case of an allocation failure should
be fine.
 
+    cpumask_t *online;
 
 
const.
 
 
Okay.
 
     nodemask_t nodemask = NODE_MASK_NONE;
     struct vcpu *v;
     unsigned int node;
+    online = (d->cpupool == NULL) ?&cpu_online_map : d->cpupool->cpu_valid;
 
This construct (together with its brother using 'cpupool_free_cpus')
meanwhile enjoys quite a number of instances - could it get abstracted
into a pair of inline functions or macros?
 
 
Okay.
Juergen
--
Juergen Gross                 Principal Developer Operating Systems
PDG 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
 
 
    
     |