Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp2774109imu; Sun, 13 Jan 2019 09:42:13 -0800 (PST) X-Google-Smtp-Source: ALg8bN6E1opitjc5+skeVX6vjTWHLc1jR2O86BwbGue3kkHf3k1w1hXsybE5wSV9T8X0/WXl8Cxy X-Received: by 2002:a63:e84c:: with SMTP id a12mr17909031pgk.241.1547401333711; Sun, 13 Jan 2019 09:42:13 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1547401333; cv=none; d=google.com; s=arc-20160816; b=yltlBo3grl7cCMXAWmEsY0cG3ROuNM0SCvFO6mvWU7TWCCda7MvDxKi1kfDpsF8jcP ytfHgfQiMvgbYssEXsdHUm9QWSUUDlOf0+kaZeUA+voHJsw7ZnlXiuXZiWqnmeX5/KUZ 8OtiQdSRImR7EH1oYLiTimNEdJjSPtdYpM3ehn3Yb5kt8W0c7sqlp6ef7MiCe0U9ivPV 8iLZoSqi/MxU9K95IIvqKb9QV7k9fG27g0NOe+08PyxHtVedLuuQTBAVj91XExYo0mXe yn0VsMe0pqQpU7g7hwHGYnr2D08zBwPx5ifil5X2h0JhmpJbyIFwQgR2dslDfQE/A9mp I5Wg== 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; bh=GeqjwxCn9TfAQuT6zvwQ0vYi1XnQUW6c4dl7HQPA4vg=; b=uj7j3rDw3esNmv2ZzovnTS83SJ+BDu3wtNlwGMfFspGbVGCwVnYEaha/EvUfPcITJN gKsq5PQypyB2d2OlfHIrA+DIceYo2xsiiSNeg7OgzksAwB6roaKqcHPM6KyGzhYPeVZB eWJnwKsThHFheZdZ0dpBXKstmJBRZ2Ozylhl6rxLHySO5iG4/ls6BUJCDTLuEq58oD8r 1u2VS6XugB/83p7+UDFqJ6QpcpVv2M2Aha87l01ghAX4cLaJ2pjkbnLmrsfZ6NkwOsWX OY3RXKdel/S5/deTRd3hZ6X1Ks6zg8MtjsRh8z2IEDtHBivOwblVeNol2pL6Z33gBzny XTgw== 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id q19si24176657pfh.138.2019.01.13.09.41.21; Sun, 13 Jan 2019 09:42:13 -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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726724AbfAMRgB (ORCPT + 99 others); Sun, 13 Jan 2019 12:36:01 -0500 Received: from mx2.suse.de ([195.135.220.15]:53970 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726254AbfAMRgA (ORCPT ); Sun, 13 Jan 2019 12:36:00 -0500 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id 8527AAD0A; Sun, 13 Jan 2019 17:35:58 +0000 (UTC) Date: Sun, 13 Jan 2019 18:35:55 +0100 From: Michal Hocko To: Anshuman Khandual Cc: 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@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, peterz@infradead.org, 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 Subject: Re: [PATCH] mm: Introduce GFP_PGTABLE Message-ID: <20190113173555.GC1578@dhcp22.suse.cz> References: <1547288798-10243-1-git-send-email-anshuman.khandual@arm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1547288798-10243-1-git-send-email-anshuman.khandual@arm.com> 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 Sat 12-01-19 15:56:38, 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. I agree that some unification is due but GFP_PGTABLE is not something to expose in generic gfp.h IMHO. It just risks an abuse. I would be looking at providing asm-generic implementation and reuse it to remove the code duplication. But I haven't tried that to know that it will work out due to small/subtle differences between arches. > Signed-off-by: Anshuman Khandual -- Michal Hocko SUSE Labs