linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] scsi: device_handler: Remove create_workqueue
@ 2016-06-02  8:54 Bhaktipriya Shridhar
  2016-06-02 14:57 ` Tejun Heo
  0 siblings, 1 reply; 2+ messages in thread
From: Bhaktipriya Shridhar @ 2016-06-02  8:54 UTC (permalink / raw)
  To: James E.J. Bottomley, Martin K. Petersen, Hannes Reinecke,
	Bart Van Assche, Johannes Thumshirn, Ewan Milne
  Cc: Tejun Heo, linux-scsi, linux-kernel

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 <bhaktipriya96@gmail.com>
---
 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

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] scsi: device_handler: Remove create_workqueue
  2016-06-02  8:54 [PATCH] scsi: device_handler: Remove create_workqueue Bhaktipriya Shridhar
@ 2016-06-02 14:57 ` Tejun Heo
  0 siblings, 0 replies; 2+ messages in thread
From: Tejun Heo @ 2016-06-02 14:57 UTC (permalink / raw)
  To: Bhaktipriya Shridhar
  Cc: James E.J. Bottomley, Martin K. Petersen, Hannes Reinecke,
	Bart Van Assche, Johannes Thumshirn, Ewan Milne, linux-scsi,
	linux-kernel

Ditto with other patches.

Thanks.

-- 
tejun

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2016-06-02 14:57 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-06-02  8:54 [PATCH] scsi: device_handler: Remove create_workqueue Bhaktipriya Shridhar
2016-06-02 14:57 ` 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).