[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20190116142014.GJ6310@bombadil.infradead.org>
Date: Wed, 16 Jan 2019 06:20:14 -0800
From: Matthew Wilcox <willy@...radead.org>
To: Christophe Leroy <christophe.leroy@....fr>
Cc: Anshuman Khandual <anshuman.khandual@....com>,
mark.rutland@....com, linux-sh@...r.kernel.org,
peterz@...radead.org, catalin.marinas@....com,
dave.hansen@...ux.intel.com, will.deacon@....com,
linux-kernel@...r.kernel.org, linux-mm@...ck.org,
linux-riscv@...ts.infradead.org, kvmarm@...ts.cs.columbia.edu,
linux@...linux.org.uk, mingo@...hat.com, vbabka@...e.cz,
rientjes@...gle.com, palmer@...ive.com, greentime@...estech.com,
marc.zyngier@....com, rppt@...ux.vnet.ibm.com, shakeelb@...gle.com,
kirill@...temov.name, tglx@...utronix.de,
Michal Hocko <mhocko@...nel.org>,
linux-arm-kernel@...ts.infradead.org, ard.biesheuvel@...aro.org,
robin.murphy@....com, steve.capper@....com,
christoffer.dall@....com, james.morse@....com,
aneesh.kumar@...ux.ibm.com, akpm@...ux-foundation.org,
linuxppc-dev@...ts.ozlabs.org
Subject: Re: [PATCH V2] mm: Introduce GFP_PGTABLE
On Wed, Jan 16, 2019 at 02:47:16PM +0100, Christophe Leroy wrote:
> Le 16/01/2019 à 14:18, Matthew Wilcox a écrit :
> > I disagree with your objective. Making more code common is a great idea,
> > but this patch is too unambitious. We should be heading towards one or
> > two page table allocation functions instead of having every architecture do
> > its own thing.
> >
> > So start there. Move the x86 function into common code and convert one
> > other architecture to use it too.
>
> Are we talking about pte_alloc_one_kernel() and pte_alloc_one() ?
>
> I'm not sure x86 function is the best common one, as it seems to allocate a
> multiple of PAGE_SIZE only.
And that's the common case. Most architectures use a single page for at
least one level of the pte/pmd/pud/p4d/pgd hierarchy. Some use multiple
pages and some use a fraction of a page.
> Some arches like powerpc use pagetables which are smaller than a page, for
> instance powerpc 8xx uses 4k pagetables even with 16k pages, which means a
> single page can be used by 4 pagetables.
Those can be added later. Note I said "one or two", and that's what I
had in mind; I think we want one function that allocates just a page
and another that allocates a page fragment. Then we can have a good
discussion about what method we use; s390 and ppc use different techniques
today and there's really no good reason for that.
Powered by blists - more mailing lists