diff options
author | David S. Miller <davem@davemloft.net> | 2013-02-20 10:34:10 +0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2013-02-20 21:46:08 +0400 |
commit | 0fbebed682ff2788dee58e8d7f7dda46e33aa10b (patch) | |
tree | 62aecd278c28c2f5007ece44c5cf34429807e8ae /arch/sparc/include/asm/hugetlb.h | |
parent | bcd896bae0166b4443503482a26ecf84d9ba60ab (diff) | |
download | linux-0fbebed682ff2788dee58e8d7f7dda46e33aa10b.tar.xz |
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>
Diffstat (limited to 'arch/sparc/include/asm/hugetlb.h')
-rw-r--r-- | arch/sparc/include/asm/hugetlb.h | 1 |
1 files changed, 0 insertions, 1 deletions
diff --git a/arch/sparc/include/asm/hugetlb.h b/arch/sparc/include/asm/hugetlb.h index 9661e9bc7bb6..7eb57d245044 100644 --- a/arch/sparc/include/asm/hugetlb.h +++ b/arch/sparc/include/asm/hugetlb.h @@ -12,7 +12,6 @@ pte_t huge_ptep_get_and_clear(struct mm_struct *mm, unsigned long addr, static inline void hugetlb_prefault_arch_hook(struct mm_struct *mm) { - hugetlb_setup(mm); } static inline int is_hugepage_only_range(struct mm_struct *mm, |