From: Bhaktipriya Shridhar <bhaktipriya96@gmail.com>
To: "James E.J. Bottomley" <jejb@linux.vnet.ibm.com>,
"Martin K. Petersen" <martin.petersen@oracle.com>,
Hannes Reinecke <hare@suse.de>,
Bart Van Assche <bart.vanassche@sandisk.com>,
Johannes Thumshirn <jthumshirn@suse.de>,
Ewan Milne <emilne@redhat.com>
Cc: Tejun Heo <tj@kernel.org>,
linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [PATCH] scsi: device_handler: Remove create_workqueue
Date: Thu, 2 Jun 2016 14:24:42 +0530 [thread overview]
Message-ID: <20160602085441.GA14104@Karyakshetra> (raw)
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
next reply other threads:[~2016-06-02 8:54 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-06-02 8:54 Bhaktipriya Shridhar [this message]
2016-06-02 14:57 ` [PATCH] scsi: device_handler: Remove create_workqueue Tejun Heo
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20160602085441.GA14104@Karyakshetra \
--to=bhaktipriya96@gmail.com \
--cc=bart.vanassche@sandisk.com \
--cc=emilne@redhat.com \
--cc=hare@suse.de \
--cc=jejb@linux.vnet.ibm.com \
--cc=jthumshirn@suse.de \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-scsi@vger.kernel.org \
--cc=martin.petersen@oracle.com \
--cc=tj@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).