linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] CMA: call to putback_lru_pages
@ 2012-12-17 21:25 Srinivas Pandruvada
  2012-12-17 22:24 ` Michal Nazarewicz
  0 siblings, 1 reply; 6+ messages in thread
From: Srinivas Pandruvada @ 2012-12-17 21:25 UTC (permalink / raw)
  To: linux-mm; +Cc: Srinivas Pandruvada

As per documentation and other places calling putback_lru_pages,
on error only, except for CMA. I am not sure this is a problem
for CMA or not.

Signed-off-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
---
 mm/page_alloc.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/mm/page_alloc.c b/mm/page_alloc.c
index 83637df..5a887bf 100644
--- a/mm/page_alloc.c
+++ b/mm/page_alloc.c
@@ -5802,8 +5802,8 @@ static int __alloc_contig_migrate_range(struct compact_control *cc,
 				    alloc_migrate_target,
 				    0, false, MIGRATE_SYNC);
 	}
-
-	putback_movable_pages(&cc->migratepages);
+	if (ret < 0)
+		putback_movable_pages(&cc->migratepages);
 	return ret > 0 ? 0 : ret;
 }
 
-- 
1.7.11.7

--
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>

^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2012-12-20 18:59 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-12-17 21:25 [PATCH] CMA: call to putback_lru_pages Srinivas Pandruvada
2012-12-17 22:24 ` Michal Nazarewicz
2012-12-18  9:58   ` Marek Szyprowski
2012-12-19 23:27   ` Andrew Morton
2012-12-20 15:13     ` Michal Nazarewicz
2012-12-20 18:59       ` Andrew Morton

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).