mlxsw: core: Do not use WQ_MEM_RECLAIM for EMAD workqueue

This change “mlxsw: core: Do not use WQ_MEM_RECLAIM for EMAD workqueue” (commit a8c133b) in Linux kernel is authored by Ido Schimmel <idosch [at] mellanox.com> on Wed Apr 10 06:58:13 2019 +0000.

Description of "mlxsw: core: Do not use WQ_MEM_RECLAIM for EMAD workqueue"

The change “mlxsw: core: Do not use WQ_MEM_RECLAIM for EMAD workqueue” introduces changes as follows.

mlxsw: core: Do not use WQ_MEM_RECLAIM for EMAD workqueue

The EMAD workqueue is used to handle retransmission of EMAD packets that
contain configuration data for the device's firmware.

Given the workers need to allocate these packets and that the code is
not called as part of memory reclaim path, remove the WQ_MEM_RECLAIM
flag.

Fixes: d965465b60ba ("mlxsw: core: Fix possible deadlock")
Signed-off-by: Ido Schimmel <idosch@mellanox.com>
Acked-by: Jiri Pirko <jiri@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>

Linux kernel releases containing commit a8c133b

The Linux kernel releases containing this commit are as follows.

Linux kernel code changes from "mlxsw: core: Do not use WQ_MEM_RECLAIM for EMAD workqueue"

There are 2 lines of Linux source code added/deleted in this change. Code changes to Linux kernel are as follows.

 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 d23d53c0e284..91cd6fa42e9a 100644
--- a/drivers/net/ethernet/mellanox/mlxsw/core.c
+++ b/drivers/net/ethernet/mellanox/mlxsw/core.c
@@ -568,7 +568,7 @@ static int mlxsw_emad_init(struct mlxsw_core *mlxsw_core)
 	if (!(mlxsw_core->bus->features & MLXSW_BUS_F_TXRX))
 		return 0;
 
-	emad_wq = alloc_workqueue("mlxsw_core_emad", WQ_MEM_RECLAIM, 0);
+	emad_wq = alloc_workqueue("mlxsw_core_emad", 0, 0);
 	if (!emad_wq)
 		return -ENOMEM;
 	mlxsw_core->emad_wq = emad_wq;

The commit for this change in Linux stable tree is a8c133b (patch).

Last modified: 2020/02/08