aboutsummaryrefslogtreecommitdiffstats
path: root/xen/common/sched_credit.c
diff options
context:
space:
mode:
authorJan Beulich <jbeulich@novell.com>2011-04-05 13:00:54 +0100
committerJan Beulich <jbeulich@novell.com>2011-04-05 13:00:54 +0100
commit4551775df58d42e2dcfd2a8ac4bcc713709e8b81 (patch)
tree5e10216631c44c2ec3102f85ca58646d766f46e5 /xen/common/sched_credit.c
parent2bbb3d0fe9149b302b42c98cffe3fbf1aa286548 (diff)
downloadxen-4551775df58d42e2dcfd2a8ac4bcc713709e8b81.tar.gz
xen-4551775df58d42e2dcfd2a8ac4bcc713709e8b81.tar.bz2
xen-4551775df58d42e2dcfd2a8ac4bcc713709e8b81.zip
Remove direct cpumask_t members from struct vcpu and struct domain
The CPU masks embedded in these structures prevent NR_CPUS-independent sizing of these structures. Basic concept (in xen/include/cpumask.h) taken from recent Linux. For scalability purposes, many other uses of cpumask_t should be replaced by cpumask_var_t, particularly local variables of functions. This implies that no functions should have by-value cpumask_t parameters, and that the whole old cpumask interface (cpus_...()) should go away in favor of the new (cpumask_...()) one. Signed-off-by: Jan Beulich <jbeulich@novell.com>
Diffstat (limited to 'xen/common/sched_credit.c')
-rw-r--r--xen/common/sched_credit.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/xen/common/sched_credit.c b/xen/common/sched_credit.c
index f1e969499f..e6dd3d3e1d 100644
--- a/xen/common/sched_credit.c
+++ b/xen/common/sched_credit.c
@@ -292,7 +292,7 @@ __runq_tickle(unsigned int cpu, struct csched_vcpu *new)
{
cpumask_t idle_mask;
- cpus_and(idle_mask, prv->idlers, new->vcpu->cpu_affinity);
+ cpumask_and(&idle_mask, &prv->idlers, new->vcpu->cpu_affinity);
if ( !cpus_empty(idle_mask) )
{
CSCHED_STAT_CRANK(tickle_idlers_some);
@@ -305,7 +305,7 @@ __runq_tickle(unsigned int cpu, struct csched_vcpu *new)
else
cpus_or(mask, mask, idle_mask);
}
- cpus_and(mask, mask, new->vcpu->cpu_affinity);
+ cpumask_and(&mask, &mask, new->vcpu->cpu_affinity);
}
}
@@ -455,7 +455,7 @@ __csched_vcpu_is_migrateable(struct vcpu *vc, int dest_cpu)
*/
return !vc->is_running &&
!__csched_vcpu_is_cache_hot(vc) &&
- cpu_isset(dest_cpu, vc->cpu_affinity);
+ cpumask_test_cpu(dest_cpu, vc->cpu_affinity);
}
static int
@@ -472,7 +472,7 @@ _csched_cpu_pick(const struct scheduler *ops, struct vcpu *vc, bool_t commit)
* preference to its current processor if it's in there.
*/
online = CSCHED_CPUONLINE(vc->domain->cpupool);
- cpus_and(cpus, *online, vc->cpu_affinity);
+ cpumask_and(&cpus, online, vc->cpu_affinity);
cpu = cpu_isset(vc->processor, cpus)
? vc->processor
: cycle_cpu(vc->processor, cpus);