diff options
Diffstat (limited to 'mm/memory.c')
-rw-r--r-- | mm/memory.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/mm/memory.c b/mm/memory.c index 247b5c312b9b..c1e14c9e67e4 100644 --- a/mm/memory.c +++ b/mm/memory.c | |||
@@ -126,7 +126,7 @@ static void free_pte_range(struct mmu_gather *tlb, pmd_t *pmd) | |||
126 | pmd_clear(pmd); | 126 | pmd_clear(pmd); |
127 | pte_lock_deinit(page); | 127 | pte_lock_deinit(page); |
128 | pte_free_tlb(tlb, page); | 128 | pte_free_tlb(tlb, page); |
129 | dec_page_state(nr_page_table_pages); | 129 | dec_zone_page_state(page, NR_PAGETABLE); |
130 | tlb->mm->nr_ptes--; | 130 | tlb->mm->nr_ptes--; |
131 | } | 131 | } |
132 | 132 | ||
@@ -311,7 +311,7 @@ int __pte_alloc(struct mm_struct *mm, pmd_t *pmd, unsigned long address) | |||
311 | pte_free(new); | 311 | pte_free(new); |
312 | } else { | 312 | } else { |
313 | mm->nr_ptes++; | 313 | mm->nr_ptes++; |
314 | inc_page_state(nr_page_table_pages); | 314 | inc_zone_page_state(new, NR_PAGETABLE); |
315 | pmd_populate(mm, pmd, new); | 315 | pmd_populate(mm, pmd, new); |
316 | } | 316 | } |
317 | spin_unlock(&mm->page_table_lock); | 317 | spin_unlock(&mm->page_table_lock); |
@@ -503,7 +503,7 @@ again: | |||
503 | return -ENOMEM; | 503 | return -ENOMEM; |
504 | src_pte = pte_offset_map_nested(src_pmd, addr); | 504 | src_pte = pte_offset_map_nested(src_pmd, addr); |
505 | src_ptl = pte_lockptr(src_mm, src_pmd); | 505 | src_ptl = pte_lockptr(src_mm, src_pmd); |
506 | spin_lock(src_ptl); | 506 | spin_lock_nested(src_ptl, SINGLE_DEPTH_NESTING); |
507 | 507 | ||
508 | do { | 508 | do { |
509 | /* | 509 | /* |
@@ -1951,7 +1951,7 @@ static int do_swap_page(struct mm_struct *mm, struct vm_area_struct *vma, | |||
1951 | 1951 | ||
1952 | /* Had to read the page from swap area: Major fault */ | 1952 | /* Had to read the page from swap area: Major fault */ |
1953 | ret = VM_FAULT_MAJOR; | 1953 | ret = VM_FAULT_MAJOR; |
1954 | inc_page_state(pgmajfault); | 1954 | count_vm_event(PGMAJFAULT); |
1955 | grab_swap_token(); | 1955 | grab_swap_token(); |
1956 | } | 1956 | } |
1957 | 1957 | ||
@@ -2324,7 +2324,7 @@ int __handle_mm_fault(struct mm_struct *mm, struct vm_area_struct *vma, | |||
2324 | 2324 | ||
2325 | __set_current_state(TASK_RUNNING); | 2325 | __set_current_state(TASK_RUNNING); |
2326 | 2326 | ||
2327 | inc_page_state(pgfault); | 2327 | count_vm_event(PGFAULT); |
2328 | 2328 | ||
2329 | if (unlikely(is_vm_hugetlb_page(vma))) | 2329 | if (unlikely(is_vm_hugetlb_page(vma))) |
2330 | return hugetlb_fault(mm, vma, address, write_access); | 2330 | return hugetlb_fault(mm, vma, address, write_access); |