* [PATCH] mlxsw: core: Remove deprecated create_workqueue
@ 2016-06-07 19:59 Bhaktipriya Shridhar
2016-06-08 7:53 ` Ido Schimmel
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Bhaktipriya Shridhar @ 2016-06-07 19:59 UTC (permalink / raw)
To: Jiri Pirko, Ido Schimmel; +Cc: Tejun Heo, netdev, linux-kernel
alloc_workqueue replaces deprecated create_workqueue().
A dedicated workqueue has been used since the workqueue
mlxsw_wq is used for FDB notif. processing with workitems that are
involved in normal device operation && because it's a network device
which can be depended upon during memory reclaim.
Workitems &trans->timeout_dw and &mlxsw_sp->fdb_notify.dw,
map to mlxsw_sp_fdb_notify_work (processes FDB notifications from the
underlying device and resolves the netdev to which the entry points to
and notifies the bridge using the switchdev notifier) and
mlxsw_emad_trans_timeout_work (provides async EMAD register access)
respectively. They require forward progress under memory pressure and
hence, WQ_MEM_RECLAIM has been set.
Since there are only a fixed number of work items, explicit concurrency
limit is unnecessary here.
Signed-off-by: Bhaktipriya Shridhar <bhaktipriya96@gmail.com>
---
drivers/net/ethernet/mellanox/mlxsw/core.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/ethernet/mellanox/mlxsw/core.c b/drivers/net/ethernet/mellanox/mlxsw/core.c
index b0a0b01..01ae548 100644
--- a/drivers/net/ethernet/mellanox/mlxsw/core.c
+++ b/drivers/net/ethernet/mellanox/mlxsw/core.c
@@ -1736,7 +1736,7 @@ static int __init mlxsw_core_module_init(void)
{
int err;
- mlxsw_wq = create_workqueue(mlxsw_core_driver_name);
+ mlxsw_wq = alloc_workqueue(mlxsw_core_driver_name, WQ_MEM_RECLAIM, 0);
if (!mlxsw_wq)
return -ENOMEM;
mlxsw_core_dbg_root = debugfs_create_dir(mlxsw_core_driver_name, NULL);
--
2.1.4
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] mlxsw: core: Remove deprecated create_workqueue
2016-06-07 19:59 [PATCH] mlxsw: core: Remove deprecated create_workqueue Bhaktipriya Shridhar
@ 2016-06-08 7:53 ` Ido Schimmel
2016-06-08 7:55 ` Jiri Pirko
2016-06-10 6:50 ` David Miller
2 siblings, 0 replies; 4+ messages in thread
From: Ido Schimmel @ 2016-06-08 7:53 UTC (permalink / raw)
To: Bhaktipriya Shridhar; +Cc: Jiri Pirko, Tejun Heo, netdev, linux-kernel
Tue, Jun 07, 2016 at 10:59:46PM IDT, bhaktipriya96@gmail.com wrote:
>alloc_workqueue replaces deprecated create_workqueue().
>
>A dedicated workqueue has been used since the workqueue
>mlxsw_wq is used for FDB notif. processing with workitems that are
>involved in normal device operation && because it's a network device
>which can be depended upon during memory reclaim.
>
>Workitems &trans->timeout_dw and &mlxsw_sp->fdb_notify.dw,
>map to mlxsw_sp_fdb_notify_work (processes FDB notifications from the
>underlying device and resolves the netdev to which the entry points to
>and notifies the bridge using the switchdev notifier) and
>mlxsw_emad_trans_timeout_work (provides async EMAD register access)
>respectively.
The ordering here is off - timeout_dw is for
mlxsw_emad_trans_timeout_work() and fdb_notify.dw is for
mlxsw_sp_fdb_notify_work(), but otherwise this seems fine to me.
Tested-by: Ido Schimmel <idosch@mellanox.com>
Thanks!
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] mlxsw: core: Remove deprecated create_workqueue
2016-06-07 19:59 [PATCH] mlxsw: core: Remove deprecated create_workqueue Bhaktipriya Shridhar
2016-06-08 7:53 ` Ido Schimmel
@ 2016-06-08 7:55 ` Jiri Pirko
2016-06-10 6:50 ` David Miller
2 siblings, 0 replies; 4+ messages in thread
From: Jiri Pirko @ 2016-06-08 7:55 UTC (permalink / raw)
To: Bhaktipriya Shridhar
Cc: Jiri Pirko, Ido Schimmel, Tejun Heo, netdev, linux-kernel
Tue, Jun 07, 2016 at 09:59:46PM CEST, bhaktipriya96@gmail.com wrote:
>alloc_workqueue replaces deprecated create_workqueue().
>
>A dedicated workqueue has been used since the workqueue
>mlxsw_wq is used for FDB notif. processing with workitems that are
>involved in normal device operation && because it's a network device
>which can be depended upon during memory reclaim.
>
>Workitems &trans->timeout_dw and &mlxsw_sp->fdb_notify.dw,
>map to mlxsw_sp_fdb_notify_work (processes FDB notifications from the
>underlying device and resolves the netdev to which the entry points to
>and notifies the bridge using the switchdev notifier) and
>mlxsw_emad_trans_timeout_work (provides async EMAD register access)
>respectively. They require forward progress under memory pressure and
>hence, WQ_MEM_RECLAIM has been set.
>
>Since there are only a fixed number of work items, explicit concurrency
>limit is unnecessary here.
>
>Signed-off-by: Bhaktipriya Shridhar <bhaktipriya96@gmail.com>
Acked-by: Jiri Pirko <jiri@mellanox.com>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] mlxsw: core: Remove deprecated create_workqueue
2016-06-07 19:59 [PATCH] mlxsw: core: Remove deprecated create_workqueue Bhaktipriya Shridhar
2016-06-08 7:53 ` Ido Schimmel
2016-06-08 7:55 ` Jiri Pirko
@ 2016-06-10 6:50 ` David Miller
2 siblings, 0 replies; 4+ messages in thread
From: David Miller @ 2016-06-10 6:50 UTC (permalink / raw)
To: bhaktipriya96; +Cc: jiri, idosch, tj, netdev, linux-kernel
From: Bhaktipriya Shridhar <bhaktipriya96@gmail.com>
Date: Wed, 8 Jun 2016 01:29:46 +0530
> alloc_workqueue replaces deprecated create_workqueue().
>
> A dedicated workqueue has been used since the workqueue
> mlxsw_wq is used for FDB notif. processing with workitems that are
> involved in normal device operation && because it's a network device
> which can be depended upon during memory reclaim.
>
> Workitems &trans->timeout_dw and &mlxsw_sp->fdb_notify.dw,
> map to mlxsw_sp_fdb_notify_work (processes FDB notifications from the
> underlying device and resolves the netdev to which the entry points to
> and notifies the bridge using the switchdev notifier) and
> mlxsw_emad_trans_timeout_work (provides async EMAD register access)
> respectively. They require forward progress under memory pressure and
> hence, WQ_MEM_RECLAIM has been set.
>
> Since there are only a fixed number of work items, explicit concurrency
> limit is unnecessary here.
>
> Signed-off-by: Bhaktipriya Shridhar <bhaktipriya96@gmail.com>
Applied.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2016-06-10 6:50 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-06-07 19:59 [PATCH] mlxsw: core: Remove deprecated create_workqueue Bhaktipriya Shridhar
2016-06-08 7:53 ` Ido Schimmel
2016-06-08 7:55 ` Jiri Pirko
2016-06-10 6:50 ` 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).