lkml.org 
[lkml]   [2017]   [Oct]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCHv2 1/2] mm: Introduce wrappers to access mm->nr_ptes
From
Date
On 10/05/2017 03:14 AM, Kirill A. Shutemov wrote:
> +++ b/arch/sparc/mm/hugetlbpage.c
> @@ -396,7 +396,7 @@ static void hugetlb_free_pte_range(struct mmu_gather *tlb, pmd_t *pmd,
>
> pmd_clear(pmd);
> pte_free_tlb(tlb, token, addr);
> - atomic_long_dec(&tlb->mm->nr_ptes);
> + mm_dec_nr_ptes(tlb->mm);
> }

If we're going to go replace all of these, I wonder if we should start
doing it more generically.

mm_dec_nr_pgtable(PGTABLE_PTE, tlb->mm)

or even:

mm_dec_nr_pgtable(PGTABLE_LEVEL1, tlb->mm)

Instead of having a separate batch of functions for each level.

\
 
 \ /
  Last update: 2017-10-07 01:10    [W:0.055 / U:6.700 seconds]
©2003-2017 Jasper Spaans. hosted at Digital OceanAdvertise on this site