1
0
Fork 0
alistair23-linux/arch/arm64
Naoya Horiguchi 83467efbdb mm: migrate: check movability of hugepage in unmap_and_move_huge_page()
Currently hugepage migration works well only for pmd-based hugepages
(mainly due to lack of testing,) so we had better not enable migration of
other levels of hugepages until we are ready for it.

Some users of hugepage migration (mbind, move_pages, and migrate_pages) do
page table walk and check pud/pmd_huge() there, so they are safe.  But the
other users (softoffline and memory hotremove) don't do this, so without
this patch they can try to migrate unexpected types of hugepages.

To prevent this, we introduce hugepage_migration_support() as an
architecture dependent check of whether hugepage are implemented on a pmd
basis or not.  And on some architecture multiple sizes of hugepages are
available, so hugepage_migration_support() also checks hugepage size.

Signed-off-by: Naoya Horiguchi <n-horiguchi@ah.jp.nec.com>
Cc: Andi Kleen <ak@linux.intel.com>
Cc: Hillf Danton <dhillf@gmail.com>
Cc: Wanpeng Li <liwanp@linux.vnet.ibm.com>
Cc: Mel Gorman <mgorman@suse.de>
Cc: Hugh Dickins <hughd@google.com>
Cc: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
Cc: Michal Hocko <mhocko@suse.cz>
Cc: Rik van Riel <riel@redhat.com>
Cc: "Aneesh Kumar K.V" <aneesh.kumar@linux.vnet.ibm.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2013-09-11 15:57:49 -07:00
..
boot arm64: Add initial DTS for APM X-Gene Storm SOC and APM Mustang board 2013-06-20 17:03:59 +01:00
configs arm64: Enable APM X-Gene SOC family in the defconfig 2013-06-20 17:03:59 +01:00
include - User tagged pointers support (top 8-bit of user pointers automatically 2013-09-06 11:09:44 -07:00
kernel Device tree core updates for v3.12 2013-09-10 13:53:52 -07:00
kvm arm64: KVM: add missing dsb before invalidating Stage-2 TLBs 2013-08-09 13:19:28 +01:00
lib arm64: Treat the bitops index argument as an 'int' 2013-05-08 10:33:17 +01:00
mm mm: migrate: check movability of hugepage in unmap_and_move_huge_page() 2013-09-11 15:57:49 -07:00
xen xen/arm and xen/arm64: implement HYPERVISOR_tmem_op 2013-07-04 11:41:12 +00:00
Kconfig arm64: add support for kernel mode NEON 2013-08-20 12:12:26 +01:00
Kconfig.debug arm64: Kconfig.debug: Remove unused CONFIG_DEBUG_ERRORS 2013-03-19 16:19:19 +00:00
Makefile arm64/Makefile: provide vdso_install target 2013-06-19 17:54:06 +01:00