[PATCH] mm, migrate: count pages failing all retries in vmstat and tracepoint

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxx>
---
 mm/migrate.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/mm/migrate.c b/mm/migrate.c
index eb42671..e705324 100644
--- a/mm/migrate.c
+++ b/mm/migrate.c
@@ -1152,7 +1152,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);
-- 
2.5.0

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@xxxxxxxxx.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@xxxxxxxxx";> email@xxxxxxxxx </a>



[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]