linux-api.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Kirill A. Shutemov" <kirill@shutemov.name>
To: Dave Hansen <dave.hansen@intel.com>
Cc: "Kirill A. Shutemov" <kirill.shutemov@linux.intel.com>,
	Andrew Morton <akpm@linux-foundation.org>,
	linux-mm@kvack.org, linux-kernel@vger.kernel.org,
	linux-api@vger.kernel.org, Michal Hocko <mhocko@kernel.org>
Subject: Re: [PATCHv2 1/2] mm: Introduce wrappers to access mm->nr_ptes
Date: Sun, 8 Oct 2017 15:54:49 +0300	[thread overview]
Message-ID: <20171008125449.kgzjilgxzbropewj@node.shutemov.name> (raw)
In-Reply-To: <7e476fd2-5818-c395-cdf2-00b5229c1a73@intel.com>

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_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.

We don't have this kind of consolidation for any other page table related
helpers. Don't see a reason to start here.

This kind of changes can be part of overal page table privitives redesign
once/if we get there.

But feel free to send patches. :)

-- 
 Kirill A. Shutemov

      reply	other threads:[~2017-10-08 12:54 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-10-05 10:14 [PATCHv2 1/2] mm: Introduce wrappers to access mm->nr_ptes Kirill A. Shutemov
2017-10-05 10:14 ` [PATCHv2 2/2] mm: Consolidate page table accounting Kirill A. Shutemov
2017-10-06  8:50   ` Michal Hocko
     [not found] ` <20171005101442.49555-1-kirill.shutemov-VuQAYsv1563Yd54FQh9/CA@public.gmane.org>
2017-10-06  4:02   ` [PATCHv2 1/2] mm: Introduce wrappers to access mm->nr_ptes Anshuman Khandual
     [not found]     ` <856babfe-fd38-0bd2-d8d2-64dfe6672da8-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8@public.gmane.org>
2017-10-06  9:55       ` Kirill A. Shutemov
2017-10-06  8:50   ` Michal Hocko
2017-10-06  9:56     ` Kirill A. Shutemov
2017-10-06 23:10   ` Dave Hansen
2017-10-08 12:54     ` Kirill A. Shutemov [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20171008125449.kgzjilgxzbropewj@node.shutemov.name \
    --to=kirill@shutemov.name \
    --cc=akpm@linux-foundation.org \
    --cc=dave.hansen@intel.com \
    --cc=kirill.shutemov@linux.intel.com \
    --cc=linux-api@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=mhocko@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).