Commit c73e5c9c authored by Srivatsa S. Bhat's avatar Srivatsa S. Bhat Committed by Linus Torvalds

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: default avatarSrivatsa S. Bhat <srivatsa.bhat@linux.vnet.ibm.com>
Acked-by: default avatarChristoph Lameter <cl@linux.com>
Cc: Mel Gorman <mgorman@suse.de>
Cc: Hugh Dickins <hughd@google.com>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent 52f37629
...@@ -973,19 +973,23 @@ static int unmap_and_move_huge_page(new_page_t get_new_page, ...@@ -973,19 +973,23 @@ static int unmap_and_move_huge_page(new_page_t get_new_page,
} }
/* /*
* migrate_pages * migrate_pages - migrate the pages specified in a list, to the free pages
* supplied as the target for the page migration
* *
* The function takes one list of pages to migrate and a function * @from: The list of pages to be migrated.
* that determines from the page to be migrated and the private data * @get_new_page: The function used to allocate free pages to be used
* the target of the move and allocates the page. * as the target of the page migration.
* @private: Private data to be passed on to get_new_page()
* @mode: The migration mode that specifies the constraints for
* page migration, if any.
* @reason: The reason for page migration.
* *
* The function returns after 10 attempts or if no pages * The function returns after 10 attempts or if no pages are movable any more
* are movable anymore because to has become empty * because the list has become empty or no retryable pages exist any more.
* or no retryable pages exist anymore. * The caller should call putback_lru_pages() to return pages to the LRU
* Caller should call putback_lru_pages to return pages to the LRU
* or free list only if ret != 0. * or free list only if ret != 0.
* *
* Return: Number of pages not migrated or error code. * Returns the number of pages that were not migrated, or an error code.
*/ */
int migrate_pages(struct list_head *from, new_page_t get_new_page, int migrate_pages(struct list_head *from, new_page_t get_new_page,
unsigned long private, enum migrate_mode mode, int reason) unsigned long private, enum migrate_mode mode, int reason)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment