public inbox for linux-crypto@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] crypto: iaa - fix per-node CPU counter reset in rebalance_wq_table()
@ 2026-03-24 18:29 Giovanni Cabiddu
  2026-03-24 19:44 ` Vinicius Costa Gomes
  0 siblings, 1 reply; 2+ messages in thread
From: Giovanni Cabiddu @ 2026-03-24 18:29 UTC (permalink / raw)
  To: herbert, vinicius.gomes, kristen.c.accardi; +Cc: linux-crypto, Giovanni Cabiddu

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: 714ca27e9bf4 ("crypto: iaa - Optimize rebalance_wq_table()")
Signed-off-by: Giovanni Cabiddu <giovanni.cabiddu@intel.com>
---
 drivers/crypto/intel/iaa/iaa_crypto_main.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/crypto/intel/iaa/iaa_crypto_main.c b/drivers/crypto/intel/iaa/iaa_crypto_main.c
index 547abf453d4a..f62b994e18e5 100644
--- a/drivers/crypto/intel/iaa/iaa_crypto_main.c
+++ b/drivers/crypto/intel/iaa/iaa_crypto_main.c
@@ -906,8 +906,8 @@ static void rebalance_wq_table(void)
 		return;
 	}
 
+	cpu = 0;
 	for_each_node_with_cpus(node) {
-		cpu = 0;
 		node_cpus = cpumask_of_node(node);
 
 		for_each_cpu(node_cpu, node_cpus) {
-- 
2.53.0


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] crypto: iaa - fix per-node CPU counter reset in rebalance_wq_table()
  2026-03-24 18:29 [PATCH] crypto: iaa - fix per-node CPU counter reset in rebalance_wq_table() Giovanni Cabiddu
@ 2026-03-24 19:44 ` Vinicius Costa Gomes
  0 siblings, 0 replies; 2+ messages in thread
From: Vinicius Costa Gomes @ 2026-03-24 19:44 UTC (permalink / raw)
  To: Giovanni Cabiddu, herbert, kristen.c.accardi
  Cc: linux-crypto, Giovanni Cabiddu

Giovanni Cabiddu <giovanni.cabiddu@intel.com> writes:

> 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: 714ca27e9bf4 ("crypto: iaa - Optimize rebalance_wq_table()")
> Signed-off-by: Giovanni Cabiddu <giovanni.cabiddu@intel.com>
> ---

Acked-by: Vinicius Costa Gomes <vinicius.gomes@intel.com>


-- 
Vinicius

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2026-03-24 19:44 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-03-24 18:29 [PATCH] crypto: iaa - fix per-node CPU counter reset in rebalance_wq_table() Giovanni Cabiddu
2026-03-24 19:44 ` Vinicius Costa Gomes

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox