net: fjes: fjes_main: Remove create_workqueue
authorBhaktipriya Shridhar <bhaktipriya96@gmail.com>
Thu, 2 Jun 2016 09:30:57 +0000 (15:00 +0530)
committerDavid S. Miller <davem@davemloft.net>
Fri, 3 Jun 2016 23:29:42 +0000 (19:29 -0400)
alloc_workqueue replaces deprecated create_workqueue().

The workqueue adapter->txrx_wq has workitem
&adapter->raise_intr_rxdata_task per adapter. Extended Socket Network
Device is shared memory based, so someone's transmission denotes other's
reception.  raise_intr_rxdata_task raises interruption of receivers from
the sender in order to notify receivers.

The workqueue adapter->control_wq has workitem
&adapter->interrupt_watch_task per adapter. interrupt_watch_task is used
to prevent delay of interrupts.

Dedicated workqueues have been used in both cases since the workitems
on the workqueues are involved in normal device operation and require
forward progress under memory pressure.

max_active has been set to 0 since there is no need for throttling
the number of active work items.

Since network devices  may be used for memory reclaim,
WQ_MEM_RECLAIM has been set to guarantee forward progress.

Signed-off-by: Bhaktipriya Shridhar <bhaktipriya96@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/fjes/fjes_main.c

index 86c331bb5eb38ffbb9833740fd9fd05ea3bf237c..9006877c53f2825e92be58edc05f5745b7479265 100644 (file)
@@ -1187,8 +1187,9 @@ static int fjes_probe(struct platform_device *plat_dev)
        adapter->force_reset = false;
        adapter->open_guard = false;
 
-       adapter->txrx_wq = create_workqueue(DRV_NAME "/txrx");
-       adapter->control_wq = create_workqueue(DRV_NAME "/control");
+       adapter->txrx_wq = alloc_workqueue(DRV_NAME "/txrx", WQ_MEM_RECLAIM, 0);
+       adapter->control_wq = alloc_workqueue(DRV_NAME "/control",
+                                             WQ_MEM_RECLAIM, 0);
 
        INIT_WORK(&adapter->tx_stall_task, fjes_tx_stall_task);
        INIT_WORK(&adapter->raise_intr_rxdata_task,