Skip to content

genirq/affinity: Consider that CPUs on nodes can be unbalanced

Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=2074315

commit 08d835dff916bfe8f45acc7b92c7af6c4081c8a7 Author: Rei Yamamoto yamamoto.rei@jp.fujitsu.com Date: Thu Mar 31 09:33:09 2022 +0900

genirq/affinity: Consider that CPUs on nodes can be unbalanced

If CPUs on a node are offline at boot time, the number of nodes is
different when building affinity masks for present cpus and when building
affinity masks for possible cpus. This causes the following problem:

In the case that the number of vectors is less than the number of nodes
there are cases where bits of masks for present cpus are overwritten when
building masks for possible cpus.

Fix this by excluding CPUs, which are not part of the current build mask
(present/possible).

[ tglx: Massaged changelog and added comment ]

Fixes: b82592199032 ("genirq/affinity: Spread IRQs to all available NUMA nodes")
Signed-off-by: Rei Yamamoto <yamamoto.rei@jp.fujitsu.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Reviewed-by: Ming Lei <ming.lei@redhat.com>
Cc: stable@vger.kernel.org
Link: https://lore.kernel.org/r/20220331003309.10891-1-yamamoto.rei@jp.fujitsu.com

Signed-off-by: Ming Lei ming.lei@redhat.com

Merge request reports