diff options
author | Juergen Gross <juergen.gross@ts.fujitsu.com> | 2012-01-24 14:19:58 +0000 |
---|---|---|
committer | Juergen Gross <juergen.gross@ts.fujitsu.com> | 2012-01-24 14:19:58 +0000 |
commit | 9b80635f9dd46b584f04c8e948a71c48bd412f96 (patch) | |
tree | 65d633f3bdd797f2207ecd2fef863ccf48c2d07c /xen/common/sched_credit.c | |
parent | 04b9829949d79e753c8047f4ef620a82b1743349 (diff) | |
download | xen-9b80635f9dd46b584f04c8e948a71c48bd412f96.tar.gz xen-9b80635f9dd46b584f04c8e948a71c48bd412f96.tar.bz2 xen-9b80635f9dd46b584f04c8e948a71c48bd412f96.zip |
introduce and use common macros for selecting cpupool based cpumasks
There are several instances of the same construct finding the cpumask
for a cpupool. Use macros instead.
Signed-off-by: juergen.gross@ts.fujitsu.com
Committed-by: Keir Fraser <keir@xen.org>
Diffstat (limited to 'xen/common/sched_credit.c')
-rw-r--r-- | xen/common/sched_credit.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/xen/common/sched_credit.c b/xen/common/sched_credit.c index 01f5999ffb..015ea21a70 100644 --- a/xen/common/sched_credit.c +++ b/xen/common/sched_credit.c @@ -72,8 +72,6 @@ #define CSCHED_VCPU(_vcpu) ((struct csched_vcpu *) (_vcpu)->sched_priv) #define CSCHED_DOM(_dom) ((struct csched_dom *) (_dom)->sched_priv) #define RUNQ(_cpu) (&(CSCHED_PCPU(_cpu)->runq)) -#define CSCHED_CPUONLINE(_pool) \ - (((_pool) == NULL) ? &cpupool_free_cpus : (_pool)->cpu_valid) /* @@ -471,7 +469,7 @@ _csched_cpu_pick(const struct scheduler *ops, struct vcpu *vc, bool_t commit) * Pick from online CPUs in VCPU's affinity mask, giving a * preference to its current processor if it's in there. */ - online = CSCHED_CPUONLINE(vc->domain->cpupool); + online = cpupool_scheduler_cpumask(vc->domain->cpupool); cpumask_and(&cpus, online, vc->cpu_affinity); cpu = cpumask_test_cpu(vc->processor, &cpus) ? vc->processor @@ -1230,7 +1228,7 @@ csched_load_balance(struct csched_private *prv, int cpu, int peer_cpu; BUG_ON( cpu != snext->vcpu->processor ); - online = CSCHED_CPUONLINE(per_cpu(cpupool, cpu)); + online = cpupool_scheduler_cpumask(per_cpu(cpupool, cpu)); /* If this CPU is going offline we shouldn't steal work. */ if ( unlikely(!cpumask_test_cpu(cpu, online)) ) |