android_kernel_samsung_msm8976/mm
Naoya Horiguchi 73c908594f 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>
Git-commit: 83467efbdb7948146581a56cbd683a22a0684bbb
Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
[imaund@codeaurora.org: resolve merge conflicts. Since we are only picking
    changes related to arm64, there were additional changes in the tail
    which weren't needed.]
Signed-off-by: Ian Maund <imaund@codeaurora.org>
2014-02-07 13:49:46 -08:00
..
backing-dev.c
balloon_compaction.c
bootmem.c mm: concentrate modification of totalram_pages into the mm core 2014-02-07 13:49:40 -08:00
bounce.c
cleancache.c
compaction.c
debug-pagealloc.c debug-pagealloc: Panic on pagealloc corruption 2013-10-01 11:45:57 -07:00
dmapool.c
fadvise.c
failslab.c
filemap.c mm: Don't use CMA pages for writes 2013-07-08 05:55:01 -07:00
filemap_xip.c
fremap.c
frontswap.c
highmem.c
huge_memory.c
hugetlb.c Fix TLB gather virtual address range invalidation corner cases 2014-02-07 13:49:43 -08:00
hugetlb_cgroup.c
hwpoison-inject.c
init-mm.c
internal.h mm: vmscan: fix do_try_to_free_pages() livelock 2013-11-07 18:39:56 -08:00
interval_tree.c
Kconfig zswap: add to mm/ 2013-10-18 18:26:02 -07:00
Kconfig.debug
kmemcheck.c
kmemleak-test.c
kmemleak.c
ksm.c
maccess.c
madvise.c
Makefile zswap: add to mm/ 2013-10-18 18:26:02 -07:00
memblock.c memblock: Add memblock_overlaps_memory() 2013-07-08 05:51:57 -07:00
memcontrol.c
memory-failure.c
memory.c Fix TLB gather virtual address range invalidation corner cases 2014-02-07 13:49:43 -08:00
memory_hotplug.c mm: make physical memory offline work 2013-07-08 05:52:01 -07:00
mempolicy.c
mempool.c
migrate.c mm: migrate: check movability of hugepage in unmap_and_move_huge_page() 2014-02-07 13:49:46 -08:00
mincore.c
mlock.c kernel: Add hooks for user-accessible timers in the kernel. 2013-09-04 15:36:37 -07:00
mm_init.c
mmap.c Fix TLB gather virtual address range invalidation corner cases 2014-02-07 13:49:43 -08:00
mmu_context.c
mmu_notifier.c
mmzone.c
mprotect.c
mremap.c
msync.c
nobootmem.c mm/nobootmem.c: have __free_pages_memory() free in larger chunks. 2014-02-07 13:49:40 -08:00
nommu.c mm: remove free_area_cache 2014-02-07 13:49:41 -08:00
oom_kill.c
page-writeback.c mm: vmscan: fix do_try_to_free_pages() livelock 2013-11-07 18:39:56 -08:00
page_alloc.c mm: accurately calculate zone->managed_pages for highmem zones 2014-02-07 13:49:39 -08:00
page_cgroup.c
page_io.c mm: swap: Rate limit swap write errors 2013-11-14 09:27:11 -08:00
page_isolation.c
pagewalk.c mm/pagewalk.c: fix walk_page_range() access of wrong PTEs 2013-11-21 20:09:01 -08:00
percpu-km.c
percpu-vm.c
percpu.c
pgtable-generic.c
process_vm_access.c
quicklist.c
readahead.c mm: pass readahead info down to the i/o scheduler 2013-08-22 18:08:28 -07:00
rmap.c
shmem.c cope with potentially long ->d_dname() output for shmem/hugetlb 2014-01-09 16:35:41 -08:00
slab.c
slab.h
slab_common.c
slob.c
slub.c
sparse-vmemmap.c
sparse.c msm: mm: Fix errors when turning on SPARSEMEM 2013-07-08 05:51:58 -07:00
swap.c
swap_state.c
swapfile.c
truncate.c
util.c mm: remove free_area_cache 2014-02-07 13:49:41 -08:00
vmalloc.c mm: make is_vmalloc_addr lockless 2013-12-20 06:02:21 -08:00
vmpressure.c
vmscan.c mm: vmscan: Move pages that fail swapout to LRU active list 2013-11-14 09:00:00 -08:00
vmstat.c mm: vmscan: fix do_try_to_free_pages() livelock 2013-11-07 18:39:56 -08:00
zbud.c zbud: add to mm/ 2013-10-18 18:24:55 -07:00
zswap.c zswap: add to mm/ 2013-10-18 18:26:02 -07:00