]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/blob - releases/4.14.112/net-mlx5-decrease-default-mr-cache-size.patch
Linux 4.14.112
[thirdparty/kernel/stable-queue.git] / releases / 4.14.112 / net-mlx5-decrease-default-mr-cache-size.patch
1 From foo@baz Mon Apr 15 07:47:06 CEST 2019
2 From: Artemy Kovalyov <artemyko@mellanox.com>
3 Date: Tue, 19 Mar 2019 11:24:38 +0200
4 Subject: net/mlx5: Decrease default mr cache size
5
6 From: Artemy Kovalyov <artemyko@mellanox.com>
7
8 [ Upstream commit e8b26b2135dedc0284490bfeac06dfc4418d0105 ]
9
10 Delete initialization of high order entries in mr cache to decrease initial
11 memory footprint. When required, the administrator can populate the
12 entries with memory keys via the /sys interface.
13
14 This approach is very helpful to significantly reduce the per HW function
15 memory footprint in virtualization environments such as SRIOV.
16
17 Fixes: 9603b61de1ee ("mlx5: Move pci device handling from mlx5_ib to mlx5_core")
18 Signed-off-by: Artemy Kovalyov <artemyko@mellanox.com>
19 Signed-off-by: Moni Shoua <monis@mellanox.com>
20 Signed-off-by: Leon Romanovsky <leonro@mellanox.com>
21 Reported-by: Shalom Toledo <shalomt@mellanox.com>
22 Acked-by: Or Gerlitz <ogerlitz@mellanox.com>
23 Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
24 Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
25 ---
26 drivers/net/ethernet/mellanox/mlx5/core/main.c | 20 --------------------
27 1 file changed, 20 deletions(-)
28
29 --- a/drivers/net/ethernet/mellanox/mlx5/core/main.c
30 +++ b/drivers/net/ethernet/mellanox/mlx5/core/main.c
31 @@ -155,26 +155,6 @@ static struct mlx5_profile profile[] = {
32 .size = 8,
33 .limit = 4
34 },
35 - .mr_cache[16] = {
36 - .size = 8,
37 - .limit = 4
38 - },
39 - .mr_cache[17] = {
40 - .size = 8,
41 - .limit = 4
42 - },
43 - .mr_cache[18] = {
44 - .size = 8,
45 - .limit = 4
46 - },
47 - .mr_cache[19] = {
48 - .size = 4,
49 - .limit = 2
50 - },
51 - .mr_cache[20] = {
52 - .size = 4,
53 - .limit = 2
54 - },
55 },
56 };
57