s390: Remove deprecated create_singlethread_workqueue
authorBhaktipriya Shridhar <bhaktipriya96@gmail.com>
Tue, 30 Aug 2016 20:27:20 +0000 (01:57 +0530)
committerMartin Schwidefsky <schwidefsky@de.ibm.com>
Tue, 6 Sep 2016 08:59:57 +0000 (10:59 +0200)
The workqueue "appldata_wq" has been replaced with an ordered dedicated
workqueue.

WQ_MEM_RECLAIM has not been set since the workqueue is not being used on
a memory reclaim path.

The adapter->work_queue queues multiple work items viz
&adapter->scan_work, &port->rport_work, &adapter->ns_up_work,
&adapter->stat_work, adapter->work_queue, &adapter->events.work,
&port->gid_pn_work, &port->test_link_work. Hence, an ordered
dedicated workqueue has been used.

WQ_MEM_RECLAIM has been set to ensure forward progress under memory
pressure.

Signed-off-by: Bhaktipriya Shridhar <bhaktipriya96@gmail.com>
Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
arch/s390/appldata/appldata_base.c
drivers/s390/scsi/zfcp_aux.c

index 15c94246b600454d8c4247722dc3a29812c229ca..f587c4811faf139a70df3d19ad858deb7df69665 100644 (file)
@@ -542,7 +542,7 @@ static int __init appldata_init(void)
                rc = PTR_ERR(appldata_pdev);
                goto out_driver;
        }
-       appldata_wq = create_singlethread_workqueue("appldata");
+       appldata_wq = alloc_ordered_workqueue("appldata", 0);
        if (!appldata_wq) {
                rc = -ENOMEM;
                goto out_device;
index c00ac4650dce29b8038bd79ace99b07f77753c8b..bcc8f3dfd4c4228d5c34286a9f33284b12946773 100644 (file)
@@ -310,7 +310,7 @@ static int zfcp_setup_adapter_work_queue(struct zfcp_adapter *adapter)
 
        snprintf(name, sizeof(name), "zfcp_q_%s",
                 dev_name(&adapter->ccw_device->dev));
-       adapter->work_queue = create_singlethread_workqueue(name);
+       adapter->work_queue = alloc_ordered_workqueue(name, WQ_MEM_RECLAIM);
 
        if (adapter->work_queue)
                return 0;