aboutsummaryrefslogtreecommitdiff
path: root/arch/arm64/mm/flush.c
diff options
context:
space:
mode:
authorSteve Capper <steve.capper@linaro.org>2014-03-21 10:55:36 +0000
committerSteve Capper <steve.capper@linaro.org>2014-08-27 15:37:02 +0100
commite376930ae25e6556c71b1c2d4531244b3c104353 (patch)
tree8d85683aebc3630037b80839292cd47bca3800a5 /arch/arm64/mm/flush.c
parent07e9c2c90b1a373d0bfef06bf1f6ddcf18317275 (diff)
downloadlinux-e376930ae25e6556c71b1c2d4531244b3c104353.tar.gz
arm64: mm: Enable RCU fast_gupfast_gup/3.17-rc1
Activate the RCU fast_gup for ARM64. We also need to force THP splits to broadcast an IPI s.t. we block in the fast_gup page walker. As THP splits are comparatively rare, this should not lead to a noticeable performance degradation. Some pre-requisite functions pud_write and pud_page are also added. Signed-off-by: Steve Capper <steve.capper@linaro.org> Tested-by: Dann Frazier <dann.frazier@canonical.com> Acked-by: Catalin Marinas <catalin.marinas@arm.com>
Diffstat (limited to 'arch/arm64/mm/flush.c')
-rw-r--r--arch/arm64/mm/flush.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/arch/arm64/mm/flush.c b/arch/arm64/mm/flush.c
index 0d64089d28b..2d5fd471fb8 100644
--- a/arch/arm64/mm/flush.c
+++ b/arch/arm64/mm/flush.c
@@ -104,3 +104,18 @@ EXPORT_SYMBOL(flush_dcache_page);
*/
EXPORT_SYMBOL(flush_cache_all);
EXPORT_SYMBOL(flush_icache_range);
+
+#ifdef CONFIG_TRANSPARENT_HUGEPAGE
+#ifdef CONFIG_HAVE_RCU_TABLE_FREE
+void pmdp_splitting_flush(struct vm_area_struct *vma, unsigned long address,
+ pmd_t *pmdp)
+{
+ pmd_t pmd = pmd_mksplitting(*pmdp);
+ VM_BUG_ON(address & ~PMD_MASK);
+ set_pmd_at(vma->vm_mm, address, pmdp, pmd);
+
+ /* dummy IPI to serialise against fast_gup */
+ kick_all_cpus_sync();
+}
+#endif /* CONFIG_HAVE_RCU_TABLE_FREE */
+#endif /* CONFIG_TRANSPARENT_HUGEPAGE */