Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1655350
| Path | csiph.com!news.mixmin.net!aioe.org!news.servidellagleba.it!bofh.it!news.nic.it!robomod |
|---|---|
| From | Ben Hutchings <ben@decadent.org.uk> |
| Newsgroups | linux.kernel |
| Subject | [PATCH 3.16 139/212] mlx4: reduce OOM risk on arches with large pages |
| Date | Thu, 01 Jun 2017 18:10:04 +0200 |
| Message-ID | <tNAPG-4Ly-71@gated-at.bofh.it> (permalink) |
| References | <tNAwh-4oP-3@gated-at.bofh.it> |
| Content-Type | text/plain; charset="UTF-8" |
| Content-Disposition | inline |
| Content-Transfer-Encoding | 8bit |
| MIME-Version | 1.0 |
| X-Mailer | LinuxStableQueue (scripts by bwh) |
| X-Sa-Exim-Connect-IP | 82.70.136.246 |
| X-Sa-Exim-Mail-From | ben@decadent.org.uk |
| X-Sa-Exim-Scanned | No (on shadbolt.decadent.org.uk); SAEximRunCond expanded to false |
| Sender | robomod@news.nic.it |
| List-ID | <linux-kernel.vger.kernel.org> |
| X-Mailing-List | linux-kernel@vger.kernel.org |
| Approved | robomod@news.nic.it |
| Lines | 35 |
| Organization | linux.* mail to news gateway |
| X-Original-Cc | akpm@linux-foundation.org, "Eric Dumazet" <edumazet@google.com>, "David S. Miller" <davem@davemloft.net>, "Tariq Toukan" <tariqt@mellanox.com> |
| X-Original-Date | Thu, 01 Jun 2017 16:43:16 +0100 |
| X-Original-Message-ID | <lsq.1496331796.713265816@decadent.org.uk> |
| X-Original-References | <lsq.1496331794.574686034@decadent.org.uk> |
| X-Original-Sender | linux-kernel-owner@vger.kernel.org |
| Xref | csiph.com linux.kernel:1655350 |
Show key headers only | View raw
3.16.44-rc1 review patch. If anyone has any objections, please let me know.
------------------
From: Eric Dumazet <edumazet@google.com>
commit 3608b13ccc51d06e499dfe12b27f134de1286e28 upstream.
Since mlx4 NIC are used on PowerPC with 64K pages, we need to adapt
MLX4_EN_ALLOC_PREFER_ORDER definition.
Otherwise, a fragment sitting in an out of order TCP queue can hold
0.5 Mbytes and it is a serious OOM risk.
Fixes: 51151a16a60f ("mlx4: allow order-0 memory allocations in RX path")
Signed-off-by: Eric Dumazet <edumazet@google.com>
Reviewed-by: Tariq Toukan <tariqt@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
---
drivers/net/ethernet/mellanox/mlx4/mlx4_en.h | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
--- a/drivers/net/ethernet/mellanox/mlx4/mlx4_en.h
+++ b/drivers/net/ethernet/mellanox/mlx4/mlx4_en.h
@@ -98,7 +98,8 @@
/* Use the maximum between 16384 and a single page */
#define MLX4_EN_ALLOC_SIZE PAGE_ALIGN(16384)
-#define MLX4_EN_ALLOC_PREFER_ORDER PAGE_ALLOC_COSTLY_ORDER
+#define MLX4_EN_ALLOC_PREFER_ORDER min_t(int, get_order(32768), \
+ PAGE_ALLOC_COSTLY_ORDER)
/* Receive fragment sizes; we use at most 3 fragments (for 9600 byte MTU
* and 4K allocations) */
Back to linux.kernel | Previous | Next | Find similar | Unroll thread
[PATCH 3.16 139/212] mlx4: reduce OOM risk on arches with large pages Ben Hutchings <ben@decadent.org.uk> - 2017-06-01 18:10 +0200
csiph-web