From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932445AbcFBIyt (ORCPT ); Thu, 2 Jun 2016 04:54:49 -0400 Received: from mail-pa0-f67.google.com ([209.85.220.67]:35967 "EHLO mail-pa0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932233AbcFBIyq (ORCPT ); Thu, 2 Jun 2016 04:54:46 -0400 Date: Thu, 2 Jun 2016 14:24:42 +0530 From: Bhaktipriya Shridhar To: "James E.J. Bottomley" , "Martin K. Petersen" , Hannes Reinecke , Bart Van Assche , Johannes Thumshirn , Ewan Milne Cc: Tejun Heo , linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] scsi: device_handler: Remove create_workqueue Message-ID: <20160602085441.GA14104@Karyakshetra> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline 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_workqueue() replaces deprecated create_workqueue(). A dedicated workqueue has been used since the workqueue kaluad_sync_wq was created with the purpose of STPGs to be submitted synchronously. The workitem (viz &pg->rtpg_work which maps to alua_rtpg_work) is involved in normal device operation and requires forward progress under memory pressure. alloc_workqueue() parameters for kaluad_sync_wq are similar to kaluad_wq. if (pg->flags & ALUA_SYNC_STPG) are set then kaluad_sync_wq is used else kaluad_wq. create_workqueue has been replaced with alloc_workqueue with max_active as 0 since there is no need for throttling the number of active work items. Lastly, WQ_MEM_RECLAIM flag has been added to guarantee forward progress in memory reclaim path. Signed-off-by: Bhaktipriya Shridhar --- drivers/scsi/device_handler/scsi_dh_alua.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/scsi/device_handler/scsi_dh_alua.c b/drivers/scsi/device_handler/scsi_dh_alua.c index 752b5c9..193b28f 100644 --- a/drivers/scsi/device_handler/scsi_dh_alua.c +++ b/drivers/scsi/device_handler/scsi_dh_alua.c @@ -1152,7 +1152,7 @@ static int __init alua_init(void) /* Temporary failure, bypass */ return SCSI_DH_DEV_TEMP_BUSY; } - kaluad_sync_wq = create_workqueue("kaluad_sync"); + kaluad_sync_wq = alloc_workqueue("kaluad_sync", WQ_MEM_RECLAIM, 0); if (!kaluad_sync_wq) { destroy_workqueue(kaluad_wq); return SCSI_DH_DEV_TEMP_BUSY; -- 2.1.4