Yury Norov
714ca27e9b
crypto: iaa - Optimize rebalance_wq_table()
...
The function opencodes for_each_cpu() by using a plain for-loop. The
loop calls cpumask_weight() inside the conditional section. Because
cpumask_weight() is O(1), the overall complexity of the function is
O(node * node_cpus^2). Also, cpumask_nth() internally calls hweight(),
which, if not hardware accelerated, is slower than cpumask_next() in
for_each_cpu().
If switched to the dedicated for_each_cpu(), the rebalance_wq_table()
can drop calling cpumask_weight(), together with some housekeeping code.
This makes the overall complexity O(node * node_cpus), or simply speaking
O(nr_cpu_ids).
While there, fix opencoded for_each_possible_cpu() too.
Signed-off-by: Yury Norov <yury.norov@gmail.com >
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au >
2025-05-14 17:45:22 +08:00
..
2025-04-25 10:29:43 +02:00
2025-04-05 10:30:12 +02:00
2025-04-20 15:30:53 -07:00
2025-04-15 15:11:12 +02:00
2025-04-22 16:06:05 +09:00
2025-04-05 10:30:12 +02:00
2025-04-05 10:30:12 +02:00
2025-04-30 08:37:52 -07:00
2025-05-02 10:24:37 -07:00
2025-04-25 15:03:19 -04:00
2025-04-05 10:30:12 +02:00
2025-03-20 09:11:09 +01:00
2025-05-12 13:32:53 +08:00
2025-04-03 12:21:44 -07:00
2025-04-04 09:49:17 -07:00
2025-04-15 15:18:55 +02:00
2025-04-02 18:03:34 -07:00
2025-04-30 16:27:34 +02:00
2025-03-25 20:40:51 -07:00
2025-05-14 17:45:22 +08:00
2025-04-21 08:30:13 -07:00
2025-04-05 10:30:12 +02:00
2025-04-11 14:22:22 +02:00
2025-03-20 21:38:01 +01:00
2025-04-28 12:38:53 +02:00
2025-04-05 10:30:12 +02:00
2025-05-01 14:43:44 +09:00
2025-04-11 17:32:38 -07:00
2025-04-11 20:47:45 -03:00
2025-04-14 20:31:00 +02:00
2025-05-02 14:12:52 +10:00
2025-04-05 10:30:12 +02:00
2025-04-05 10:30:12 +02:00
2025-04-05 10:30:12 +02:00
2025-04-05 10:30:12 +02:00
2025-04-25 21:13:53 +00:00
2025-04-05 10:30:12 +02:00
2025-03-21 17:12:04 -05:00
2025-04-15 13:29:03 +02:00
2025-04-29 10:18:51 +02:00
2025-03-31 11:44:00 +02:00
2025-03-25 15:00:18 -07:00
2025-04-20 11:57:54 -07:00
2025-04-10 14:47:55 -03:00
2025-04-20 11:57:54 -07:00
2025-05-02 08:57:00 -07:00
2025-05-02 21:07:02 +02:00
2025-04-05 10:30:12 +02:00
2025-04-05 10:30:12 +02:00
2025-04-05 10:30:12 +02:00
2025-04-05 10:30:12 +02:00
2025-04-15 18:21:39 +02:00
2025-04-28 12:18:21 -07:00
2025-04-05 10:30:12 +02:00
2025-04-05 10:30:12 +02:00
2025-04-05 10:30:12 +02:00
2025-03-26 19:57:34 -07:00
2025-03-29 14:33:13 -07:00
2025-04-26 13:02:36 -07:00
2025-04-07 17:58:41 +02:00
2025-04-05 10:30:12 +02:00
2025-04-07 09:02:49 +02:00
2025-05-01 07:24:05 -07:00
2025-04-05 10:30:12 +02:00
2025-04-04 14:23:07 -07:00
2025-04-02 20:27:18 -07:00
2025-05-02 10:24:37 -07:00
2025-04-11 14:41:22 +02:00
2025-03-29 11:23:16 -07:00
2025-04-05 10:30:12 +02:00
2025-04-26 13:02:36 -07:00
2025-04-05 10:30:12 +02:00
2025-03-28 19:36:53 -07:00
2025-04-01 12:47:11 -07:00
2025-04-29 10:27:25 +02:00
2025-04-23 13:05:26 +03:00
2025-04-02 18:09:17 -07:00
2025-04-20 11:57:54 -07:00
2025-03-25 15:00:18 -07:00
2025-04-15 18:22:32 +02:00
2025-05-01 07:01:31 -07:00
2025-04-12 08:11:19 -07:00
2025-04-08 19:30:58 +02:00
2025-04-02 10:30:10 -07:00
2025-03-22 08:42:39 -05:00
2025-03-29 17:18:50 -07:00
2025-04-05 10:30:12 +02:00
2025-04-09 12:12:41 +02:00
2025-05-02 11:14:58 -07:00
2025-04-04 09:06:32 -07:00
2025-04-30 16:23:37 +02:00
2025-05-02 16:33:50 -07:00
2025-04-05 10:30:12 +02:00
2025-04-11 22:13:00 -04:00
2025-04-15 18:57:25 +02:00
2025-04-02 18:23:31 -07:00
2025-04-15 15:02:39 +02:00
2025-04-28 21:23:29 -04:00
2025-04-18 06:49:40 +02:00
2025-04-14 08:31:45 -06:00
2025-04-18 10:08:11 -04:00
2025-04-05 10:30:12 +02:00
2025-04-05 10:30:12 +02:00
2025-04-18 10:05:49 -04:00
2025-04-05 10:30:12 +02:00
2025-04-07 11:24:12 +02:00