From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 5D328C433E0 for ; Wed, 8 Jul 2020 13:25:27 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 3347320774 for ; Wed, 8 Jul 2020 13:25:27 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728210AbgGHNZ0 (ORCPT ); Wed, 8 Jul 2020 09:25:26 -0400 Received: from mail.kernel.org ([198.145.29.99]:34910 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728148AbgGHNZ0 (ORCPT ); Wed, 8 Jul 2020 09:25:26 -0400 Received: from gaia (unknown [95.146.230.158]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id DFB1820720; Wed, 8 Jul 2020 13:25:22 +0000 (UTC) Date: Wed, 8 Jul 2020 14:25:20 +0100 From: Catalin Marinas To: Anshuman Khandual Cc: linux-mm@kvack.org, justin.he@arm.com, akpm@linux-foundation.org, Jonathan Corbet , Will Deacon , Benjamin Herrenschmidt , Paul Mackerras , Michael Ellerman , Dave Hansen , Andy Lutomirski , Peter Zijlstra , Thomas Gleixner , Ingo Molnar , Borislav Petkov , "H. Peter Anvin" , linux-doc@vger.kernel.org, x86@kernel.org, linux-arm-kernel@lists.infradead.org, linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH V4 2/3] mm/sparsemem: Enable vmem_altmap support in vmemmap_alloc_block_buf() Message-ID: <20200708132520.GD6308@gaia> References: <1594004178-8861-1-git-send-email-anshuman.khandual@arm.com> <1594004178-8861-3-git-send-email-anshuman.khandual@arm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1594004178-8861-3-git-send-email-anshuman.khandual@arm.com> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-doc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-doc@vger.kernel.org On Mon, Jul 06, 2020 at 08:26:17AM +0530, Anshuman Khandual wrote: > There are many instances where vmemap allocation is often switched between > regular memory and device memory just based on whether altmap is available > or not. vmemmap_alloc_block_buf() is used in various platforms to allocate > vmemmap mappings. Lets also enable it to handle altmap based device memory > allocation along with existing regular memory allocations. This will help > in avoiding the altmap based allocation switch in many places. To summarize > there are two different methods to call vmemmap_alloc_block_buf(). > > vmemmap_alloc_block_buf(size, node, NULL) /* Allocate from system RAM */ > vmemmap_alloc_block_buf(size, node, altmap) /* Allocate from altmap */ > > This converts altmap_alloc_block_buf() into a static function, drops it's s/it's/its/ > entry from the header and updates Documentation/vm/memory-model.rst. > > Cc: Jonathan Corbet > Cc: Catalin Marinas > Cc: Will Deacon > Cc: Benjamin Herrenschmidt > Cc: Paul Mackerras > Cc: Michael Ellerman > Cc: Dave Hansen > Cc: Andy Lutomirski > Cc: Peter Zijlstra > Cc: Thomas Gleixner > Cc: Ingo Molnar > Cc: Borislav Petkov > Cc: "H. Peter Anvin" > Cc: Andrew Morton > Cc: linux-doc@vger.kernel.org > Cc: x86@kernel.org > Cc: linux-arm-kernel@lists.infradead.org > Cc: linuxppc-dev@lists.ozlabs.org > Cc: linux-mm@kvack.org > Cc: linux-kernel@vger.kernel.org > Tested-by: Jia He > Suggested-by: Robin Murphy > Signed-off-by: Anshuman Khandual With the fallback argument dropped, the patch looks fine to me. Reviewed-by: Catalin Marinas