Use unbound workqueue so that work is automatically ballanced between available CPUs. Note: workqueue implementation is somehow buggy, so it still does not yield full parallelization across multiple CPUs. Signed-off-by: Mikulas Patocka <mpatocka@xxxxxxxxxx> --- drivers/md/dm-crypt.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/md/dm-crypt.c b/drivers/md/dm-crypt.c index 7a3e8eb..4c8b4e0 100644 --- a/drivers/md/dm-crypt.c +++ b/drivers/md/dm-crypt.c @@ -1649,8 +1649,9 @@ static int crypt_ctr(struct dm_target *ti, unsigned int argc, char **argv) cc->crypt_queue = alloc_workqueue("kcryptd", WQ_NON_REENTRANT| WQ_CPU_INTENSIVE| - WQ_MEM_RECLAIM, - 1); + WQ_MEM_RECLAIM| + WQ_UNBOUND, + num_online_cpus()); if (!cc->crypt_queue) { ti->error = "Couldn't create kcryptd queue"; goto bad; -- 1.7.10.4 -- dm-devel mailing list dm-devel@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/dm-devel