linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] cma: retry on test_pages_isolated() failure
@ 2012-05-23  7:23 Bartlomiej Zolnierkiewicz
  0 siblings, 0 replies; only message in thread
From: Bartlomiej Zolnierkiewicz @ 2012-05-23  7:23 UTC (permalink / raw)
  To: linux-mm; +Cc: Michal Nazarewicz, Marek Szyprowski, Mel Gorman

From: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
Subject: [PATCH] cma: retry on test_pages_isolated() failure

Retry (once) migration on test_pages_isolated() failure.

Cc: Michal Nazarewicz <mina86@mina86.com>
Cc: Marek Szyprowski <m.szyprowski@samsung.com>
Cc: Mel Gorman <mgorman@suse.de>
Signed-off-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
---
 mm/page_alloc.c |    6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

Index: b/mm/page_alloc.c
===================================================================
--- a/mm/page_alloc.c	2012-05-15 12:40:54.199127705 +0200
+++ b/mm/page_alloc.c	2012-05-15 12:41:25.335127686 +0200
@@ -5796,7 +5796,7 @@
 {
 	struct zone *zone = page_zone(pfn_to_page(start));
 	unsigned long outer_start, outer_end;
-	int ret = 0, order;
+	int ret = 0, order, retry = 0;
 
 	/*
 	 * What we do here is we mark all pageblocks in range as
@@ -5826,7 +5826,7 @@
 				       pfn_max_align_up(end), migratetype);
 	if (ret)
 		goto done;
-
+migrate:
 	ret = __alloc_contig_migrate_range(start, end);
 	if (ret)
 		goto done;
@@ -5863,6 +5863,8 @@
 
 	/* Make sure the range is really isolated. */
 	if (test_pages_isolated(outer_start, end)) {
+		if (retry++ < 1)
+			goto migrate;
 		pr_warn("alloc_contig_range test_pages_isolated(%lx, %lx) failed\n",
 		       outer_start, end);
 		ret = -EBUSY;

--
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/ .
Fight unfair telecom internet charges in Canada: sign http://stopthemeter.ca/
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2012-05-23  7:23 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-05-23  7:23 [PATCH] cma: retry on test_pages_isolated() failure Bartlomiej Zolnierkiewicz

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox