aboutsummaryrefslogtreecommitdiffstats
path: root/mm
diff options
context:
space:
mode:
authorSrivatsa S. Bhat <srivatsa.bhat@linux.vnet.ibm.com>2013-04-29 18:08:16 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2013-04-29 18:54:37 -0400
commitc73e5c9c59a0f7ba30b3e5f7bd2d8097d4c89c6d (patch)
tree00358e655740230b103854f581d00c58a691a866 /mm
parent52f37629fd3c7b24e1e6c125e665454cd7ac1acb (diff)
mm: rewrite the comment over migrate_pages() more comprehensibly
The comment over migrate_pages() looks quite weird, and makes it hard to grasp what it is trying to say. Rewrite it more comprehensibly. Signed-off-by: Srivatsa S. Bhat <srivatsa.bhat@linux.vnet.ibm.com> Acked-by: Christoph Lameter <cl@linux.com> Cc: Mel Gorman <mgorman@suse.de> Cc: Hugh Dickins <hughd@google.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'mm')
-rw-r--r--mm/migrate.c22
1 files changed, 13 insertions, 9 deletions
diff --git a/mm/migrate.c b/mm/migrate.c
index c87ef9207853..27ed22579fd9 100644
--- a/mm/migrate.c
+++ b/mm/migrate.c
@@ -973,19 +973,23 @@ out:
973} 973}
974 974
975/* 975/*
976 * migrate_pages 976 * migrate_pages - migrate the pages specified in a list, to the free pages
977 * supplied as the target for the page migration
977 * 978 *
978 * The function takes one list of pages to migrate and a function 979 * @from: The list of pages to be migrated.
979 * that determines from the page to be migrated and the private data 980 * @get_new_page: The function used to allocate free pages to be used
980 * the target of the move and allocates the page. 981 * as the target of the page migration.
982 * @private: Private data to be passed on to get_new_page()
983 * @mode: The migration mode that specifies the constraints for
984 * page migration, if any.
985 * @reason: The reason for page migration.
981 * 986 *
982 * The function returns after 10 attempts or if no pages 987 * The function returns after 10 attempts or if no pages are movable any more
983 * are movable anymore because to has become empty 988 * because the list has become empty or no retryable pages exist any more.
984 * or no retryable pages exist anymore. 989 * The caller should call putback_lru_pages() to return pages to the LRU
985 * Caller should call putback_lru_pages to return pages to the LRU
986 * or free list only if ret != 0. 990 * or free list only if ret != 0.
987 * 991 *
988 * Return: Number of pages not migrated or error code. 992 * Returns the number of pages that were not migrated, or an error code.
989 */ 993 */
990int migrate_pages(struct list_head *from, new_page_t get_new_page, 994int migrate_pages(struct list_head *from, new_page_t get_new_page,
991 unsigned long private, enum migrate_mode mode, int reason) 995 unsigned long private, enum migrate_mode mode, int reason)