linux/kernel/irq
Guilherme G. Piccoli c0af524372 genirq/affinity: Fix node generation from cpumask
Commit 34c3d9819f ("genirq/affinity: Provide smarter irq spreading
infrastructure") introduced a better IRQ spreading mechanism, taking
account of the available NUMA nodes in the machine.

Problem is that the algorithm of retrieving the nodemask iterates
"linearly" based on the number of online nodes - some architectures
present non-linear node distribution among the nodemask, like PowerPC.
If this is the case, the algorithm lead to a wrong node count number
and therefore to a bad/incomplete IRQ affinity distribution.

For example, this problem were found in a machine with 128 CPUs and two
nodes, namely nodes 0 and 8 (instead of 0 and 1, if it was linearly
distributed). This led to a wrong affinity distribution which then led to
a bad mq allocation for nvme driver.

Finally, we take the opportunity to fix a comment regarding the affinity
distribution when we have _more_ nodes than vectors.

Fixes: 34c3d9819f ("genirq/affinity: Provide smarter irq spreading infrastructure")
Reported-by: Gabriel Krisman Bertazi <gabriel@krisman.be>
Signed-off-by: Guilherme G. Piccoli <gpiccoli@linux.vnet.ibm.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Gabriel Krisman Bertazi <gabriel@krisman.be>
Reviewed-by: Gavin Shan <gwshan@linux.vnet.ibm.com>
Cc: linux-pci@vger.kernel.org
Cc: linuxppc-dev@lists.ozlabs.org
Cc: hch@lst.de
Link: http://lkml.kernel.org/r/1481738472-2671-1-git-send-email-gpiccoli@linux.vnet.ibm.com
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2016-12-15 12:32:35 +01:00
..
affinity.c genirq/affinity: Fix node generation from cpumask 2016-12-15 12:32:35 +01:00
autoprobe.c
chip.c genirq: Make function __irq_do_set_handler() static 2016-09-25 16:46:52 -04:00
cpuhotplug.c genirq: Make the cpuhotplug migration code less noisy 2015-10-22 14:34:57 +02:00
debug.h
devres.c genirq: devres: Fix testing return value of request_any_context_irq() 2015-05-13 10:47:37 +02:00
dummychip.c Merge branch 'linus' into irq/core 2015-06-05 22:25:01 +02:00
generic-chip.c genirq/generic_chip: Verify irqs_per_chip <= 32 2016-09-02 20:20:59 +02:00
handle.c genirq: Add untracked irq handler 2016-06-18 10:00:55 +02:00
internals.h Merge branch 'irq/for-block' into irq/core 2016-07-04 12:26:05 +02:00
ipi.c genirq: Fix missing irq allocation affinity hint 2016-07-19 10:49:47 +02:00
irqdesc.c Merge branch 'irq/for-block' into irq/core 2016-09-15 20:54:40 +02:00
irqdomain.c genirq: Update stale comment for __irq_domain_add 2016-09-05 17:11:10 +02:00
Kconfig genirq: Add GENERIC_IRQ_IPI Kconfig symbol 2016-02-25 10:56:55 +01:00
Makefile genirq: Add a helper to spread an affinity mask for MSI/MSI-X vectors 2016-07-04 12:25:14 +02:00
manage.c genirq: Use irq type from irqdata instead of irqdesc 2016-11-08 15:15:19 +01:00
migration.c genirq: Remove bogus restriction in irq_move_mask_irq() 2015-06-20 19:05:14 +02:00
msi.c genirq/msi: Drop artificial PCI dependency 2016-11-22 11:00:19 +01:00
pm.c Merge branches 'irq-urgent-for-linus' and 'timers-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2015-11-15 09:30:48 -08:00
proc.c Merge branch 'irq/for-block' into irq/core 2016-07-04 12:26:05 +02:00
resend.c genirq: Remove irq argument from irq flow handlers 2015-09-16 15:47:51 +02:00
settings.h genirq: Add flag to force mask in disable_irq[_nosync]() 2015-10-11 11:33:42 +02:00
spurious.c genirq: Use a common macro to go through the actions list 2016-02-15 00:07:34 +01:00