Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp3165677imu; Sun, 13 Jan 2019 20:29:42 -0800 (PST) X-Google-Smtp-Source: ALg8bN5iJmkBwRaPL9W/Eg05A+64ZZwdTM1bhjWHf8zz/7p4izkwUmUUuzWWuqQZCEXut8cAuEYN X-Received: by 2002:a17:902:e10a:: with SMTP id cc10mr24266285plb.165.1547440182224; Sun, 13 Jan 2019 20:29:42 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1547440182; cv=none; d=google.com; s=arc-20160816; b=pUh2ItRaiEitYjibriw6NJk8LqtqWr4/Y6azuwIyO9w/0Lx8r81Ae2YyycPPamnquI t/UnxAEcutAXqEtk/kvqdKBfQdtaxTPqP+MsnSfPFVmo5mkgzfBk5BRU0QdZmnWot7k5 gZ/4kM1xQAfzCP0kSvArhyRCW96UR9s2u+VJkzoPWwGtW1EBbedwFOypYZ4Ejkqf6jQY 92UOUtISX0wPXw/74qu2n8p892h5LYLbFTNZJXrGH6iqDCjbAz9VRn1jTef2ump6vtsN PNXvcpg2ZmBMMdmrFY1IOZDKGjgREhSlWTNBRdKfVCIJuQ2rIP7dz7nVoMA68zzeAhf6 9XtQ== 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=6Sqtuunznof5FETLksBK1w6rJgloY/3oQofHWCcsg6w=; b=epd9NFsPUDXQN5db+zMBdituZqs5ycr/PNeyX1G4tC/D+l1alXhep51ZZq+l/VMMVU B+xdE8eCT62VSLuITeU76uaNK7Tzh/nFo1iWDR0tq4X92a0qhbbMp8VOfbPwsuH9WTYh RnSLW7N4ak0ZtY+DgsjkKyUenOHxNjI3Zkv8fJs9FF6wQvfK0wYY0mK3tV/QpyZy5xPi FKXfoou63z50HladuJnTLDGKnmvZollKaOzrF1XMgf7TqGbTCyY9pyEPo0IJd4SxW5c7 66tBwA3LE/8QX/jwAcO92k7ei9aGPEmPuoio77IQzNpafjOJ/ijVCFF6dKy9O6o6Zkf1 vSYQ== 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 d16si8915632pfn.169.2019.01.13.20.29.26; Sun, 13 Jan 2019 20:29:42 -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 S1726477AbfANE2X (ORCPT + 99 others); Sun, 13 Jan 2019 23:28:23 -0500 Received: from foss.arm.com ([217.140.101.70]:54520 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725837AbfANE2W (ORCPT ); Sun, 13 Jan 2019 23:28:22 -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 628C180D; Sun, 13 Jan 2019 20:28:22 -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 D48C03F5BD; Sun, 13 Jan 2019 20:28:13 -0800 (PST) Subject: Re: [PATCH] mm: Introduce GFP_PGTABLE To: Matthew Wilcox , Christophe Leroy Cc: mark.rutland@arm.com, mhocko@suse.com, linux-sh@vger.kernel.org, peterz@infradead.org, catalin.marinas@arm.com, dave.hansen@linux.intel.com, will.deacon@arm.com, linux-kernel@vger.kernel.org, linux-mm@kvack.org, kvmarm@lists.cs.columbia.edu, linux@armlinux.org.uk, mingo@redhat.com, vbabka@suse.cz, rientjes@google.com, marc.zyngier@arm.com, rppt@linux.vnet.ibm.com, shakeelb@google.com, kirill@shutemov.name, tglx@linutronix.de, linux-arm-kernel@lists.infradead.org, ard.biesheuvel@linaro.org, robin.murphy@arm.com, steve.capper@arm.com, christoffer.dall@arm.com, james.morse@arm.com, aneesh.kumar@linux.ibm.com, akpm@linux-foundation.org, linuxppc-dev@lists.ozlabs.org References: <1547288798-10243-1-git-send-email-anshuman.khandual@arm.com> <20190112121230.GQ6310@bombadil.infradead.org> <20190112154944.GT6310@bombadil.infradead.org> From: Anshuman Khandual Message-ID: <48f81a76-2b2d-5060-d9bc-c42d5b5975c3@arm.com> Date: Mon, 14 Jan 2019 09:58:14 +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: <20190112154944.GT6310@bombadil.infradead.org> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 01/12/2019 09:19 PM, Matthew Wilcox wrote: > On Sat, Jan 12, 2019 at 02:49:29PM +0100, Christophe Leroy wrote: >> As far as I can see, >> >> #define GFP_KERNEL_ACCOUNT (GFP_KERNEL | __GFP_ACCOUNT) >> >> So what's the difference between: >> >> (GFP_KERNEL_ACCOUNT | __GFP_ZERO) & ~__GFP_ACCOUNT >> >> and >> >> (GFP_KERNEL | __GFP_ZERO) & ~__GFP_ACCOUNT > > Nothing. But there's a huge difference in the other parts of that same > file where GFP_ACCOUNT is _not_ used. > > I think this unification is too small to bother with. Something I've > had on my todo list for some time and have not done anything about > is to actually unify all of the architecture pte/pmd/... allocations. > There are tricks some architectures use that others would benefit from. Sure. Could you please elaborate on this ? Invariably all kernel pgtable page allocations should use GFP_PGTABLE and all user page table allocation should use (GFP_PGTABLE | __GFP_ACCOUNT). Ideally there should be default generic functions user_pgtable_gfp() or kernel_pgtable_gfp() returning these values. Overrides can be provided if an arch still wants some more control.