summaryrefslogtreecommitdiffstats
path: root/mm/migrate.c
diff options
context:
space:
mode:
authorVlastimil Babka <vbabka@suse.cz>2015-11-05 18:47:03 -0800
committerLinus Torvalds <torvalds@linux-foundation.org>2015-11-05 19:34:48 -0800
commitf2f81fb2b72b83b661b11da6f1b0bd3526706278 (patch)
tree3ee1b1e964fd99a642695db8cf7d5c6823dd5f53 /mm/migrate.c
parent35bd16a227534cb6ffc9b26a33061c2dcf91934b (diff)
downloadlinux-stable-f2f81fb2b72b83b661b11da6f1b0bd3526706278.tar.gz
linux-stable-f2f81fb2b72b83b661b11da6f1b0bd3526706278.tar.bz2
linux-stable-f2f81fb2b72b83b661b11da6f1b0bd3526706278.zip
mm, migrate: count pages failing all retries in vmstat and tracepoint
Migration tries up to 10 times to migrate pages that return -EAGAIN until it gives up. If some pages fail all retries, they are counted towards the number of failed pages that migrate_pages() returns. They should also be counted in the /proc/vmstat pgmigrate_fail and in the mm_migrate_pages tracepoint. Signed-off-by: Vlastimil Babka <vbabka@suse.cz> Acked-by: David Rientjes <rientjes@google.com> Cc: Naoya Horiguchi <n-horiguchi@ah.jp.nec.com> Cc: "Kirill A. Shutemov" <kirill.shutemov@linux.intel.com> Cc: "Aneesh Kumar K.V" <aneesh.kumar@linux.vnet.ibm.com> Cc: Konstantin Khlebnikov <koct9i@gmail.com> Cc: Mel Gorman <mel@csn.ul.ie> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'mm/migrate.c')
-rw-r--r--mm/migrate.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/mm/migrate.c b/mm/migrate.c
index 842ecd7aaf7f..94961f4654b7 100644
--- a/mm/migrate.c
+++ b/mm/migrate.c
@@ -1169,7 +1169,8 @@ int migrate_pages(struct list_head *from, new_page_t get_new_page,
}
}
}
- rc = nr_failed + retry;
+ nr_failed += retry;
+ rc = nr_failed;
out:
if (nr_succeeded)
count_vm_events(PGMIGRATE_SUCCESS, nr_succeeded);