linux/arch/arm
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 ARM: SoC late changes for v3.12 2013-09-09 16:35:29 -07:00
common Merge branch 'for-linus' of git://git.infradead.org/users/vkoul/slave-dma 2013-09-10 13:37:36 -07:00
configs ARM: SoC late changes for v3.12 2013-09-09 16:35:29 -07:00
crypto
include ARM: SoC late changes for v3.12 2013-09-09 16:35:29 -07:00
kernel ARM: SoC platform changes for 3.12 2013-09-06 13:30:06 -07:00
kvm Merge branch 'for-linus' of git://git.linaro.org/people/rmk/linux-arm 2013-09-05 18:07:32 -07:00
lib
mach-at91 ARM: SoC late changes for v3.12 2013-09-09 16:35:29 -07:00
mach-bcm
mach-bcm2835
mach-clps711x
mach-cns3xxx
mach-davinci ARM: SoC platform changes for 3.12 2013-09-06 13:30:06 -07:00
mach-dove ARM: SoC board updates for 3.12 2013-09-06 13:34:43 -07:00
mach-ebsa110 ARM: debug: move 8250 debug include into arch/arm/include/debug/ 2013-08-25 17:11:02 +01:00
mach-ep93xx MMC highlights for 3.12: 2013-09-10 13:33:09 -07:00
mach-exynos ARM: SoC late changes for v3.12 2013-09-09 16:35:29 -07:00
mach-footbridge ARM: debug: move 8250 debug include into arch/arm/include/debug/ 2013-08-25 17:11:02 +01:00
mach-gemini ARM: debug: move 8250 debug include into arch/arm/include/debug/ 2013-08-25 17:11:02 +01:00
mach-highbank ARM: SoC late changes for v3.12 2013-09-09 16:35:29 -07:00
mach-imx Merge branch 'for-linus' of git://git.infradead.org/users/vkoul/slave-dma 2013-09-10 13:37:36 -07:00
mach-integrator ARM: debug: move PL01X debug include into arch/arm/include/debug/ 2013-08-25 17:11:06 +01:00
mach-iop13xx ARM: debug: move 8250 debug include into arch/arm/include/debug/ 2013-08-25 17:11:02 +01:00
mach-iop32x ARM: debug: move 8250 debug include into arch/arm/include/debug/ 2013-08-25 17:11:02 +01:00
mach-iop33x ARM: debug: move 8250 debug include into arch/arm/include/debug/ 2013-08-25 17:11:02 +01:00
mach-ixp4xx ARM: debug: move 8250 debug include into arch/arm/include/debug/ 2013-08-25 17:11:02 +01:00
mach-keystone Omap fixes for the merge window that are not urgent enough 2013-08-29 19:12:04 -07:00
mach-kirkwood ARM: SoC board updates for 3.12 2013-09-06 13:34:43 -07:00
mach-ks8695 gpio: (gpio-pca953x) move header to linux/platform_data/ 2013-08-29 12:33:52 -07:00
mach-lpc32xx ARM: debug: move 8250 debug include into arch/arm/include/debug/ 2013-08-25 17:11:02 +01:00
mach-mmp ARM: SoC late changes for v3.12 2013-09-09 16:35:29 -07:00
mach-msm ARM: SoC cleanups for 3.12 2013-09-06 13:21:16 -07:00
mach-mv78xx0 ARM: SoC platform changes for 3.12 2013-09-06 13:30:06 -07:00
mach-mvebu ARM: SoC platform changes for 3.12 2013-09-06 13:30:06 -07:00
mach-mxs
mach-netx
mach-nomadik
mach-nspire
mach-omap1
mach-omap2 ARM: SoC late changes for v3.12 2013-09-09 16:35:29 -07:00
mach-orion5x ARM: SoC board updates for 3.12 2013-09-06 13:34:43 -07:00
mach-picoxcell
mach-prima2 ARM: SoC platform changes for 3.12 2013-09-06 13:30:06 -07:00
mach-pxa ARM: SoC DT updates for 3.12 2013-09-06 13:26:27 -07:00
mach-realview ARM: SoC cleanups for 3.12 2013-09-06 13:21:16 -07:00
mach-rockchip
mach-rpc ARM: debug: move 8250 debug include into arch/arm/include/debug/ 2013-08-25 17:11:02 +01:00
mach-s3c24xx
mach-s3c64xx gpio: (gpio-pca953x) move header to linux/platform_data/ 2013-08-29 12:33:52 -07:00
mach-s5p64x0
mach-s5pc100
mach-s5pv210
mach-sa1100
mach-shark
mach-shmobile ARM: Renesas SoC cleanup, refactoring and more SMP support 2013-09-09 16:33:57 -07:00
mach-socfpga
mach-spear ARM: SoC cleanups for 3.12 2013-09-06 13:21:16 -07:00
mach-sti
mach-sunxi
mach-tegra ARM: SoC platform changes for 3.12 2013-09-06 13:30:06 -07:00
mach-u300
mach-ux500 ARM: SoC late changes for v3.12 2013-09-09 16:35:29 -07:00
mach-versatile ARM: debug: move PL01X debug include into arch/arm/include/debug/ 2013-08-25 17:11:06 +01:00
mach-vexpress ARM: SoC drivers for v3.12 2013-09-09 16:08:13 -07:00
mach-virt
mach-vt8500
mach-w90x900
mach-zynq
mm mm: migrate: check movability of hugepage in unmap_and_move_huge_page() 2013-09-11 15:57:49 -07:00
net
nwfpe
oprofile
plat-iop
plat-omap ARM: SoC platform changes for 3.12 2013-09-06 13:30:06 -07:00
plat-orion
plat-pxa
plat-samsung ARM: SoC cleanups for 3.12 2013-09-06 13:21:16 -07:00
plat-versatile
tools
vfp
xen Linux 3.11-rc7 2013-09-09 12:05:37 -04:00
Kconfig ARM: SoC late changes for v3.12 2013-09-09 16:35:29 -07:00
Kconfig-nommu
Kconfig.debug ARM: SoC cleanups for 3.12 2013-09-06 13:21:16 -07:00
Makefile