mm: migrate: add hugepage migration code to move_pages()
authorNaoya Horiguchi <[email protected]>
Wed, 11 Sep 2013 21:22:04 +0000 (14:22 -0700)
committerLinus Torvalds <[email protected]>
Wed, 11 Sep 2013 22:57:48 +0000 (15:57 -0700)
commite632a938d914d271bec26e570d36c755a1e35e4c
treee0912384cab7b9bdc3eacd4b3e232207f7c3944d
parente2d8cf405525d83e6ca42969be460f94b0339798
mm: migrate: add hugepage migration code to move_pages()

Extend move_pages() to handle vma with VM_HUGETLB set.  We will be able to
migrate hugepage with move_pages(2) after applying the enablement patch
which comes later in this series.

We avoid getting refcount on tail pages of hugepage, because unlike thp,
hugepage is not split and we need not care about races with splitting.

And migration of larger (1GB for x86_64) hugepage are not enabled.

Signed-off-by: Naoya Horiguchi <[email protected]>
Acked-by: Andi Kleen <[email protected]>
Reviewed-by: Wanpeng Li <[email protected]>
Cc: Hillf Danton <[email protected]>
Cc: Mel Gorman <[email protected]>
Cc: Hugh Dickins <[email protected]>
Cc: KOSAKI Motohiro <[email protected]>
Cc: Michal Hocko <[email protected]>
Cc: Rik van Riel <[email protected]>
Cc: "Aneesh Kumar K.V" <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
mm/memory.c
mm/migrate.c