WSL2-Linux-Kernel/arch/s390/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
..
Makefile s390/mem_detect: move memory detection code to mm folder 2013-05-02 15:50:22 +02:00
cmm.c s390/cmm: Removed useless label 2013-04-17 14:07:27 +02:00
dump_pagetables.c s390/mm: cleanup page table definitions 2013-08-22 12:20:06 +02:00
extable.c s390/exceptions: switch to relative exception table entries 2012-09-26 15:45:10 +02:00
extmem.c s390/comments: unify copyright messages and remove file names 2012-07-20 11:15:04 +02:00
fault.c s390/irq: rework irq subclass handling 2013-09-04 17:19:13 +02:00
gup.c s390/mm: cleanup page table definitions 2013-08-22 12:20:06 +02: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 s390: add support for IBM zBC12 machine 2013-07-26 13:25:21 +02:00
maccess.c s390: make various functions static, add declarations to header files 2013-09-07 11:58:03 +02:00
mem_detect.c s390/mem_detect: fix memory hole handling 2013-06-19 15:36:16 +02:00
mmap.c mm: remove free_area_cache 2013-07-10 18:11:34 -07:00
page-states.c include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h 2010-03-30 22:02:32 +09:00
pageattr.c s390/mm: cleanup page table definitions 2013-08-22 12:20:06 +02:00
pgtable.c Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux 2013-09-11 08:36:03 -07:00
vmem.c s390/mm: implement software referenced bits 2013-08-29 13:20:11 +02:00