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

diff --git a/a/1.txt b/N1/1.txt
index ec205cb..9f9a761 100644
--- a/a/1.txt
+++ b/N1/1.txt
@@ -40,3 +40,104 @@ but has some problem about description or someone has better idea,
 feel free to modify and resend to akpm, Please.
 
 Thierry, Could you test below patch?
+
+>From 24a547855fa2bd4212a779cc73997837148310b3 Mon Sep 17 00:00:00 2001
+From: Minchan Kim <minchan@kernel.org>
+Date: Fri, 28 Sep 2012 14:28:32 +0900
+Subject: [PATCH] revert mm: compaction: iron out isolate_freepages_block()
+ and isolate_freepages_range()
+
+[1] made bug on CMA.
+The nr_scanned should be never equal to total_isolated for successful CMA.
+This patch reverts part of the patch.
+
+[1] mm: compaction: iron out isolate_freepages_block() and isolate_freepages_range()
+
+Cc: Mel Gorman <mgorman@suse.de>
+Signed-off-by: Minchan Kim <minchan@kernel.org>
+---
+ mm/compaction.c |   29 ++++++++++++++++-------------
+ 1 file changed, 16 insertions(+), 13 deletions(-)
+
+diff --git a/mm/compaction.c b/mm/compaction.c
+index 5037399..7721197 100644
+--- a/mm/compaction.c
++++ b/mm/compaction.c
+@@ -269,13 +269,14 @@ static unsigned long isolate_freepages_block(struct compact_control *cc,
+ 		int isolated, i;
+ 		struct page *page = cursor;
+ 
+-		nr_scanned++;
+ 		if (!pfn_valid_within(blockpfn))
+-			continue;
++			goto strict_check;
++		nr_scanned++;
++
+ 		if (!valid_page)
+ 			valid_page = page;
+ 		if (!PageBuddy(page))
+-			continue;
++			goto strict_check;
+ 
+ 		/*
+ 		 * The zone lock must be held to isolate freepages.
+@@ -296,12 +297,12 @@ static unsigned long isolate_freepages_block(struct compact_control *cc,
+ 
+ 		/* Recheck this is a buddy page under lock */
+ 		if (!PageBuddy(page))
+-			continue;
++			goto strict_check;
+ 
+ 		/* Found a free page, break it into order-0 pages */
+ 		isolated = split_free_page(page);
+ 		if (!isolated && strict)
+-			break;
++			goto strict_check;
+ 		total_isolated += isolated;
+ 		for (i = 0; i < isolated; i++) {
+ 			list_add(&page->lru, freelist);
+@@ -313,18 +314,20 @@ static unsigned long isolate_freepages_block(struct compact_control *cc,
+ 			blockpfn += isolated - 1;
+ 			cursor += isolated - 1;
+ 		}
++
++		continue;
++
++strict_check:
++		/* Abort isolation if the caller requested strict isolation */
++		if (strict) {
++			total_isolated = 0;
++			goto out;
++		}
+ 	}
+ 
+ 	trace_mm_compaction_isolate_freepages(nr_scanned, total_isolated);
+ 
+-	/*
+-	 * If strict isolation is requested by CMA then check that all the
+-	 * pages scanned were isolated. If there were any failures, 0 is
+-	 * returned and CMA will fail.
+-	 */
+-	if (strict && nr_scanned != total_isolated)
+-		total_isolated = 0;
+-
++out:
+ 	if (locked)
+ 		spin_unlock_irqrestore(&cc->zone->lock, flags);
+ 
+-- 
+1.7.9.5
+
+
+
+> 
+> 
+> --
+> To unsubscribe, send a message with 'unsubscribe linux-mm' in
+> the body to majordomo@kvack.org.  For more info on Linux MM,
+> see: http://www.linux-mm.org/ .
+> Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
+
+-- 
+Kind regards,
+Minchan Kim
diff --git a/a/content_digest b/N1/content_digest
index de3656f..30e0006 100644
--- a/a/content_digest
+++ b/N1/content_digest
@@ -57,6 +57,107 @@
  "but has some problem about description or someone has better idea,\n"
  "feel free to modify and resend to akpm, Please.\n"
  "\n"
- Thierry, Could you test below patch?
+ "Thierry, Could you test below patch?\n"
+ "\n"
+ ">From 24a547855fa2bd4212a779cc73997837148310b3 Mon Sep 17 00:00:00 2001\n"
+ "From: Minchan Kim <minchan@kernel.org>\n"
+ "Date: Fri, 28 Sep 2012 14:28:32 +0900\n"
+ "Subject: [PATCH] revert mm: compaction: iron out isolate_freepages_block()\n"
+ " and isolate_freepages_range()\n"
+ "\n"
+ "[1] made bug on CMA.\n"
+ "The nr_scanned should be never equal to total_isolated for successful CMA.\n"
+ "This patch reverts part of the patch.\n"
+ "\n"
+ "[1] mm: compaction: iron out isolate_freepages_block() and isolate_freepages_range()\n"
+ "\n"
+ "Cc: Mel Gorman <mgorman@suse.de>\n"
+ "Signed-off-by: Minchan Kim <minchan@kernel.org>\n"
+ "---\n"
+ " mm/compaction.c |   29 ++++++++++++++++-------------\n"
+ " 1 file changed, 16 insertions(+), 13 deletions(-)\n"
+ "\n"
+ "diff --git a/mm/compaction.c b/mm/compaction.c\n"
+ "index 5037399..7721197 100644\n"
+ "--- a/mm/compaction.c\n"
+ "+++ b/mm/compaction.c\n"
+ "@@ -269,13 +269,14 @@ static unsigned long isolate_freepages_block(struct compact_control *cc,\n"
+ " \t\tint isolated, i;\n"
+ " \t\tstruct page *page = cursor;\n"
+ " \n"
+ "-\t\tnr_scanned++;\n"
+ " \t\tif (!pfn_valid_within(blockpfn))\n"
+ "-\t\t\tcontinue;\n"
+ "+\t\t\tgoto strict_check;\n"
+ "+\t\tnr_scanned++;\n"
+ "+\n"
+ " \t\tif (!valid_page)\n"
+ " \t\t\tvalid_page = page;\n"
+ " \t\tif (!PageBuddy(page))\n"
+ "-\t\t\tcontinue;\n"
+ "+\t\t\tgoto strict_check;\n"
+ " \n"
+ " \t\t/*\n"
+ " \t\t * The zone lock must be held to isolate freepages.\n"
+ "@@ -296,12 +297,12 @@ static unsigned long isolate_freepages_block(struct compact_control *cc,\n"
+ " \n"
+ " \t\t/* Recheck this is a buddy page under lock */\n"
+ " \t\tif (!PageBuddy(page))\n"
+ "-\t\t\tcontinue;\n"
+ "+\t\t\tgoto strict_check;\n"
+ " \n"
+ " \t\t/* Found a free page, break it into order-0 pages */\n"
+ " \t\tisolated = split_free_page(page);\n"
+ " \t\tif (!isolated && strict)\n"
+ "-\t\t\tbreak;\n"
+ "+\t\t\tgoto strict_check;\n"
+ " \t\ttotal_isolated += isolated;\n"
+ " \t\tfor (i = 0; i < isolated; i++) {\n"
+ " \t\t\tlist_add(&page->lru, freelist);\n"
+ "@@ -313,18 +314,20 @@ static unsigned long isolate_freepages_block(struct compact_control *cc,\n"
+ " \t\t\tblockpfn += isolated - 1;\n"
+ " \t\t\tcursor += isolated - 1;\n"
+ " \t\t}\n"
+ "+\n"
+ "+\t\tcontinue;\n"
+ "+\n"
+ "+strict_check:\n"
+ "+\t\t/* Abort isolation if the caller requested strict isolation */\n"
+ "+\t\tif (strict) {\n"
+ "+\t\t\ttotal_isolated = 0;\n"
+ "+\t\t\tgoto out;\n"
+ "+\t\t}\n"
+ " \t}\n"
+ " \n"
+ " \ttrace_mm_compaction_isolate_freepages(nr_scanned, total_isolated);\n"
+ " \n"
+ "-\t/*\n"
+ "-\t * If strict isolation is requested by CMA then check that all the\n"
+ "-\t * pages scanned were isolated. If there were any failures, 0 is\n"
+ "-\t * returned and CMA will fail.\n"
+ "-\t */\n"
+ "-\tif (strict && nr_scanned != total_isolated)\n"
+ "-\t\ttotal_isolated = 0;\n"
+ "-\n"
+ "+out:\n"
+ " \tif (locked)\n"
+ " \t\tspin_unlock_irqrestore(&cc->zone->lock, flags);\n"
+ " \n"
+ "-- \n"
+ "1.7.9.5\n"
+ "\n"
+ "\n"
+ "\n"
+ "> \n"
+ "> \n"
+ "> --\n"
+ "> To unsubscribe, send a message with 'unsubscribe linux-mm' in\n"
+ "> the body to majordomo@kvack.org.  For more info on Linux MM,\n"
+ "> see: http://www.linux-mm.org/ .\n"
+ "> Don't email: <a href=mailto:\"dont@kvack.org\"> email@kvack.org </a>\n"
+ "\n"
+ "-- \n"
+ "Kind regards,\n"
+ Minchan Kim
 
-2b12d9856eb360f0d32e5567c050462b996793b1df730f6c50155bb068523838
+1638e5f78a5322fd64c85e544ef67dc45f26095de49f1e8f1fbe0a67a5ba7b33

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.