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 9B4ABC433E1 for ; Wed, 8 Jul 2020 13:25:28 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 65E7420774 for ; Wed, 8 Jul 2020 13:25:28 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 65E7420774 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=arm.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 0B8876B00C9; Wed, 8 Jul 2020 09:25:28 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 040446B00CB; Wed, 8 Jul 2020 09:25:27 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id E4B396B00CC; Wed, 8 Jul 2020 09:25:27 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0210.hostedemail.com [216.40.44.210]) by kanga.kvack.org (Postfix) with ESMTP id CC7876B00C9 for ; Wed, 8 Jul 2020 09:25:27 -0400 (EDT) Received: from smtpin18.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay04.hostedemail.com (Postfix) with ESMTP id 865231EF1 for ; Wed, 8 Jul 2020 13:25:27 +0000 (UTC) X-FDA: 77014980294.18.steel17_5a0551b26ebd Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin18.hostedemail.com (Postfix) with ESMTP id 57FF2100ED9D5 for ; Wed, 8 Jul 2020 13:25:27 +0000 (UTC) X-HE-Tag: steel17_5a0551b26ebd X-Filterd-Recvd-Size: 3770 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by imf13.hostedemail.com (Postfix) with ESMTP for ; Wed, 8 Jul 2020 13:25:26 +0000 (UTC) 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) X-Rspamd-Queue-Id: 57FF2100ED9D5 X-Spamd-Result: default: False [0.00 / 100.00] X-Rspamd-Server: rspam03 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: 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