From c73b7d02da9bfb4fadafc118a24ee868708839b6 Mon Sep 17 00:00:00 2001 From: Tejun Heo Date: Tue, 4 Jan 2011 15:38:44 +1100 Subject: crypto: mark crypto workqueues CPU_INTENSIVE kcrypto_wq and pcrypt->wq's are used to run ciphers and may consume considerable amount of CPU cycles. Mark both as CPU_INTENSIVE so that they don't block other work items. As the workqueues are primarily used to burn CPU cycles, concurrency levels shouldn't matter much and are left at 1. A higher value may be beneficial and needs investigation. Signed-off-by: Tejun Heo Signed-off-by: Herbert Xu --- crypto/crypto_wq.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'crypto/crypto_wq.c') diff --git a/crypto/crypto_wq.c b/crypto/crypto_wq.c index fdcf6248f152..b980ee1af459 100644 --- a/crypto/crypto_wq.c +++ b/crypto/crypto_wq.c @@ -20,7 +20,8 @@ EXPORT_SYMBOL_GPL(kcrypto_wq); static int __init crypto_wq_init(void) { - kcrypto_wq = create_workqueue("crypto"); + kcrypto_wq = alloc_workqueue("crypto", + WQ_MEM_RECLAIM | WQ_CPU_INTENSIVE, 1); if (unlikely(!kcrypto_wq)) return -ENOMEM; return 0; -- cgit v1.2.3