[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCH] Reflect cpupool in numa node affinity

>>> 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.)

>+    cpumask_t *online;


>     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?


Xen-devel mailing list



Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.