crypto: qat - Remove deprecated create_workqueue
authorBhaktipriya Shridhar <bhaktipriya96@gmail.com>
Tue, 7 Jun 2016 21:17:47 +0000 (02:47 +0530)
committerHerbert Xu <herbert@gondor.apana.org.au>
Mon, 13 Jun 2016 09:47:48 +0000 (17:47 +0800)
alloc_workqueue replaces deprecated create_workqueue().

The workqueue device_reset_wq has workitem &reset_data->reset_work per
adf_reset_dev_data. The workqueue  pf2vf_resp_wq is a workqueue for
PF2VF responses has workitem &pf2vf_resp->pf2vf_resp_work per pf2vf_resp.
The workqueue adf_vf_stop_wq is used to call adf_dev_stop()
asynchronously.

Dedicated workqueues have been used in all cases since the workitems
on the workqueues are involved in operation of crypto which can be used in
the IO path which is depended upon during memory reclaim. Hence,
WQ_MEM_RECLAIM has been set to gurantee forward progress under memory
pressure.
Since there are only a fixed number of work items, explicit concurrency
limit is unnecessary.

Signed-off-by: Bhaktipriya Shridhar <bhaktipriya96@gmail.com>
Acked-by: Tejun Heo <tj@kernel.org>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
drivers/crypto/qat/qat_common/adf_aer.c
drivers/crypto/qat/qat_common/adf_sriov.c
drivers/crypto/qat/qat_common/adf_vf_isr.c

index b40d9c8dad964a122dba95371466d736a3f6a9f1..7bfb57f1bcb52cac01a19f21b518bc9cc2ae9d62 100644 (file)
@@ -243,7 +243,8 @@ EXPORT_SYMBOL_GPL(adf_disable_aer);
 
 int adf_init_aer(void)
 {
-       device_reset_wq = create_workqueue("qat_device_reset_wq");
+       device_reset_wq = alloc_workqueue("qat_device_reset_wq",
+                                         WQ_MEM_RECLAIM, 0);
        return !device_reset_wq ? -EFAULT : 0;
 }
 
index 4a526e2f1d7ff926fe57ea3f3ff36a02bd952de3..9320ae1d005bbd96cbc8a5c4f777fb5c41b5dae3 100644 (file)
@@ -292,7 +292,7 @@ EXPORT_SYMBOL_GPL(adf_sriov_configure);
 int __init adf_init_pf_wq(void)
 {
        /* Workqueue for PF2VF responses */
-       pf2vf_resp_wq = create_workqueue("qat_pf2vf_resp_wq");
+       pf2vf_resp_wq = alloc_workqueue("qat_pf2vf_resp_wq", WQ_MEM_RECLAIM, 0);
 
        return !pf2vf_resp_wq ? -ENOMEM : 0;
 }
index aa689cabedb4b598fc9517b1f3b07e07b823447c..bf99e11a3403d49b660fd41f35f5d5a14600e39f 100644 (file)
@@ -321,7 +321,7 @@ EXPORT_SYMBOL_GPL(adf_vf_isr_resource_alloc);
 
 int __init adf_init_vf_wq(void)
 {
-       adf_vf_stop_wq = create_workqueue("adf_vf_stop_wq");
+       adf_vf_stop_wq = alloc_workqueue("adf_vf_stop_wq", WQ_MEM_RECLAIM, 0);
 
        return !adf_vf_stop_wq ? -EFAULT : 0;
 }