kernel-ark/arch/sparc/mm
David S. Miller 0fbebed682 sparc64: Fix tsb_grow() in atomic context.
If our first THP installation for an MM is via the set_pmd_at() done
during khugepaged's collapsing we'll end up in tsb_grow() trying to do
a GFP_KERNEL allocation with several locks held.

Simply using GFP_ATOMIC in this situation is not the best option
because we really can't have this fail, so we'd really like to keep
this an order 0 GFP_KERNEL allocation if possible.

Also, doing the TSB allocation from khugepaged is a really bad idea
because we'll allocate it potentially from the wrong NUMA node in that
context.

So what we do is defer the hugepage TSB allocation until the first TLB
miss we take on a hugepage.  This is slightly tricky because we have
to handle two unusual cases:

1) Taking the first hugepage TLB miss in the window trap handler.
   We'll call the winfix_trampoline when that is detected.

2) An initial TSB allocation via TLB miss races with a hugetlb
   fault on another cpu running the same MM.  We handle this by
   unconditionally loading the TSB we see into the current cpu
   even if it's non-NULL at hugetlb_setup time.

Reported-by: Meelis Roos <mroos@ut.ee>
Signed-off-by: David S. Miller <davem@davemloft.net>
2013-02-20 09:46:08 -08:00
..
extable.c sparc: Add module.h to files previously implicitly using it. 2011-10-31 19:30:54 -04:00
fault_32.c readahead: fault retry breaks mmap file read random detection 2012-10-09 16:22:47 +09:00
fault_64.c sparc64: Fix tsb_grow() in atomic context. 2013-02-20 09:46:08 -08:00
gup.c sparc64: Fix get_user_pages_fast() wrt. THP. 2013-02-13 12:22:14 -08:00
highmem.c sparc32: move kmap_init() to highmem.c 2012-07-26 16:46:17 -07:00
hugetlbpage.c mm: use vm_unmapped_area() in hugetlbfs on sparc64 architecture 2012-12-11 17:22:26 -08:00
hypersparc.S
init_32.c sparc32: delete dead code in show_mem() 2012-07-26 16:46:17 -07:00
init_64.c sparc64: Fix tsb_grow() in atomic context. 2013-02-20 09:46:08 -08:00
init_64.h sparc64: Support 2GB and 16GB page sizes for kernel linear mappings. 2012-09-06 18:13:58 -07:00
io-unit.c sparc32: Convert mmu_* interfaces from btfixup to method ops. 2012-05-13 13:57:05 -07:00
iommu.c sparc: fix format string argument for prom_printf() 2012-10-02 23:20:34 -04:00
leon_mm.c sparc32: srmmu_probe now knows about leon too 2012-05-27 23:52:51 -07:00
Makefile sparc32: introduce run-time patching of srmmu access functions 2012-05-27 23:52:49 -07:00
srmmu_access.S sparc32: introduce run-time patching of srmmu access functions 2012-05-27 23:52:49 -07:00
srmmu.c sparc32: move probe_memory() to srmmu.c 2012-07-26 16:46:17 -07:00
srmmu.h sparc32,leon: move leon mmu functions to leon_mm.c 2012-05-19 23:27:38 -07:00
swift.S
tlb.c sparc64: Fix tsb_grow() in atomic context. 2013-02-20 09:46:08 -08:00
tsb.c sparc64: Fix gfp_flags setting in tsb_grow(). 2013-02-20 09:45:53 -08:00
tsunami.S
ultra.S sparc64: Add global PMU register dumping via sysrq. 2012-10-16 09:34:01 -07:00
viking.S sparc32: remove runtime btfix support 2012-05-14 14:05:09 -07:00