Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp1694442imu; Sat, 12 Jan 2019 05:51:49 -0800 (PST) X-Google-Smtp-Source: ALg8bN60clCyPhL8de0Hb+pTzEp9rdLnZV8yAR5xey4Es5OMsvzx7scQlW6BBVySBGuQaWIhKCCV X-Received: by 2002:a62:b2c3:: with SMTP id z64mr18392627pfl.120.1547301109861; Sat, 12 Jan 2019 05:51:49 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1547301109; cv=none; d=google.com; s=arc-20160816; b=vsfGqKW8QhAULCipBTsICgnKc3E/uQ90+ESUa598tjwHB1+Yqt3/nn6pjaeI8EQB/c rLrS0UmCiZYlYS0YnDU4IG5AHWScWrpYpOQshSFQCcMBY+6sXuZ6b4CkEwOJCejteTEe gD9j/LCS0YtgP6EHvCGeREfNOqWD0jgnfmAFWJkiPTRNfGJsXF8YGea5gIh1b3LYW3sk pI9SQ7UZfYNqFK87BCGh/jheSN0JbatogStmAqNrMbhGL6EjVMjWbxoQ7rPflPZFuFA6 po1RN/aTnOr9BQn1HXC7pb0eazKqAYBsS7Gtxu4hICvFv20YwgQ98gwN2PemS3Kz6SEL fNAA== 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=dx8NXXr6VCcsN90O9PpPvJV1iXesNmGDIrP6MNHv2cA=; b=EFqIJlFqcUCe7c/ipDHK2kajFRM+cBzSnVKxPRhpu30gpYpk7AVpaJxlRyJvwpTKYV jTbq2rF0U95B359cMfrvlP/Q6YN6ICedfC7ODfSRcnCSeCn1PHrZbG6fDeewnZlVUoXJ XLn/C7WhAXBUi495KCgx4IbytbFYGJ6d8hNC+kvMoI3GE/G3pSUemLGd34Okxv4rkeB9 hy4+YTMssK6uklNz3l6Vh0RRxsPyT+ywBMsIdEmhp6Pzsf3XR6RhxPdgUIh5Qofshw6I 1Mjsutvv6keMaQ5hFg5Hk4LP7/TLFqFxKnLPe0qgGWj8bFA3e7HmsAs7k9pRF96NUFPn OMSQ== 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 r25si14911345pfk.28.2019.01.12.05.51.20; Sat, 12 Jan 2019 05:51:49 -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 S1725852AbfALNtc (ORCPT + 99 others); Sat, 12 Jan 2019 08:49:32 -0500 Received: from pegase1.c-s.fr ([93.17.236.30]:51553 "EHLO pegase1.c-s.fr" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725827AbfALNtc (ORCPT ); Sat, 12 Jan 2019 08:49:32 -0500 Received: from localhost (mailhub1-int [192.168.12.234]) by localhost (Postfix) with ESMTP id 43cLgq65Zjz9vBmP; Sat, 12 Jan 2019 14:49:27 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at c-s.fr Received: from pegase1.c-s.fr ([192.168.12.234]) by localhost (pegase1.c-s.fr [192.168.12.234]) (amavisd-new, port 10024) with ESMTP id 8olI-kILdexS; Sat, 12 Jan 2019 14:49:27 +0100 (CET) Received: from messagerie.si.c-s.fr (messagerie.si.c-s.fr [192.168.25.192]) by pegase1.c-s.fr (Postfix) with ESMTP id 43cLgq5BBkz9vBmN; Sat, 12 Jan 2019 14:49:27 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by messagerie.si.c-s.fr (Postfix) with ESMTP id CC2268B77F; Sat, 12 Jan 2019 14:49:30 +0100 (CET) X-Virus-Scanned: amavisd-new at c-s.fr Received: from messagerie.si.c-s.fr ([127.0.0.1]) by localhost (messagerie.si.c-s.fr [127.0.0.1]) (amavisd-new, port 10023) with ESMTP id zFSHdAazdoZD; Sat, 12 Jan 2019 14:49:30 +0100 (CET) Received: from PO15451 (unknown [192.168.4.90]) by messagerie.si.c-s.fr (Postfix) with ESMTP id 7A89F8B74C; Sat, 12 Jan 2019 14:49:29 +0100 (CET) Subject: Re: [PATCH] mm: Introduce GFP_PGTABLE To: Matthew Wilcox , Anshuman Khandual 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> From: Christophe Leroy Message-ID: Date: Sat, 12 Jan 2019 14:49:29 +0100 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:60.0) Gecko/20100101 Thunderbird/60.4.0 MIME-Version: 1.0 In-Reply-To: <20190112121230.GQ6310@bombadil.infradead.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: fr Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Le 12/01/2019 à 13:12, Matthew Wilcox a écrit : > On Sat, Jan 12, 2019 at 03:56:38PM +0530, Anshuman Khandual wrote: >> All architectures have been defining their own PGALLOC_GFP as (GFP_KERNEL | >> __GFP_ZERO) and using it for allocating page table pages. > > Except that's not true. > >> +++ b/arch/x86/mm/pgtable.c >> @@ -13,19 +13,17 @@ phys_addr_t physical_mask __ro_after_init = (1ULL << __PHYSICAL_MASK_SHIFT) - 1; >> EXPORT_SYMBOL(physical_mask); >> #endif >> >> -#define PGALLOC_GFP (GFP_KERNEL_ACCOUNT | __GFP_ZERO) >> - >> #ifdef CONFIG_HIGHPTE > > ... > >> pte_t *pte_alloc_one_kernel(struct mm_struct *mm) >> { >> - return (pte_t *)__get_free_page(PGALLOC_GFP & ~__GFP_ACCOUNT); >> + return (pte_t *)__get_free_page(GFP_PGTABLE & ~__GFP_ACCOUNT); >> } 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 Christophe > > I think x86 was the only odd one out here, but you'll need to try again ... >