summaryrefslogtreecommitdiffstats
path: root/mm/migrate.c
diff options
context:
space:
mode:
authorVlastimil Babka2015-11-06 03:47:03 +0100
committerLinus Torvalds2015-11-06 04:34:48 +0100
commitf2f81fb2b72b83b661b11da6f1b0bd3526706278 (patch)
tree3ee1b1e964fd99a642695db8cf7d5c6823dd5f53 /mm/migrate.c
parentmm/memblock: make memblock_remove_range() static (diff)
downloadkernel-qcow2-linux-f2f81fb2b72b83b661b11da6f1b0bd3526706278.tar.gz
kernel-qcow2-linux-f2f81fb2b72b83b661b11da6f1b0bd3526706278.tar.xz
kernel-qcow2-linux-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);