Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp1079557imu; Wed, 16 Jan 2019 12:22:16 -0800 (PST) X-Google-Smtp-Source: ALg8bN6BhoQtA/1p2wsH35d+Tc+2Chw8ffbkJpwZPUlrEm/sEf0Gw+tIvTiRDXfp1SSjuQuVva4L X-Received: by 2002:a17:902:280b:: with SMTP id e11mr11694000plb.269.1547670135984; Wed, 16 Jan 2019 12:22:15 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1547670135; cv=none; d=google.com; s=arc-20160816; b=et0ypn7hn1KsBPACn6gWVFDFqRgyDvUmWn7vATYqpjK/zBFlf/XYbxFQ5Ysyb7fPfs PS+lr07/VkpNgsgef2K0LITaYFv3E4mXsWXcYxJYUIDun1OtFqkEOucqWagcm9kPhywe 79f8UTWNZa9UBz35n8DyuWg03rtd8uOEFpCWhKDdoY0O095LDB+pjwCUGOtzEuQ3jYks uAwpRNcsUDyU0ZFIzrxWmkOFRwMF4AbxiupIVC2EMddT7P+3u4tb+RYQ1icte2fYwmSM I72LsrFlDeGLNpip3xH7fQCXstrbOXi5zdjs1+oW+Y3E0KM5VDi7yGRZSgh25pXZ7lyY GfIw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=kdLgW2R9CJvQxIJIOAnAx5HXf5S0hb4dQove9xHN/r8=; b=kEP6VcaxDpMckBx0pbXaLlRL9mv65nDe8NI4mj81QmCH+SXqNC74bXS+af+rVPXqZD 0XywfNiXltF3aKKx1YjoNXGp/8u1TNPlrUxe1KE5ltRWyVBbV7t0kaUM0WIh8hO2Jo/V EjqiLoTEiJLQiMK7S4uZCPuCqy3BM75OtkRz3OLRvMfzoPFxXKEPNlV60WCDVTQyebf0 0QZI4iRKKChGFPCbOfdkSRrNPfEUrSTzrD7l7PUfxipyNhhbcwLGpr24WNq4SDaTwE6N fk7QxmUNqWsSkCHJ16tEEcVMM0+r7e9dlXn385ME9NIwDUxC8Z+7XOuSz3+qjXXWdOrM TezA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=SoTUyiVr; 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 3si1443671plq.138.2019.01.16.12.22.00; Wed, 16 Jan 2019 12:22:15 -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; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=SoTUyiVr; 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 S2390232AbfAPMep (ORCPT + 99 others); Wed, 16 Jan 2019 07:34:45 -0500 Received: from bombadil.infradead.org ([198.137.202.133]:38602 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732893AbfAPMep (ORCPT ); Wed, 16 Jan 2019 07:34:45 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20170209; h=In-Reply-To:Content-Type:MIME-Version :References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=kdLgW2R9CJvQxIJIOAnAx5HXf5S0hb4dQove9xHN/r8=; b=SoTUyiVrNcTQA6U6c7sP5Vun8 NwFfkQcvDm19s+uGH+1Ungv2ayWinjciCJAvNaRtxRFWO8KHbdqpzPW4v9EFGE52DycDoCkO8eS+d MLNzT9KvItxbpLhzKdmmbxL1TKynQtohxPnAgsTzzYuX9P9BXAEwgUifnBneZyqVv7KU4alrjzF3x It6QmbByG6Mb3nSuTwgtx9eVK9uuj5lJg3/YqL1Uh6lRQXpnRvn4N/n/Mi8P78Y3yjj0i2lPdJ42+ GOUbI8kGZNteaLq22CnzmKIN0cU0iYZDhiDPqM9nMxi8YYXqXlIkjokAEmBII6BBXOcNMMBfA7sjW fAeP4B3IQ==; Received: from j217100.upc-j.chello.nl ([24.132.217.100] helo=hirez.programming.kicks-ass.net) by bombadil.infradead.org with esmtpsa (Exim 4.90_1 #2 (Red Hat Linux)) id 1gjkOr-0004dF-9T; Wed, 16 Jan 2019 12:34:29 +0000 Received: by hirez.programming.kicks-ass.net (Postfix, from userid 1000) id A441B2029D919; Wed, 16 Jan 2019 13:34:27 +0100 (CET) Date: Wed, 16 Jan 2019 13:34:27 +0100 From: Peter Zijlstra To: Matthew Wilcox Cc: Michal Hocko , Anshuman Khandual , 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, linux@armlinux.org.uk, catalin.marinas@arm.com, will.deacon@arm.com, mpe@ellerman.id.au, tglx@linutronix.de, mingo@redhat.com, dave.hansen@linux.intel.com, christoffer.dall@arm.com, marc.zyngier@arm.com, kirill@shutemov.name, rppt@linux.vnet.ibm.com, ard.biesheuvel@linaro.org, mark.rutland@arm.com, steve.capper@arm.com, james.morse@arm.com, robin.murphy@arm.com, aneesh.kumar@linux.ibm.com, vbabka@suse.cz, shakeelb@google.com, rientjes@google.com, palmer@sifive.com, greentime@andestech.com Subject: Re: [PATCH V2] mm: Introduce GFP_PGTABLE Message-ID: <20190116123427.GE10803@hirez.programming.kicks-ass.net> References: <1547619692-7946-1-git-send-email-anshuman.khandual@arm.com> <20190116065703.GE24149@dhcp22.suse.cz> <20190116123018.GF6310@bombadil.infradead.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190116123018.GF6310@bombadil.infradead.org> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Jan 16, 2019 at 04:30:18AM -0800, Matthew Wilcox wrote: > On Wed, Jan 16, 2019 at 07:57:03AM +0100, Michal Hocko wrote: > > On Wed 16-01-19 11:51:32, 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. 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. > > > > I haven't reviewed the patch yet but I am wondering whether this is > > really worth it without going all the way down to unify the common code > > and remove much more code duplication. Or is this not possible for some > > reason? > > Exactly what I suggested doing in response to v1. > > Also, the approach taken here is crazy. x86 has a feature that no other > architecture has bothered to implement yet -- accounting page tables > to the process. Yet instead of spreading that goodness to all other > architectures, Anshuman has gone to more effort to avoid doing that. Also, s390 (of course, who else) has a fun custom page-table allocator for reasons that don't apply to many other archs.