]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
x86/apic/x2apic: set affinity of a single interrupt to one cpu
authorJianchao Wang <jianchao.w.wang.oracle.com>
Wed, 9 Jan 2019 08:20:24 +0000 (03:20 -0500)
committerBrian Maly <brian.maly@oracle.com>
Wed, 30 Jan 2019 04:16:46 +0000 (23:16 -0500)
Customer want to offline the cpus to 2 per node. And finally, a
lpfc HBA cannot work any more due to no available
irq vectors.
[   51.031812] IRQ 284 set affinity failed because there are no available vectors.  The device assigned to this IRQ is unstable.
[   51.031817] IRQ 285 set affinity failed because there are no available vectors.  The device assigned to this IRQ is unstable.
[   51.031822] IRQ 286 set affinity failed because there are no available vectors.  The device assigned to this IRQ is unstable.
[   51.031827] IRQ 287 set affinity failed because there are no available vectors.  The device assigned to this IRQ is unstable.

It was due to cluster_vector_allocation_domain which want to set
interrupt affinity of a single interrupt to multiple CPUs and need
a same irq vector to be available on multiple cpus. This is difficult
for customer's case where there are a lot of HBAs on node 0 and only
2 or 4 cpus online there.

And actually, this feature has been discarded by the upstream.
https://lkml.org/lkml/2017/9/13/576
We close this feature by just set one cpu in retmask in
cluster_vector_allocation_domain.

Customer that encountered this issue used RHCK, since UEK4 also
has the same code, post a same patch for UEK4

Orabug: 29196396

Reviewed-by: Zhenzhong Duan <zhenzhong.duan@oracle.com>
Signed-off-by: Jianchao Wang <jianchao.w.wang.oracle.com>
Signed-off-by: Brian Maly <brian.maly@oracle.com>
arch/x86/kernel/apic/x2apic_cluster.c

index ab3219b3fbda3794eeeded5c9002dd85d3a5eb29..fb2edecc470a5d427218a968a2381d75fbff03b4 100644 (file)
@@ -219,19 +219,7 @@ static const struct cpumask *x2apic_cluster_target_cpus(void)
 static void cluster_vector_allocation_domain(int cpu, struct cpumask *retmask,
                                             const struct cpumask *mask)
 {
-       /*
-        * To minimize vector pressure, default case of boot, device bringup
-        * etc will use a single cpu for the interrupt destination.
-        *
-        * On explicit migration requests coming from irqbalance etc,
-        * interrupts will be routed to the x2apic cluster (cluster-id
-        * derived from the first cpu in the mask) members specified
-        * in the mask.
-        */
-       if (mask == x2apic_cluster_target_cpus())
-               cpumask_copy(retmask, cpumask_of(cpu));
-       else
-               cpumask_and(retmask, mask, per_cpu(cpus_in_cluster, cpu));
+       cpumask_copy(retmask, cpumask_of(cpu));
 }
 
 static struct apic apic_x2apic_cluster = {