aboutsummaryrefslogtreecommitdiffstats
path: root/xen/common/schedule.c
diff options
context:
space:
mode:
authorJan Beulich <jbeulich@suse.com>2011-10-21 09:17:42 +0200
committerJan Beulich <jbeulich@suse.com>2011-10-21 09:17:42 +0200
commit20307695e5c22a58b4cce35fba5333375da5a7fa (patch)
tree65584141fd42e108c6feca25eec190526cb01eac /xen/common/schedule.c
parenta8a8a52a27513b35d1c6aa2d542074f99849ac3d (diff)
downloadxen-20307695e5c22a58b4cce35fba5333375da5a7fa.tar.gz
xen-20307695e5c22a58b4cce35fba5333375da5a7fa.tar.bz2
xen-20307695e5c22a58b4cce35fba5333375da5a7fa.zip
introduce and use nr_cpu_ids and nr_cpumask_bits
The former is the runtime equivalent of NR_CPUS (and users of NR_CPUS, where necessary, get adjusted accordingly), while the latter is for the sole use of determining the allocation size when dynamically allocating CPU masks (done later in this series). Adjust accessors to use either of the two to bound their bitmap operations - which one gets used depends on whether accessing the bits in the gap between nr_cpu_ids and nr_cpumask_bits is benign but more efficient. Signed-off-by: Jan Beulich <jbeulich@suse.com> Acked-by: Keir Fraser <keir@xen.org>
Diffstat (limited to 'xen/common/schedule.c')
-rw-r--r--xen/common/schedule.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/xen/common/schedule.c b/xen/common/schedule.c
index 95150c3149..e9a8600b8d 100644
--- a/xen/common/schedule.c
+++ b/xen/common/schedule.c
@@ -1353,7 +1353,7 @@ void __init scheduler_init(void)
idle_domain = domain_create(DOMID_IDLE, 0, 0);
BUG_ON(idle_domain == NULL);
idle_domain->vcpu = idle_vcpu;
- idle_domain->max_vcpus = NR_CPUS;
+ idle_domain->max_vcpus = nr_cpu_ids;
if ( alloc_vcpu(idle_domain, 0, 0) == NULL )
BUG();
if ( ops.alloc_pdata &&