Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1416491

[RFC] IB/srp: Remove create_workqueue

From Bhaktipriya Shridhar <bhaktipriya96@gmail.com>
Newsgroups linux.kernel
Subject [RFC] IB/srp: Remove create_workqueue
Date 2016-06-07 20:20 +0200
Message-ID <rHtLz-64y-1@gated-at.bofh.it> (permalink)
Organization linux.* mail to news gateway

Show all headers | View raw


alloc_workqueue replaces deprecated create_workqueue().

A dedicated workqueue has been used since the workqueue srp_remove_wq with
workitem &target->remove_work, is a work queue for the SRP target removal.
WQ_MEM_RECLAIM has been set to ensure forward progress under memory
pressure.
Since there are only a fixed number of work items, explicit
concurrency limit is unnecessary here.

Is the workqueue being used on a memory reclaim path?
Does it require WQ_MEM_RECLAIM?

Thanks.

Signed-off-by: Bhaktipriya Shridhar <bhaktipriya96@gmail.com>
---
 drivers/infiniband/ulp/srp/ib_srp.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/infiniband/ulp/srp/ib_srp.c b/drivers/infiniband/ulp/srp/ib_srp.c
index 646de17..1730d1f 100644
--- a/drivers/infiniband/ulp/srp/ib_srp.c
+++ b/drivers/infiniband/ulp/srp/ib_srp.c
@@ -3685,7 +3685,7 @@ static int __init srp_init_module(void)
 		indirect_sg_entries = cmd_sg_entries;
 	}

-	srp_remove_wq = create_workqueue("srp_remove");
+	srp_remove_wq = alloc_workqueue("srp_remove", WQ_MEM_RECLAIM, 0);
 	if (!srp_remove_wq) {
 		ret = -ENOMEM;
 		goto out;
--
2.1.4

Back to linux.kernel | Previous | Next — Next in thread | Find similar | Unroll thread


Thread

[RFC] IB/srp: Remove create_workqueue Bhaktipriya Shridhar <bhaktipriya96@gmail.com> - 2016-06-07 20:20 +0200
  Re: [RFC] IB/srp: Remove create_workqueue Tejun Heo <tj@kernel.org> - 2016-06-07 21:30 +0200

csiph-web