* [PATCH] rsxx: Remove deprecated create_singlethread_workqueue
@ 2016-08-30 16:34 Bhaktipriya Shridhar
2016-08-31 14:06 ` Tejun Heo
0 siblings, 1 reply; 2+ messages in thread
From: Bhaktipriya Shridhar @ 2016-08-30 16:34 UTC (permalink / raw)
To: Joshua Morris, Philip Kelleher; +Cc: Tejun Heo, linux-kernel
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@gmail.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
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] rsxx: Remove deprecated create_singlethread_workqueue
2016-08-30 16:34 [PATCH] rsxx: Remove deprecated create_singlethread_workqueue Bhaktipriya Shridhar
@ 2016-08-31 14:06 ` Tejun Heo
0 siblings, 0 replies; 2+ messages in thread
From: Tejun Heo @ 2016-08-31 14:06 UTC (permalink / raw)
To: Bhaktipriya Shridhar; +Cc: Joshua Morris, Philip Kelleher, linux-kernel
On Tue, Aug 30, 2016 at 10:04:28PM +0530, Bhaktipriya Shridhar wrote:
> 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@gmail.com>
Acked-by: Tejun Heo <tj@kernel.org>
Thanks.
--
tejun
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2016-08-31 14:06 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-08-30 16:34 [PATCH] rsxx: Remove deprecated create_singlethread_workqueue Bhaktipriya Shridhar
2016-08-31 14:06 ` Tejun Heo
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).