From mboxrd@z Thu Jan 1 00:00:00 1970 From: Anshuman Khandual Date: Wed, 16 Jan 2019 12:51:34 +0000 Subject: Re: [PATCH V2] mm: Introduce GFP_PGTABLE Message-Id: List-Id: References: <1547619692-7946-1-git-send-email-anshuman.khandual@arm.com> In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit To: Christophe Leroy , linux-mm@kvack.org, akpm@linux-foundation.org, linux-kernel@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, linux-arm-kernel@lists.infradead.org, linux-sh@vger.kernel.org, kvmarm@lists.cs.columbia.edu, linux-riscv@lists.infradead.org Cc: mark.rutland@arm.com, mhocko@suse.com, peterz@infradead.org, catalin.marinas@arm.com, dave.hansen@linux.intel.com, will.deacon@arm.com, aneesh.kumar@linux.ibm.com, linux@armlinux.org.uk, mingo@redhat.com, rientjes@google.com, palmer@sifive.com, greentime@andestech.com, marc.zyngier@arm.com, rppt@linux.vnet.ibm.com, shakeelb@google.com, kirill@shutemov.name, tglx@linutronix.de, vbabka@suse.cz, ard.biesheuvel@linaro.org, steve.capper@arm.com, christoffer.dall@arm.com, james.morse@arm.com, robin.murphy@arm.com On 01/16/2019 12:40 PM, Christophe Leroy wrote: > > > Le 16/01/2019 à 07:21, Anshuman Khandual a écrit : >> All architectures have been defining their own PGALLOC_GFP as (GFP_KERNEL | >> __GFP_ZERO) and using it for allocating page table pages. This causes some >> code duplication which can be easily avoided. GFP_KERNEL allocated and >> cleared out pages (__GFP_ZERO) are required for page tables on any given >> architecture. This creates a new generic GFP flag flag which can be used >> for any page table page allocation. Does not cause any functional change. >> >> GFP_PGTABLE is being added into include/asm-generic/pgtable.h which is the >> generic page tabe header just to prevent it's potential misuse as a general >> allocation flag if included in include/linux/gfp.h. >> >> Signed-off-by: Anshuman Khandual >> --- >> Build tested on arm, arm64, powerpc, powerpc64le and x86. >> Boot tested on arm64 and x86. >> >> Changes in V2: >> >> - Moved GFP_PGTABLE into include/asm-generic/pgtable.h >> - On X86 added __GFP_ACCOUNT into GFP_PGTABLE at various places >> - Replaced possible flags on riscv and nds32 with GFP_PGTABLE > > Could also replace the flags in arch/powerpc/include/asm/nohash/64/pgalloc.h with GFP_PGTABLE in pte_alloc_one_kernel() and pte_alloc_one() Sure will do.