linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/4] mm/migrate: correct return value of migrate_pages()
@ 2013-12-06  8:41 Joonsoo Kim
  2013-12-06  8:41 ` [PATCH 2/4] mm/mempolicy: correct putback method for isolate pages if failed Joonsoo Kim
                   ` (4 more replies)
  0 siblings, 5 replies; 14+ messages in thread
From: Joonsoo Kim @ 2013-12-06  8:41 UTC (permalink / raw)
  To: Andrew Morton
  Cc: Mel Gorman, Rik van Riel, Rafael Aquini, Naoya Horiguchi,
	Christoph Lameter, Joonsoo Kim, linux-kernel, linux-mm,
	Joonsoo Kim

migrate_pages() should return number of pages not migrated or error code.
When unmap_and_move return -EAGAIN, outer loop is re-execution without
initialising nr_failed. This makes nr_failed over-counted.

So this patch correct it by initialising nr_failed in outer loop.

Signed-off-by: Joonsoo Kim <iamjoonsoo.kim@lge.com>

diff --git a/mm/migrate.c b/mm/migrate.c
index 3747fcd..1f59ccc 100644
--- a/mm/migrate.c
+++ b/mm/migrate.c
@@ -1102,6 +1102,7 @@ int migrate_pages(struct list_head *from, new_page_t get_new_page,
 
 	for(pass = 0; pass < 10 && retry; pass++) {
 		retry = 0;
+		nr_failed = 0;
 
 		list_for_each_entry_safe(page, page2, from, lru) {
 			cond_resched();
-- 
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>

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

end of thread, other threads:[~2013-12-09  8:39 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-12-06  8:41 [PATCH 1/4] mm/migrate: correct return value of migrate_pages() Joonsoo Kim
2013-12-06  8:41 ` [PATCH 2/4] mm/mempolicy: correct putback method for isolate pages if failed Joonsoo Kim
2013-12-06 18:43   ` Naoya Horiguchi
2013-12-06  8:41 ` [PATCH 3/4] mm/migrate: remove putback_lru_pages, fix comment on putback_movable_pages Joonsoo Kim
2013-12-06  8:58   ` Zhang Yanfei
2013-12-06 11:46     ` Joonsoo Kim
2013-12-06  8:41 ` [PATCH 4/4] mm/compaction: respect ignore_skip_hint in update_pageblock_skip Joonsoo Kim
2013-12-06 14:20   ` Vlastimil Babka
2013-12-06 20:59   ` Naoya Horiguchi
2013-12-06 14:42 ` [PATCH 1/4] mm/migrate: correct return value of migrate_pages() Vlastimil Babka
2013-12-06 18:37   ` Naoya Horiguchi
2013-12-06 18:51     ` Christoph Lameter
2013-12-09  8:42     ` Joonsoo Kim
2013-12-06 14:52 ` Christoph Lameter

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