net: fjes: fjes_main: Remove create_workqueue
Subsystems (2)
PATCH 1/1 net: fjes: fjes_main: Remove create_workqueue
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.
--- drivers/net/fjes/fjes_main.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)
drivers/net/fjes/fjes_main.c +3 -2
@@ -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,
Quoted 16 lines · Bhaktipriya Shridhar
alloc_workqueuereplaces deprecatedcreate_workqueue().The workqueue
adapter->txrx_wqhas workitem&adapter->raise_intr_rxdata_taskper adapter. Extended Socket Network Device is shared memory based, so someone's transmission denotes other's reception.raise_intr_rxdata_taskraises interruption of receivers from the sender in order to notify receivers.The workqueue
adapter->control_wqhas workitem&adapter->interrupt_watch_taskper adapter.interrupt_watch_taskis 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.
Quoted 5 lines
max_activehas 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_RECLAIMhas been set to guarantee forward progress.
Patch looks good but ditto with the description. I wish it were clearer.
Thanks.
Signature · 1 line
tejun
Dear Bhaktipriya,
Thanks. Looks good to me.
Sincerely,
Taku Izumi
Quoted 53 lines
-----Original Message-----
From: Bhaktipriya Shridhar [mailto:[email protected]]
Sent: Thursday, June 02, 2016 6:31 PM
To: David S. Miller; Izumi, Taku/泉 拓; Florian Westphal; Bhaktipriya Shridhar
Cc: Tejun Heo; [email protected]; [email protected]
Subject: [PATCH] net: fjes:fjes_main: Removecreate_workqueue
alloc_workqueuereplaces deprecatedcreate_workqueue().The workqueue
adapter->txrx_wqhas workitem&adapter->raise_intr_rxdata_taskper adapter. Extended Socket Network Device is shared memory based, so someone's transmission denotes other's reception.raise_intr_rxdata_taskraises interruption of receivers from the sender in order to notify receivers.The workqueue
adapter->control_wqhas workitem&adapter->interrupt_watch_taskper adapter.interrupt_watch_taskis 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_activehas 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_RECLAIMhas been set to guarantee forward progress.Signed-off-by Bhaktipriya Shridhar <[email protected]>--- drivers/net/fjes/fjes_main.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)drivers/net/fjes/fjes_main.c +3
-3@@ -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, --2.1.4
Thank you for your feedback.
Will send another patch with changed description.
Bhaktipriya.
Quoted 61 lines · Taku
Dear Bhaktipriya,
Thanks. Looks good to me.
Sincerely,
Taku IzumiQuoted 53 lines
-----Original Message-----
From: Bhaktipriya Shridhar [mailto:[email protected]]
Sent: Thursday, June 02, 2016 6:31 PM
To: David S. Miller; Izumi, Taku/泉 拓; Florian Westphal; Bhaktipriya Shridhar
Cc: Tejun Heo; [email protected]; [email protected]
Subject: [PATCH] net: fjes:fjes_main: Removecreate_workqueue
alloc_workqueuereplaces deprecatedcreate_workqueue().The workqueue
adapter->txrx_wqhas workitem&adapter->raise_intr_rxdata_taskper adapter. Extended Socket Network Device is shared memory based, so someone's transmission denotes other's reception.raise_intr_rxdata_taskraises interruption of receivers from the sender in order to notify receivers.The workqueue
adapter->control_wqhas workitem&adapter->interrupt_watch_taskper adapter.interrupt_watch_taskis 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_activehas 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_RECLAIMhas been set to guarantee forward progress.Signed-off-by Bhaktipriya Shridhar <[email protected]>--- drivers/net/fjes/fjes_main.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)drivers/net/fjes/fjes_main.c +3
-3@@ -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, --2.1.4
David Miller
maintainerFrom: Bhaktipriya Shridhar <[email protected]>
Date: Sat, 4 Jun 2016 19:31:35 +0530
Quoted 2 lines
Thank you for your feedback.
Will send another patch with changed description.
I already applied your patch to the net-next tree, so that wouldn't be appropriate.