Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp1081754imu; Wed, 16 Jan 2019 12:24:22 -0800 (PST) X-Google-Smtp-Source: ALg8bN55YBt1F/ZJ/R6f0R2qrxmBUGa7SevqJiLTiKajJZuWbZd064qyIwFBg0M+tTv7w3goS+hs X-Received: by 2002:a63:658:: with SMTP id 85mr10499766pgg.373.1547670261931; Wed, 16 Jan 2019 12:24:21 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1547670261; cv=none; d=google.com; s=arc-20160816; b=SMfN0ajYDji0EaPD3n0nbtjQdocRR9+aJ/P90nhmqo6amdDIn/uAdT9sqiKH/ZYb6g H/ugzGsRqihX0OsBZyrBfmXhEGP3rBjEufeo4yBkKLNwgEho1MUseN1O/8+L61xxmSUW 5kxRZl2za4AANFYec7NCJiDh+TWIgxKlWIBvwapskzCUtWW6FLOCy2lewfGFjPK2wYsW CZlyYLgfqNmxtp121JLptbVEuUvzP04UElYM20CpjP9qGcey2XuFyDDRxFBtTv6M63lZ L5rmVMTqzaP7wKQMHRQkf69UGBzgN3/y/9MdK6H86WePkR1dR77QuyZ/M7YUxtt2ndew dN7Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject; bh=fy1WlFone22HeOso8L86DntE44cebKGo96/o6GU56Lw=; b=WNA1/mZFh4RfzrPFPyVsI31kYtg1k7XI/WxzvMrAL+XkuwFxKr5WLC84UnqxYgc6Vg feu8xmCUjoovafg8CsG2QRfcOqjh1msNKJeG+VaCANFh0TQq+/Y5QEI7E9vN2Y3TNeJn cFoMRZLbbZEcCOfueWR61gDmqFTKbjn0vfV234dGPaA8LuDGWK9VGfDuRNFkz+0PukCy w+EBZIp51N8AO8k4DZBqa1ugjx9MutZJDhno6OSh++cAU48CJAuYkbKfOpvW27YQix8j FVorEklh6l7Lprl619rEVJeAT5AFk5pJcgTkcryry5wYU+CMjpajtPQaXOQivN8Z4t/f SIGw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id cd16si7473312plb.47.2019.01.16.12.24.05; Wed, 16 Jan 2019 12:24:21 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2392812AbfAPMjs (ORCPT + 99 others); Wed, 16 Jan 2019 07:39:48 -0500 Received: from usa-sjc-mx-foss1.foss.arm.com ([217.140.101.70]:47284 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2390065AbfAPMjr (ORCPT ); Wed, 16 Jan 2019 07:39:47 -0500 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.72.51.249]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 9E68D80D; Wed, 16 Jan 2019 04:39:46 -0800 (PST) Received: from [10.162.42.129] (p8cg001049571a15.blr.arm.com [10.162.42.129]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id B360B3F5AF; Wed, 16 Jan 2019 04:39:35 -0800 (PST) Subject: Re: [PATCH V2] mm: Introduce GFP_PGTABLE 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 References: <1547619692-7946-1-git-send-email-anshuman.khandual@arm.com> From: Anshuman Khandual Message-ID: Date: Wed, 16 Jan 2019 18:09:34 +0530 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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.