Skip to contentSkip to conversation

Patch "IB/mlx5: Avoid system crash when enabling many VFs" has been added to the 4.9-stable tree

PATCH [email protected] 1 participant 1 message Jan 20, 2017

Subsystems (3)
lore
Share & tools
lore

[email protected]

author maintainer Applied
#0 lore raw

This is a note to let you know that I've just added the patch titled

IB/mlx5: Avoid system crash when enabling many VFs

to the 4.9-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
ib-mlx5-avoid-system-crash-when-enabling-many-vfs.patch
and it can be found in the queue-4.9 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree, please let <[email protected]> know about it.

Quoted 1 line

From afd02cd3a9b6c04b41d946b5d7f6e17b3fc30c6b Mon Sep 17 00:00:00 2001

From: Eli Cohen <[email protected]>
Date: Sun, 27 Nov 2016 15:18:21 +0200
Subject: IB/mlx5: Avoid system crash when enabling many VFs

From: Eli Cohen <[email protected]>

commit afd02cd3a9b6c04b41d946b5d7f6e17b3fc30c6b upstream.

When enabling many VFs, the total amount of DMA mappings increase significantly. This causes DMA allocations to take a lot of time since they are serialized in the kernel.

As a result the driver enters into fatal condition due to timeout and the system hangs. To recover from this we disable MR cache for VFs.

PFs will still have a full cache and VFs cache can be manipulated as usual after driver load.

Fixes e126ba97dba9 ('mlx5: Add driver for Mellanox Connect-IB adapters')
---
 drivers/infiniband/hw/mlx5/mr.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/infiniband/hw/mlx5/mr.c +2 -1
@@ -628,7 +628,8 @@ int mlx5_mr_cache_init(struct mlx5_ib_de
 		ent->order = i + 2;
 		ent->dev = dev;
 
-		if (dev->mdev->profile->mask & MLX5_PROF_MASK_MR_CACHE)
+		if ((dev->mdev->profile->mask & MLX5_PROF_MASK_MR_CACHE) &&
+		    (mlx5_core_is_pf(dev->mdev)))
 			limit = dev->mdev->profile->mr_cache[i].limit;
 		else
 			limit = 0;

Patches currently in stable-queue which might be from [email protected] are

queue-4.9/ib-mlx5-avoid-system-crash-when-enabling-many-vfs.patch queue-4.9/ib-mlx5-wait-for-all-async-command-completions-to-complete.patch queue-4.9/ib-mlx5-fix-reported-max-sge-calculation.patch