]> git.proxmox.com Git - mirror_ubuntu-eoan-kernel.git/commitdiff
arm, thp: remove infrastructure for handling splitting PMDs
authorKirill A. Shutemov <kirill.shutemov@linux.intel.com>
Sat, 16 Jan 2016 00:53:14 +0000 (16:53 -0800)
committerLinus Torvalds <torvalds@linux-foundation.org>
Sat, 16 Jan 2016 01:56:32 +0000 (17:56 -0800)
With new refcounting we don't need to mark PMDs splitting.  Let's drop
code to handle this.

pmdp_splitting_flush() is not needed too: on splitting PMD we will do
pmdp_clear_flush() + set_pte_at().  pmdp_clear_flush() will do IPI as
needed for fast_gup.

[arnd@arndb.de: fix unterminated ifdef in header file]
Signed-off-by: Kirill A. Shutemov <kirill.shutemov@linux.intel.com>
Cc: Sasha Levin <sasha.levin@oracle.com>
Cc: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
Cc: Jerome Marchand <jmarchan@redhat.com>
Cc: Vlastimil Babka <vbabka@suse.cz>
Cc: Andrea Arcangeli <aarcange@redhat.com>
Cc: Hugh Dickins <hughd@google.com>
Cc: Dave Hansen <dave.hansen@intel.com>
Cc: Mel Gorman <mgorman@suse.de>
Cc: Rik van Riel <riel@redhat.com>
Cc: Vlastimil Babka <vbabka@suse.cz>
Cc: Steve Capper <steve.capper@linaro.org>
Cc: Johannes Weiner <hannes@cmpxchg.org>
Cc: Michal Hocko <mhocko@suse.cz>
Cc: Christoph Lameter <cl@linux.com>
Cc: David Rientjes <rientjes@google.com>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
arch/arm/include/asm/pgtable-3level.h
arch/arm/lib/uaccess_with_memcpy.c
arch/arm/mm/flush.c

index a745a2a53853c384f688ebab2cd6d254b87a6017..59d1457ca5511d03027bf3d98479831520d3b3bc 100644 (file)
@@ -88,7 +88,6 @@
 
 #define L_PMD_SECT_VALID       (_AT(pmdval_t, 1) << 0)
 #define L_PMD_SECT_DIRTY       (_AT(pmdval_t, 1) << 55)
-#define L_PMD_SECT_SPLITTING   (_AT(pmdval_t, 1) << 56)
 #define L_PMD_SECT_NONE                (_AT(pmdval_t, 1) << 57)
 #define L_PMD_SECT_RDONLY      (_AT(pteval_t, 1) << 58)
 
@@ -232,13 +231,6 @@ static inline pte_t pte_mkspecial(pte_t pte)
 
 #ifdef CONFIG_TRANSPARENT_HUGEPAGE
 #define pmd_trans_huge(pmd)    (pmd_val(pmd) && !pmd_table(pmd))
-#define pmd_trans_splitting(pmd) (pmd_isset((pmd), L_PMD_SECT_SPLITTING))
-
-#ifdef CONFIG_HAVE_RCU_TABLE_FREE
-#define __HAVE_ARCH_PMDP_SPLITTING_FLUSH
-void pmdp_splitting_flush(struct vm_area_struct *vma, unsigned long address,
-                         pmd_t *pmdp);
-#endif
 #endif
 
 #define PMD_BIT_FUNC(fn,op) \
@@ -246,7 +238,6 @@ static inline pmd_t pmd_##fn(pmd_t pmd) { pmd_val(pmd) op; return pmd; }
 
 PMD_BIT_FUNC(wrprotect,        |= L_PMD_SECT_RDONLY);
 PMD_BIT_FUNC(mkold,    &= ~PMD_SECT_AF);
-PMD_BIT_FUNC(mksplitting, |= L_PMD_SECT_SPLITTING);
 PMD_BIT_FUNC(mkwrite,   &= ~L_PMD_SECT_RDONLY);
 PMD_BIT_FUNC(mkdirty,   |= L_PMD_SECT_DIRTY);
 PMD_BIT_FUNC(mkyoung,   |= PMD_SECT_AF);
index 588bbc288396ae52fe0d801bc537906b3e5dbfce..6bd1089b07e0960830ed6bd6a8345202b7efd8b0 100644 (file)
@@ -52,14 +52,13 @@ pin_page_for_write(const void __user *_addr, pte_t **ptep, spinlock_t **ptlp)
         *
         * Lock the page table for the destination and check
         * to see that it's still huge and whether or not we will
-        * need to fault on write, or if we have a splitting THP.
+        * need to fault on write.
         */
        if (unlikely(pmd_thp_or_huge(*pmd))) {
                ptl = &current->mm->page_table_lock;
                spin_lock(ptl);
                if (unlikely(!pmd_thp_or_huge(*pmd)
-                       || pmd_hugewillfault(*pmd)
-                       || pmd_trans_splitting(*pmd))) {
+                       || pmd_hugewillfault(*pmd))) {
                        spin_unlock(ptl);
                        return 0;
                }
index 1ec8e7590fc6823bf1d1ffe87c1901f645ffcd07..c2acebb7eedcf8cc9ad2ff2acbd5cdf98138e937 100644 (file)
@@ -415,18 +415,3 @@ void __flush_anon_page(struct vm_area_struct *vma, struct page *page, unsigned l
         */
        __cpuc_flush_dcache_area(page_address(page), PAGE_SIZE);
 }
-
-#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 */