kernel-ark/arch/tile/mm
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
..
elf.c tile: implement gettimeofday() via vDSO 2013-08-13 16:26:21 -04:00
extable.c
fault.c tile: remove support for TILE64 2013-09-03 14:53:29 -04:00
highmem.c tile: remove calls to arch_flush_lazy_mmu_mode() 2013-08-13 16:25:56 -04:00
homecache.c tile: remove support for TILE64 2013-09-03 14:53:29 -04:00
hugetlbpage.c mm: migrate: check movability of hugepage in unmap_and_move_huge_page() 2013-09-11 15:57:49 -07:00
init.c tile: make __write_once a synonym for __read_mostly 2013-09-03 14:53:32 -04:00
Makefile
migrate_32.S tile: provide traceability for hypervisor calls 2013-08-13 16:26:31 -04:00
migrate_64.S tile: provide traceability for hypervisor calls 2013-08-13 16:26:31 -04:00
migrate.h arch/tile: use interrupt critical sections less 2012-05-25 12:48:20 -04:00
mmap.c tile: support ASLR fully 2013-08-30 11:56:25 -04:00
pgtable.c tile: add virt_to_kpte() API and clean up and document behavior 2013-09-03 14:52:13 -04:00