aboutsummaryrefslogtreecommitdiffstats
path: root/mm/memory.c
diff options
context:
space:
mode:
authorKirill A. Shutemov <kirill.shutemov@linux.intel.com>2012-12-12 16:50:59 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2012-12-12 20:38:31 -0500
commite180377f1ae48b3cbc559c9875d9b038f7f000c6 (patch)
treec51e0db181acc0372479bce5cd68b99abca7d8bb /mm/memory.c
parentcad7f613c4d010e1d0f05c9a4fb33c7ae40ba115 (diff)
thp: change split_huge_page_pmd() interface
Pass vma instead of mm and add address parameter. In most cases we already have vma on the stack. We provides split_huge_page_pmd_mm() for few cases when we have mm, but not vma. This change is preparation to huge zero pmd splitting implementation. Signed-off-by: Kirill A. Shutemov <kirill.shutemov@linux.intel.com> Cc: Andrea Arcangeli <aarcange@redhat.com> Cc: Andi Kleen <ak@linux.intel.com> Cc: "H. Peter Anvin" <hpa@linux.intel.com> Cc: Mel Gorman <mel@csn.ul.ie> 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 'mm/memory.c')
-rw-r--r--mm/memory.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/mm/memory.c b/mm/memory.c
index 259b34fe1347..f9a4b0cb8623 100644
--- a/mm/memory.c
+++ b/mm/memory.c
@@ -1243,7 +1243,7 @@ static inline unsigned long zap_pmd_range(struct mmu_gather *tlb,
1243 BUG(); 1243 BUG();
1244 } 1244 }
1245#endif 1245#endif
1246 split_huge_page_pmd(vma->vm_mm, pmd); 1246 split_huge_page_pmd(vma, addr, pmd);
1247 } else if (zap_huge_pmd(tlb, vma, pmd, addr)) 1247 } else if (zap_huge_pmd(tlb, vma, pmd, addr))
1248 goto next; 1248 goto next;
1249 /* fall through */ 1249 /* fall through */
@@ -1512,7 +1512,7 @@ struct page *follow_page(struct vm_area_struct *vma, unsigned long address,
1512 } 1512 }
1513 if (pmd_trans_huge(*pmd)) { 1513 if (pmd_trans_huge(*pmd)) {
1514 if (flags & FOLL_SPLIT) { 1514 if (flags & FOLL_SPLIT) {
1515 split_huge_page_pmd(mm, pmd); 1515 split_huge_page_pmd(vma, address, pmd);
1516 goto split_fallthrough; 1516 goto split_fallthrough;
1517 } 1517 }
1518 spin_lock(&mm->page_table_lock); 1518 spin_lock(&mm->page_table_lock);