All of lore.kernel.org
 help / color / mirror / Atom feed
diff for duplicates of <20170227090236.GA2789@bbox>

diff --git a/a/1.txt b/N1/1.txt
index ea4a5ce..0beb156 100644
--- a/a/1.txt
+++ b/N1/1.txt
@@ -93,3 +93,48 @@ a reason you cannot succeed watermark check for the allocation.
 I tried to solve the issue in 4.9 time to use up the reserved memory before
 the OOM and merged into 4.10 but I think there is a hole so could you apply
 this patch on top of your 4.10? (To be clear, cannot apply it to 4.9)
+
+>From 9779a1c5d32e2edb64da5cdfcd6f9737b94a247a Mon Sep 17 00:00:00 2001
+From: Minchan Kim <minchan@kernel.org>
+Date: Mon, 27 Feb 2017 17:39:06 +0900
+Subject: [PATCH] mm: use up highatomic before OOM kill
+
+Not-Yet-Signed-off-by: Minchan Kim <minchan@kernel.org>
+---
+ mm/page_alloc.c | 14 ++++----------
+ 1 file changed, 4 insertions(+), 10 deletions(-)
+
+diff --git a/mm/page_alloc.c b/mm/page_alloc.c
+index 614cd0397ce3..e073cca4969e 100644
+--- a/mm/page_alloc.c
++++ b/mm/page_alloc.c
+@@ -3549,16 +3549,6 @@ should_reclaim_retry(gfp_t gfp_mask, unsigned order,
+ 		*no_progress_loops = 0;
+ 	else
+ 		(*no_progress_loops)++;
+-
+-	/*
+-	 * Make sure we converge to OOM if we cannot make any progress
+-	 * several times in the row.
+-	 */
+-	if (*no_progress_loops > MAX_RECLAIM_RETRIES) {
+-		/* Before OOM, exhaust highatomic_reserve */
+-		return unreserve_highatomic_pageblock(ac, true);
+-	}
+-
+ 	/*
+ 	 * Keep reclaiming pages while there is a chance this will lead
+ 	 * somewhere.  If none of the target zones can satisfy our allocation
+@@ -3821,6 +3811,10 @@ __alloc_pages_slowpath(gfp_t gfp_mask, unsigned int order,
+ 	if (read_mems_allowed_retry(cpuset_mems_cookie))
+ 		goto retry_cpuset;
+ 
++	/* Before OOM, exhaust highatomic_reserve */
++	if (unreserve_highatomic_pageblock(ac, true))
++		goto retry;
++
+ 	/* Reclaim has failed us, start killing things */
+ 	page = __alloc_pages_may_oom(gfp_mask, order, ac, &did_some_progress);
+ 	if (page)
+-- 
+2.7.4
diff --git a/a/content_digest b/N1/content_digest
index fcbfc12..29b52f3 100644
--- a/a/content_digest
+++ b/N1/content_digest
@@ -12,8 +12,8 @@
  "Date\0Mon, 27 Feb 2017 18:02:36 +0900\0"
  "To\0Gerhard Wiesinger <lists@wiesinger.com>\0"
  "Cc\0Michal Hocko <mhocko@kernel.org>"
-  linux-kernel@vger.kernel.org
-  linux-mm@kvack.org
+  <linux-kernel@vger.kernel.org>
+  <linux-mm@kvack.org>
  " Linus Torvalds <torvalds@linux-foundation.org>\0"
  "\00:1\0"
  "b\0"
@@ -111,6 +111,51 @@
  "\n"
  "I tried to solve the issue in 4.9 time to use up the reserved memory before\n"
  "the OOM and merged into 4.10 but I think there is a hole so could you apply\n"
- this patch on top of your 4.10? (To be clear, cannot apply it to 4.9)
+ "this patch on top of your 4.10? (To be clear, cannot apply it to 4.9)\n"
+ "\n"
+ ">From 9779a1c5d32e2edb64da5cdfcd6f9737b94a247a Mon Sep 17 00:00:00 2001\n"
+ "From: Minchan Kim <minchan@kernel.org>\n"
+ "Date: Mon, 27 Feb 2017 17:39:06 +0900\n"
+ "Subject: [PATCH] mm: use up highatomic before OOM kill\n"
+ "\n"
+ "Not-Yet-Signed-off-by: Minchan Kim <minchan@kernel.org>\n"
+ "---\n"
+ " mm/page_alloc.c | 14 ++++----------\n"
+ " 1 file changed, 4 insertions(+), 10 deletions(-)\n"
+ "\n"
+ "diff --git a/mm/page_alloc.c b/mm/page_alloc.c\n"
+ "index 614cd0397ce3..e073cca4969e 100644\n"
+ "--- a/mm/page_alloc.c\n"
+ "+++ b/mm/page_alloc.c\n"
+ "@@ -3549,16 +3549,6 @@ should_reclaim_retry(gfp_t gfp_mask, unsigned order,\n"
+ " \t\t*no_progress_loops = 0;\n"
+ " \telse\n"
+ " \t\t(*no_progress_loops)++;\n"
+ "-\n"
+ "-\t/*\n"
+ "-\t * Make sure we converge to OOM if we cannot make any progress\n"
+ "-\t * several times in the row.\n"
+ "-\t */\n"
+ "-\tif (*no_progress_loops > MAX_RECLAIM_RETRIES) {\n"
+ "-\t\t/* Before OOM, exhaust highatomic_reserve */\n"
+ "-\t\treturn unreserve_highatomic_pageblock(ac, true);\n"
+ "-\t}\n"
+ "-\n"
+ " \t/*\n"
+ " \t * Keep reclaiming pages while there is a chance this will lead\n"
+ " \t * somewhere.  If none of the target zones can satisfy our allocation\n"
+ "@@ -3821,6 +3811,10 @@ __alloc_pages_slowpath(gfp_t gfp_mask, unsigned int order,\n"
+ " \tif (read_mems_allowed_retry(cpuset_mems_cookie))\n"
+ " \t\tgoto retry_cpuset;\n"
+ " \n"
+ "+\t/* Before OOM, exhaust highatomic_reserve */\n"
+ "+\tif (unreserve_highatomic_pageblock(ac, true))\n"
+ "+\t\tgoto retry;\n"
+ "+\n"
+ " \t/* Reclaim has failed us, start killing things */\n"
+ " \tpage = __alloc_pages_may_oom(gfp_mask, order, ac, &did_some_progress);\n"
+ " \tif (page)\n"
+ "-- \n"
+ 2.7.4
 
-d53ffa4d5c6756cc6c00b5f1eb40e604379ad98b32ecefc01915931a76b21a5e
+537db54b3f732c9de67ad9260d3ce69506b3c42f5828c6bad5cd3f97fc4259d1

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.