Skip to content

Commit 8d77cf2

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 52906bb commit 8d77cf2

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
@@ -911,8 +911,8 @@ static void rebalance_wq_table(void)
911911
return;
912912
}
913913

914+
cpu = 0;
914915
for_each_node_with_cpus(node) {
915-
cpu = 0;
916916
node_cpus = cpumask_of_node(node);
917917

918918
for_each_cpu(node_cpu, node_cpus) {

0 commit comments

Comments
 (0)