rsxx: Remove deprecated create_singlethread_workqueue
PATCH 1/1 rsxx: Remove deprecated create_singlethread_workqueue
The workqueue "creg_wq" queues a single work item viz &card->creg_ctrl.done_work and hence it doesn't require execution ordering. Hence, alloc_workqueue has been used to replace the deprecated create_singlethread_workqueue instance.
The workqueue "event_wq" queues a single work item viz &card->event_work and hence it doesn't require execution ordering. Hence, alloc_workqueue has been used to replace the deprecated create_singlethread_workqueue instance.
The WQ_MEM_RECLAIM flag has been set in both cases to ensure forward progress under memory pressure.
Since there are a fixed number of work items, explicit concurrency limit is unnecessary here.
--- drivers/block/rsxx/core.c | 3 ++- drivers/block/rsxx/cregs.c | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-)
drivers/block/rsxx/core.c +2 -1
@@ -887,7 +887,8 @@ static int rsxx_pci_probe(struct pci_dev *dev, }/************* Setup Card Event Handler *************/ - card->event_wq =create_singlethread_workqueue (DRIVER_NAME "_event" ); + card->event_wq =alloc_workqueue (DRIVER_NAME "_event" ,WQ_MEM_RECLAIM , +0 );if (!card->event_wq) {dev_err (CARD_TO_DEV (card),"Failed card event setup.\n" ); goto failed_event_handler;
drivers/block/rsxx/cregs.c +2 -2
@@ -736,8 +736,8 @@ int rsxx_creg_setup(struct rsxx_cardinfo *card) { card->creg_ctrl.active_cmd =NULL ; - card->creg_ctrl.creg_wq = -create_singlethread_workqueue (DRIVER_NAME "_creg" ); + card->creg_ctrl.creg_wq =alloc_workqueue (DRIVER_NAME "_creg" , +WQ_MEM_RECLAIM ,0 );if (!card->creg_ctrl.creg_wq)return -ENOMEM ;
--
2.1.4
Quoted 10 lines · Bhaktipriya Shridhar
The workqueue "
creg_wq" queues a single work item viz&card->creg_ctrl.done_workand hence it doesn't require execution ordering. Hence,alloc_workqueuehas been used to replace the deprecatedcreate_singlethread_workqueueinstance.The workqueue "
event_wq" queues a single work item viz&card->event_workand hence it doesn't require execution ordering. Hence,alloc_workqueuehas been used to replace the deprecatedcreate_singlethread_workqueueinstance.
Quoted 7 lines
The
WQ_MEM_RECLAIMflag has been set in both cases to ensure forward progress under memory pressure.Since there are a fixed number of work items, explicit concurrency limit is unnecessary here.
Signed-off-by Bhaktipriya Shridhar <[email protected]>
Thanks.
Signature · 1 line
tejun