lkml.org 
[lkml]   [2010]   [Jun]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH 35/35] pcrypt: use HIGHPRI and CPU_INTENSIVE workqueues for padata
Date
pcrypt padata works are cpu intensive and shouldn't affect or be
affected by workqueue concurrency management. Allocate padata
workqueues with WQ_HIGHPRI and WQ_CPU_INTENSIVE flags set.

Now that creating workqueues doesn't cost that much and less direct
manipulation of workers is allowed, it might make sense to update
padata interface such that it allocates workqueues with proper flags
itself.

Signed-off-by: Tejun Heo <tj@kernel.org>
Cc: Herbert Xu <herbert@gondor.apana.org.au>
Cc: David S. Miller <davem@davemloft.net>
Cc: Steffen Klassert <steffen.klassert@secunet.com>
---
crypto/pcrypt.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/crypto/pcrypt.c b/crypto/pcrypt.c
index 247178c..4728cdc 100644
--- a/crypto/pcrypt.c
+++ b/crypto/pcrypt.c
@@ -385,11 +385,11 @@ static struct crypto_template pcrypt_tmpl = {

static int __init pcrypt_init(void)
{
- encwq = create_workqueue("pencrypt");
+ encwq = alloc_workqueue("pencrypt", WQ_HIGHPRI | WQ_CPU_INTENSIVE, 1);
if (!encwq)
goto err;

- decwq = create_workqueue("pdecrypt");
+ decwq = alloc_workqueue("pdecrypt", WQ_HIGHPRI | WQ_CPU_INTENSIVE, 1);
if (!decwq)
goto err_destroy_encwq;

--
1.6.4.2


\
 
 \ /
  Last update: 2010-06-28 23:09    [W:0.280 / U:3.360 seconds]
©2003-2017 Jasper Spaans. hosted at Digital OceanAdvertise on this site