dm-crypt: don't set WQ_CPU_INTENSIVE for WQ_UNBOUND crypt_queue
authorMike Snitzer <snitzer@kernel.org>
Fri, 12 Apr 2024 14:58:05 +0000 (10:58 -0400)
committerMike Snitzer <snitzer@kernel.org>
Tue, 23 Apr 2024 15:20:16 +0000 (11:20 -0400)
Fix crypt_queue's use of WQ_UNBOUND to _not_ use WQ_CPU_INTENSIVE
because it is meaningless with WQ_UNBOUND.

Signed-off-by: Mike Snitzer <snitzer@kernel.org>
drivers/md/dm-crypt.c

index f43a2c0b3d77c0fbf4170a9f2b32b35d1fae0508..1b7a97cc37794313773189370955963775dbccd7 100644 (file)
@@ -3431,8 +3431,12 @@ static int crypt_ctr(struct dm_target *ti, unsigned int argc, char **argv)
                                                  common_wq_flags | WQ_CPU_INTENSIVE,
                                                  1, devname, wq_id);
        } else {
+               /*
+                * While crypt_queue is certainly CPU intensive, the use of
+                * WQ_CPU_INTENSIVE is meaningless with WQ_UNBOUND.
+                */
                cc->crypt_queue = alloc_workqueue("kcryptd-%s-%d",
-                                                 common_wq_flags | WQ_CPU_INTENSIVE | WQ_UNBOUND,
+                                                 common_wq_flags | WQ_UNBOUND,
                                                  num_online_cpus(), devname, wq_id);
        }
        if (!cc->crypt_queue) {