[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <165018953450.44773.6382828227632028472.tglx@xen13>
Date: Sun, 17 Apr 2022 11:59:11 +0200 (CEST)
From: Thomas Gleixner <tglx@...utronix.de>
To: Linus Torvalds <torvalds@...ux-foundation.org>
Cc: linux-kernel@...r.kernel.org, x86@...nel.org
Subject: [GIT pull] irq/urgent for v5.18-rc3
Linus,
please pull the latest irq/urgent branch from:
git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git irq-urgent-2022-04-17
up to: 08d835dff916: genirq/affinity: Consider that CPUs on nodes can be unbalanced
A single fix for the interrupt affinity spreading logic to take into
account that there can be an imbalance between present and possible CPUs,
which causes already assigned bits to be overwritten.
Thanks,
tglx
------------------>
Rei Yamamoto (1):
genirq/affinity: Consider that CPUs on nodes can be unbalanced
kernel/irq/affinity.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/kernel/irq/affinity.c b/kernel/irq/affinity.c
index f7ff8919dc9b..fdf170404650 100644
--- a/kernel/irq/affinity.c
+++ b/kernel/irq/affinity.c
@@ -269,8 +269,9 @@ static int __irq_build_affinity_masks(unsigned int startvec,
*/
if (numvecs <= nodes) {
for_each_node_mask(n, nodemsk) {
- cpumask_or(&masks[curvec].mask, &masks[curvec].mask,
- node_to_cpumask[n]);
+ /* Ensure that only CPUs which are in both masks are set */
+ cpumask_and(nmsk, cpu_mask, node_to_cpumask[n]);
+ cpumask_or(&masks[curvec].mask, &masks[curvec].mask, nmsk);
if (++curvec == last_affv)
curvec = firstvec;
}
Powered by blists - more mailing lists