[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20160830163428.GA25978@Karyakshetra>
Date: Tue, 30 Aug 2016 22:04:28 +0530
From: Bhaktipriya Shridhar <bhaktipriya96@...il.com>
To: Joshua Morris <josh.h.morris@...ibm.com>,
Philip Kelleher <pjk1939@...ux.vnet.ibm.com>
Cc: Tejun Heo <tj@...nel.org>, linux-kernel@...r.kernel.org
Subject: [PATCH] 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.
Signed-off-by: Bhaktipriya Shridhar <bhaktipriya96@...il.com>
---
drivers/block/rsxx/core.c | 3 ++-
drivers/block/rsxx/cregs.c | 4 ++--
2 files changed, 4 insertions(+), 3 deletions(-)
diff --git a/drivers/block/rsxx/core.c b/drivers/block/rsxx/core.c
index 34997df..d46cab9 100644
--- a/drivers/block/rsxx/core.c
+++ b/drivers/block/rsxx/core.c
@@ -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;
diff --git a/drivers/block/rsxx/cregs.c b/drivers/block/rsxx/cregs.c
index 926dce9..4f5a2e8 100644
--- a/drivers/block/rsxx/cregs.c
+++ b/drivers/block/rsxx/cregs.c
@@ -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
Powered by blists - more mailing lists