From mboxrd@z Thu Jan 1 00:00:00 1970 From: Bhaktipriya Shridhar Subject: [PATCH 04/22] IB/ucma: Remove deprecated create_singlethread_workqueue Date: Mon, 15 Aug 2016 23:29:10 +0530 Message-ID: <1b0e0db2cb8858dddda24abc5376016bd72ad902.1471283717.git.bhaktipriya96@gmail.com> References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Content-Disposition: inline In-Reply-To: Sender: linux-rdma-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org To: Yishai Hadas , Doug Ledford , Sean Hefty , Hal Rosenstock , Jason Gunthorpe , Leon Romanovsky , Chuck Lever , Mark Bloch , Hans Westgaard Ry , Christoph Lameter , Erez Shitrit , Haggai Eran , Florian Westphal , Guy Shapiro , Eli Cohen , Or Gerlitz , Faisal Latif , Matan Barak , Chien Tin Tung , Mustafa Ismail , Shiraz Saleem , Tatyana Nikolova , Steve Wise Cc: linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, Tejun Heo List-Id: linux-rdma@vger.kernel.org alloc_ordered_workqueue() with WQ_MEM_RECLAIM set, replaces deprecated create_singlethread_workqueue(). This is the identity conversion. The workqueue "close_wq" queues work items &ctx->close_work (maps to ucma_close_id) and &con_req_eve->close_work (maps to ucma_close_event_id). It has been identity converted. WQ_MEM_RECLAIM has been set to ensure forward progress under memory pressure. Signed-off-by: Bhaktipriya Shridhar --- drivers/infiniband/core/ucma.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/infiniband/core/ucma.c b/drivers/infiniband/core/ucma.c index c0f3826..9045387 100644 --- a/drivers/infiniband/core/ucma.c +++ b/drivers/infiniband/core/ucma.c @@ -1628,7 +1628,8 @@ static int ucma_open(struct inode *inode, struct file *filp) if (!file) return -ENOMEM; - file->close_wq = create_singlethread_workqueue("ucma_close_id"); + file->close_wq = alloc_ordered_workqueue("ucma_close_id", + WQ_MEM_RECLAIM); if (!file->close_wq) { kfree(file); return -ENOMEM; -- 2.1.4 -- To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org More majordomo info at http://vger.kernel.org/majordomo-info.html From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753274AbcHOR7V (ORCPT ); Mon, 15 Aug 2016 13:59:21 -0400 Received: from mail-pa0-f65.google.com ([209.85.220.65]:35624 "EHLO mail-pa0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752997AbcHOR7T (ORCPT ); Mon, 15 Aug 2016 13:59:19 -0400 Date: Mon, 15 Aug 2016 23:29:10 +0530 From: Bhaktipriya Shridhar To: Yishai Hadas , Doug Ledford , Sean Hefty , Hal Rosenstock , Jason Gunthorpe , Leon Romanovsky , Chuck Lever , Mark Bloch , Hans Westgaard Ry , Christoph Lameter , Erez Shitrit , Haggai Eran , Florian Westphal , Guy Shapiro , Eli Cohen , Or Gerlitz , Faisal Latif , Matan Barak , Chien Tin Tung , Mustafa Ismail , Shiraz Saleem , Tatyana Nikolova , Steve Wise , Mike Marciniszyn , Bart Van Assche , Yotam Kenneth , Somnath Kotur , Moni Shoua , Shachar Raindel , Parav Pandit , Sagi Grimberg , Christoph Hellwig , Dean Luick , Ira Weiny , Kaike Wan Cc: linux-rdma@vger.kernel.org, linux-kernel@vger.kernel.org, Tejun Heo Subject: [PATCH 04/22] IB/ucma: Remove deprecated create_singlethread_workqueue Message-ID: <1b0e0db2cb8858dddda24abc5376016bd72ad902.1471283717.git.bhaktipriya96@gmail.com> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org alloc_ordered_workqueue() with WQ_MEM_RECLAIM set, replaces deprecated create_singlethread_workqueue(). This is the identity conversion. The workqueue "close_wq" queues work items &ctx->close_work (maps to ucma_close_id) and &con_req_eve->close_work (maps to ucma_close_event_id). It has been identity converted. WQ_MEM_RECLAIM has been set to ensure forward progress under memory pressure. Signed-off-by: Bhaktipriya Shridhar --- drivers/infiniband/core/ucma.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/infiniband/core/ucma.c b/drivers/infiniband/core/ucma.c index c0f3826..9045387 100644 --- a/drivers/infiniband/core/ucma.c +++ b/drivers/infiniband/core/ucma.c @@ -1628,7 +1628,8 @@ static int ucma_open(struct inode *inode, struct file *filp) if (!file) return -ENOMEM; - file->close_wq = create_singlethread_workqueue("ucma_close_id"); + file->close_wq = alloc_ordered_workqueue("ucma_close_id", + WQ_MEM_RECLAIM); if (!file->close_wq) { kfree(file); return -ENOMEM; -- 2.1.4