Skip to content

Commit 60b1ca1

Browse files
gcabiddugregkh
authored andcommitted
crypto: iaa - fix per-node CPU counter reset in rebalance_wq_table()
[ Upstream commit 590fa5d ] The cpu counter used to compute the IAA device index is reset to zero at the start of each NUMA node iteration. This causes CPUs on every node to map starting from IAA index 0 instead of continuing from the previous node's last index. On multi-node systems, this results in all nodes mapping their CPUs to the same initial set of IAA devices, leaving higher-indexed devices unused. Move the cpu counter initialization before the for_each_node_with_cpus() loop so that the IAA index computation accumulates correctly across all nodes. Fixes: 714ca27 ("crypto: iaa - Optimize rebalance_wq_table()") Signed-off-by: Giovanni Cabiddu <giovanni.cabiddu@intel.com> Acked-by: Vinicius Costa Gomes <vinicius.gomes@intel.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au> Signed-off-by: Sasha Levin <sashal@kernel.org>
1 parent f47c9fd commit 60b1ca1

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

drivers/crypto/intel/iaa/iaa_crypto_main.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -906,8 +906,8 @@ static void rebalance_wq_table(void)
906906
return;
907907
}
908908

909+
cpu = 0;
909910
for_each_node_with_cpus(node) {
910-
cpu = 0;
911911
node_cpus = cpumask_of_node(node);
912912

913913
for_each_cpu(node_cpu, node_cpus) {

0 commit comments

Comments
 (0)