netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] net: fjes: fjes_main: Remove create_workqueue
@ 2016-06-02  9:30 Bhaktipriya Shridhar
  2016-06-02 14:57 ` Tejun Heo
  2016-06-02 23:55 ` Izumi, Taku
  0 siblings, 2 replies; 5+ messages in thread
From: Bhaktipriya Shridhar @ 2016-06-02  9:30 UTC (permalink / raw)
  To: David S. Miller, Taku Izumi, Florian Westphal,
	Bhaktipriya Shridhar
  Cc: Tejun Heo, netdev, linux-kernel

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>
---
 drivers/net/fjes/fjes_main.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/drivers/net/fjes/fjes_main.c b/drivers/net/fjes/fjes_main.c
index 86c331b..9006877 100644
--- a/drivers/net/fjes/fjes_main.c
+++ b/drivers/net/fjes/fjes_main.c
@@ -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,

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

end of thread, other threads:[~2016-06-04 19:37 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-06-02  9:30 [PATCH] net: fjes: fjes_main: Remove create_workqueue Bhaktipriya Shridhar
2016-06-02 14:57 ` Tejun Heo
2016-06-02 23:55 ` Izumi, Taku
2016-06-04 14:01   ` Bhaktipriya Shridhar
2016-06-04 19:37     ` David Miller

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).