crypto: qat: Remove deprecated create_workqueue
PATCH 1/1 crypto: qat: Remove deprecated create_workqueue
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.
--- drivers/crypto/qat/qat_common/adf_aer.c | 3 ++- drivers/crypto/qat/qat_common/adf_sriov.c | 2 +- drivers/crypto/qat/qat_common/adf_vf_isr.c | 2 +- 3 files changed, 4 insertions(+), 3 deletions(-)
drivers/crypto/qat/qat_common/adf_aer.c +2 -1
@@ -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 ; }
drivers/crypto/qat/qat_common/adf_sriov.c +1 -1
@@ -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 ; }
drivers/crypto/qat/qat_common/adf_vf_isr.c +1 -1
@@ -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 ; }
Quoted 16 lines · Bhaktipriya Shridhar
alloc_workqueuereplaces deprecatedcreate_workqueue().The workqueue
device_reset_wqhas workitem&reset_data->reset_workperadf_reset_dev_data. The workqueuepf2vf_resp_wqis a workqueue for PF2VF responses has workitem&pf2vf_resp->pf2vf_resp_workperpf2vf_resp. The workqueueadf_vf_stop_wqis used to calladf_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_RECLAIMhas been set to gurantee forward progress under memory pressure.
Since there are only a fixed number of work items, explicit concurrency limit is unnecessary.
Quoted 1 line
Signed-off-by Bhaktipriya Shridhar <[email protected]>
Thanks.
Signature · 1 line
tejun
Herbert Xu
maintainerQuoted 16 lines · Bhaktipriya Shridhar
alloc_workqueuereplaces deprecatedcreate_workqueue().The workqueue
device_reset_wqhas workitem&reset_data->reset_workperadf_reset_dev_data. The workqueuepf2vf_resp_wqis a workqueue for PF2VF responses has workitem&pf2vf_resp->pf2vf_resp_workperpf2vf_resp. The workqueueadf_vf_stop_wqis used to calladf_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_RECLAIMhas been set to gurantee forward progress under memory pressure.
Since there are only a fixed number of work items, explicit concurrency limit is unnecessary.
Quoted 1 line
Signed-off-by Bhaktipriya Shridhar <[email protected]>
Patch applied. Thanks.
Signature · 3 lines
Email: Herbert Xu <[email protected]> Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt