Re: [PATCHv2 1/2] mm: Introduce wrappers to access mm->nr_ptes

2017-10-08 Thread Kirill A. Shutemov
On Fri, Oct 06, 2017 at 04:10:31PM -0700, Dave Hansen wrote: > 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_t

Re: [PATCHv2 1/2] mm: Introduce wrappers to access mm->nr_ptes

2017-10-06 Thread Dave Hansen
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); > +

Re: [PATCHv2 1/2] mm: Introduce wrappers to access mm->nr_ptes

2017-10-06 Thread Kirill A. Shutemov
On Fri, Oct 06, 2017 at 10:50:38AM +0200, Michal Hocko wrote: > On Thu 05-10-17 13:14:41, Kirill A. Shutemov wrote: > > Let's add wrappers for ->nr_ptes with the same interface as for nr_pmd > > and nr_pud. > > > > It's preparation for consolidation of page-table counters in mm_struct. > > You ar

Re: [PATCHv2 1/2] mm: Introduce wrappers to access mm->nr_ptes

2017-10-06 Thread Kirill A. Shutemov
On Fri, Oct 06, 2017 at 09:32:03AM +0530, Anshuman Khandual wrote: > On 10/05/2017 03:44 PM, Kirill A. Shutemov wrote: > > Let's add wrappers for ->nr_ptes with the same interface as for nr_pmd > > and nr_pud. > > > > It's preparation for consolidation of page-table counters in mm_struct. > > > >

Re: [PATCHv2 1/2] mm: Introduce wrappers to access mm->nr_ptes

2017-10-06 Thread Michal Hocko
On Thu 05-10-17 13:14:41, Kirill A. Shutemov wrote: > Let's add wrappers for ->nr_ptes with the same interface as for nr_pmd > and nr_pud. > > It's preparation for consolidation of page-table counters in mm_struct. You are also making the accounting dependent on MMU which is OK because no nommu a

Re: [PATCHv2 1/2] mm: Introduce wrappers to access mm->nr_ptes

2017-10-05 Thread Anshuman Khandual
On 10/05/2017 03:44 PM, Kirill A. Shutemov wrote: > Let's add wrappers for ->nr_ptes with the same interface as for nr_pmd > and nr_pud. > > It's preparation for consolidation of page-table counters in mm_struct. > > Signed-off-by: Kirill A. Shutemov Hey Kirill, This patch does not apply clean

[PATCHv2 1/2] mm: Introduce wrappers to access mm->nr_ptes

2017-10-05 Thread Kirill A. Shutemov
Let's add wrappers for ->nr_ptes with the same interface as for nr_pmd and nr_pud. It's preparation for consolidation of page-table counters in mm_struct. Signed-off-by: Kirill A. Shutemov --- arch/arm/mm/pgd.c | 2 +- arch/sparc/mm/hugetlbpage.c | 2 +- arch/unicore32/mm/pgd.c