remarkable-linux/arch/x86/mm
Mel Gorman 2b4847e730 mm: numa: serialise parallel get_user_page against THP migration
Base pages are unmapped and flushed from cache and TLB during normal
page migration and replaced with a migration entry that causes any
parallel NUMA hinting fault or gup to block until migration completes.

THP does not unmap pages due to a lack of support for migration entries
at a PMD level.  This allows races with get_user_pages and
get_user_pages_fast which commit 3f926ab945 ("mm: Close races between
THP migration and PMD numa clearing") made worse by introducing a
pmd_clear_flush().

This patch forces get_user_page (fast and normal) on a pmd_numa page to
go through the slow get_user_page path where it will serialise against
THP migration and properly account for the NUMA hinting fault.  On the
migration side the page table lock is taken for each PTE update.

Signed-off-by: Mel Gorman <mgorman@suse.de>
Reviewed-by: Rik van Riel <riel@redhat.com>
Cc: Alex Thorlton <athorlton@sgi.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2013-12-18 19:04:50 -08:00
..
kmemcheck
amdtopology.c x86/mm/numa: Simplify some bit mangling 2013-04-10 19:06:26 +02:00
dump_pagetables.c
extable.c
fault.c Merge branch 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2013-11-14 16:55:56 +09:00
gup.c mm: numa: serialise parallel get_user_page against THP migration 2013-12-18 19:04:50 -08:00
highmem_32.c mm: accurately calculate zone->managed_pages for highmem zones 2013-07-03 16:07:33 -07: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 arch/x86/mm/init.c: fix incorrect function name in alloc_low_pages() 2013-11-13 12:09:11 +09:00
init_32.c mm/x86: prepare for removing num_physpages and simplify mem_init() 2013-07-03 16:07:38 -07:00
init_64.c mm/x86: prepare for removing num_physpages and simplify mem_init() 2013-07-03 16:07:38 -07:00
iomap_32.c
ioremap.c mm: Remove unused variable idx0 in __early_ioremap() 2013-08-13 11:46:36 +02:00
kmmio.c
Makefile x86, trace: Add page fault tracepoints 2013-11-08 14:15:49 -08:00
memtest.c x86/memtest: Shorten time for tests 2013-02-18 09:28:42 +01:00
mm_internal.h
mmap.c x86 get_unmapped_area: Access mmap_legacy_base through mm_struct member 2013-08-22 10:19:35 -07:00
mmio-mod.c x86: delete __cpuinit usage from all x86 files 2013-07-14 19:36:56 -04:00
numa.c mem-hotplug: introduce movable_node boot option 2013-11-13 12:09:09 +09:00
numa_32.c mm/x86: prepare for removing num_physpages and simplify mem_init() 2013-07-03 16:07:38 -07:00
numa_64.c
numa_emulation.c x86: delete __cpuinit usage from all x86 files 2013-07-14 19:36:56 -04:00
numa_internal.h x86-32, mm: Rip out x86_32 NUMA remapping code 2013-01-31 14:12:30 -08:00
pageattr-test.c x86: rename random32() to prandom_u32() 2013-04-29 18:28:42 -07:00
pageattr.c Merge branch 'x86-mm-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2013-04-30 08:40:35 -07:00
pat.c x86: Do not try to sync identity map for non-mapped pages 2013-03-07 13:23:28 -08:00
pat_internal.h
pat_rbtree.c
pf_in.c
pf_in.h
pgtable.c x86, mm: do not leak page->ptl for pmd page tables 2013-11-21 16:42:28 -08:00
pgtable_32.c
physaddr.c x86, mm: Make DEBUG_VIRTUAL work earlier in boot 2013-01-25 16:33:22 -08:00
physaddr.h
setup_nx.c x86: delete __cpuinit usage from all x86 files 2013-07-14 19:36:56 -04:00
srat.c ACPI / x86: Print Hot-Pluggable Field in SRAT. 2013-08-14 23:24:01 +02:00
testmmiotrace.c
tlb.c mm: vmstats: track TLB flush stats on UP too 2013-09-11 15:57:09 -07:00