diff options
author | Kirill A. Shutemov <kirill.shutemov@linux.intel.com> | 2016-01-15 19:53:24 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2016-01-15 20:56:32 -0500 |
commit | fecffad25458f0217e3d34613be09faaca208bad (patch) | |
tree | 020790d5b741883ffd4d3a8d274bc1acd6b8bd11 /arch/s390/mm | |
parent | 7aa9a23c69eae5bfba4f1f92c58d89edc334c8ae (diff) |
s390, thp: remove infrastructure for handling splitting PMDs
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.
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: Naoya Horiguchi <n-horiguchi@ah.jp.nec.com>
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: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'arch/s390/mm')
-rw-r--r-- | arch/s390/mm/gup.c | 11 | ||||
-rw-r--r-- | arch/s390/mm/pgtable.c | 16 |
2 files changed, 1 insertions, 26 deletions
diff --git a/arch/s390/mm/gup.c b/arch/s390/mm/gup.c index 1a2cad52babf..13dab0c1645c 100644 --- a/arch/s390/mm/gup.c +++ b/arch/s390/mm/gup.c | |||
@@ -105,16 +105,7 @@ static inline int gup_pmd_range(pud_t *pudp, pud_t pud, unsigned long addr, | |||
105 | pmd = *pmdp; | 105 | pmd = *pmdp; |
106 | barrier(); | 106 | barrier(); |
107 | next = pmd_addr_end(addr, end); | 107 | next = pmd_addr_end(addr, end); |
108 | /* | 108 | if (pmd_none(pmd)) |
109 | * The pmd_trans_splitting() check below explains why | ||
110 | * pmdp_splitting_flush() has to serialize with | ||
111 | * smp_call_function() against our disabled IRQs, to stop | ||
112 | * this gup-fast code from running while we set the | ||
113 | * splitting bit in the pmd. Returning zero will take | ||
114 | * the slow path that will call wait_split_huge_page() | ||
115 | * if the pmd is still in splitting state. | ||
116 | */ | ||
117 | if (pmd_none(pmd) || pmd_trans_splitting(pmd)) | ||
118 | return 0; | 109 | return 0; |
119 | if (unlikely(pmd_large(pmd))) { | 110 | if (unlikely(pmd_large(pmd))) { |
120 | /* | 111 | /* |
diff --git a/arch/s390/mm/pgtable.c b/arch/s390/mm/pgtable.c index aa34af0a0b26..4e54492f463a 100644 --- a/arch/s390/mm/pgtable.c +++ b/arch/s390/mm/pgtable.c | |||
@@ -1305,22 +1305,6 @@ int pmdp_set_access_flags(struct vm_area_struct *vma, | |||
1305 | return 1; | 1305 | return 1; |
1306 | } | 1306 | } |
1307 | 1307 | ||
1308 | static void pmdp_splitting_flush_sync(void *arg) | ||
1309 | { | ||
1310 | /* Simply deliver the interrupt */ | ||
1311 | } | ||
1312 | |||
1313 | void pmdp_splitting_flush(struct vm_area_struct *vma, unsigned long address, | ||
1314 | pmd_t *pmdp) | ||
1315 | { | ||
1316 | VM_BUG_ON(address & ~HPAGE_PMD_MASK); | ||
1317 | if (!test_and_set_bit(_SEGMENT_ENTRY_SPLIT_BIT, | ||
1318 | (unsigned long *) pmdp)) { | ||
1319 | /* need to serialize against gup-fast (IRQ disabled) */ | ||
1320 | smp_call_function(pmdp_splitting_flush_sync, NULL, 1); | ||
1321 | } | ||
1322 | } | ||
1323 | |||
1324 | void pgtable_trans_huge_deposit(struct mm_struct *mm, pmd_t *pmdp, | 1308 | void pgtable_trans_huge_deposit(struct mm_struct *mm, pmd_t *pmdp, |
1325 | pgtable_t pgtable) | 1309 | pgtable_t pgtable) |
1326 | { | 1310 | { |