diff options
author | Jan Beulich <jbeulich@suse.com> | 2013-08-23 15:04:17 +0200 |
---|---|---|
committer | Jan Beulich <jbeulich@suse.com> | 2013-08-23 15:04:17 +0200 |
commit | 105ee865be224999e301b4303c740c1143b67b1d (patch) | |
tree | da0841328b5782c669ede8ebd8a5783a6662a99d | |
parent | 829b8498cc781f5ed8f7b9e16378f448b4d45213 (diff) | |
download | xen-105ee865be224999e301b4303c740c1143b67b1d.tar.gz xen-105ee865be224999e301b4303c740c1143b67b1d.tar.bz2 xen-105ee865be224999e301b4303c740c1143b67b1d.zip |
x86: use cpumask_any() in mask-to-APIC-ID conversions
This is to avoid picking CPU0 for almost any such operation, resulting
in very uneven distribution of interrupt load.
Signed-off-by: Jan Beulich <jbeulich@suse.com>
Acked-by: Keir Fraser <keir@xen.org>
-rw-r--r-- | xen/arch/x86/genapic/delivery.c | 2 | ||||
-rw-r--r-- | xen/arch/x86/genapic/x2apic.c | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/xen/arch/x86/genapic/delivery.c b/xen/arch/x86/genapic/delivery.c index cdab3338af..94eb8572d6 100644 --- a/xen/arch/x86/genapic/delivery.c +++ b/xen/arch/x86/genapic/delivery.c @@ -67,5 +67,5 @@ const cpumask_t *vector_allocation_cpumask_phys(int cpu) unsigned int cpu_mask_to_apicid_phys(const cpumask_t *cpumask) { /* As we are using single CPU as destination, pick only one CPU here */ - return cpu_physical_id(cpumask_first(cpumask)); + return cpu_physical_id(cpumask_any(cpumask)); } diff --git a/xen/arch/x86/genapic/x2apic.c b/xen/arch/x86/genapic/x2apic.c index d4c91495ac..b2cab030ff 100644 --- a/xen/arch/x86/genapic/x2apic.c +++ b/xen/arch/x86/genapic/x2apic.c @@ -81,7 +81,7 @@ static const cpumask_t *vector_allocation_cpumask_x2apic_cluster(int cpu) static unsigned int cpu_mask_to_apicid_x2apic_cluster(const cpumask_t *cpumask) { - unsigned int cpu = cpumask_first(cpumask); + unsigned int cpu = cpumask_any(cpumask); unsigned int dest = per_cpu(cpu_2_logical_apicid, cpu); const cpumask_t *cluster_cpus = per_cpu(cluster_cpus, cpu); |