Commit
c73b7d02da9bfb4fadafc118a24ee868708839b6
Exists in
master
and in
20 other branches
dlt-processor-sdk-linux-03.00.00.04, newt-ti-linux-3.12.y, processor-sdk-linux-01.00.00, processor-sdk-linux-02.00.01, smarc-ti-linux-3.12.10, smarc-ti-linux-3.12.y, smarc-ti-linux-3.14.y, smarc-ti-linux-3.15.y, smarc-ti-lsk-linux-4.1.y, smarct3x-processor-sdk-04.01.00.06, smarct3x-processor-sdk-linux-02.00.01, smarct3x-processor-sdk-linux-03.00.00.04, smarct4x-800-processor-sdk-linux-02.00.01, smarct4x-processor-sdk-04.01.00.06, smarct4x-processor-sdk-linux-02.00.01, smarct4x-processor-sdk-linux-03.00.00.04, ti-linux-3.12.y, ti-linux-3.14.y, ti-linux-3.15.y, ti-lsk-linux-4.1.y
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 <tj@kernel.org>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Showing
2 changed files
with
4 additions
and
2 deletions
Side-by-side Diff
... |
... |
@@ -20,7 +20,8 @@ |
20
|
20 |
|
21
|
21 |
static int __init crypto_wq_init(void) |
22
|
22 |
{ |
23
|
|
- kcrypto_wq = create_workqueue("crypto"); |
|
23 |
+ kcrypto_wq = alloc_workqueue("crypto", |
|
24 |
+ WQ_MEM_RECLAIM | WQ_CPU_INTENSIVE, 1); |
24
|
25 |
if (unlikely(!kcrypto_wq)) |
25
|
26 |
return -ENOMEM; |
26
|
27 |
return 0; |
... |
... |
@@ -455,7 +455,8 @@ |
455
|
455 |
|
456
|
456 |
get_online_cpus(); |
457
|
457 |
|
458
|
|
- pcrypt->wq = create_workqueue(name); |
|
458 |
+ pcrypt->wq = alloc_workqueue(name, |
|
459 |
+ WQ_MEM_RECLAIM | WQ_CPU_INTENSIVE, 1); |
459
|
460 |
if (!pcrypt->wq) |
460
|
461 |
goto err; |
461
|
462 |
|