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


Groups > linux.kernel > #1416491 > unrolled thread

[RFC] IB/srp: Remove create_workqueue

Started byBhaktipriya Shridhar <bhaktipriya96@gmail.com>
First post2016-06-07 20:20 +0200
Last post2016-06-07 21:30 +0200
Articles 2 — 2 participants

Back to article view | Back to linux.kernel


Contents

  [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

#1416491 — [RFC] IB/srp: Remove create_workqueue

FromBhaktipriya Shridhar <bhaktipriya96@gmail.com>
Date2016-06-07 20:20 +0200
Subject[RFC] IB/srp: Remove create_workqueue
Message-ID<rHtLz-64y-1@gated-at.bofh.it>
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

[toc] | [next] | [standalone]


#1416523

FromTejun Heo <tj@kernel.org>
Date2016-06-07 21:30 +0200
Message-ID<rHuRk-6J6-35@gated-at.bofh.it>
In reply to#1416491
On Tue, Jun 07, 2016 at 11:32:42AM -0700, Bart Van Assche wrote:
> On 06/07/2016 11:16 AM, Bhaktipriya Shridhar wrote:
> > 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?
> 
> Hello Bhaktipriya,
> 
> srp_remove_wq is used for SRP target port removal work only. This work is
> neither queued from inside a shrinker nor by the page writeback code so I
> think it is safe to drop WQ_MEM_RECLAIM.

It should be able to use system_wq then.

Thanks for the explanation!

-- 
tejun

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web