Skip to contentSkip to conversation

dwc_eth_qos: Remove deprecated create_singlethread_workqueue

PATCH Applied Bhaktipriya Shridhar 2 participants 2 messages Jul 16, 2016 – Jul 18, 2016

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 dwc_eth_qos: Remove deprecated create_singlethread_workqueue

alloc_workqueue replaces deprecated create_singlethread_workqueue().

A dedicated workqueue has been used since the workitem viz lp->txtimeout_reinit is involved in reinitialization if a TX timeout occurs, which is necessary to guarantee forward progress in packet processing. As a network device can be used during memory reclaim, the workqueue needs forward progress guarantee under memory pressure. WQ_MEM_RECLAIM has been set to ensure this.

Since there is only a single work item, explicit concurrency limit is unnecessary here.

---
 drivers/net/ethernet/synopsys/dwc_eth_qos.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/net/ethernet/synopsys/dwc_eth_qos.c +2 -1
index 158213c..44c4cd6 100644
@@ -2934,7 +2934,8 @@ static int dwceqos_probe(struct platform_device *pdev)
 		     (unsigned long)ndev);
 	tasklet_disable(&lp->tx_bdreclaim_tasklet);
 
-	lp->txtimeout_handler_wq = create_singlethread_workqueue(DRIVER_NAME);
+	lp->txtimeout_handler_wq = alloc_workqueue(DRIVER_NAME,
+						   WQ_MEM_RECLAIM, 0);
 	INIT_WORK(&lp->txtimeout_reinit, dwceqos_reinit_for_txtimeout);
 
 	platform_set_drvdata(pdev, ndev);
maintainer Applied
#1 lore raw

From: Bhaktipriya Shridhar <[email protected]>
Date: Sat, 16 Jul 2016 13:53:28 +0530

Quoted 9 lines

alloc_workqueue replaces deprecated create_singlethread_workqueue().

A dedicated workqueue has been used since the workitem viz lp->txtimeout_reinit is involved in reinitialization if a TX timeout occurs, which is necessary to guarantee forward progress in packet processing. As a network device can be used during memory reclaim, the workqueue needs forward progress guarantee under memory pressure. WQ_MEM_RECLAIM has been set to ensure this.

Quoted 4 lines

Since there is only a single work item, explicit concurrency limit is unnecessary here.

Applied.