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 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 44686CA0EFA for ; Sat, 23 Aug 2025 06:33:10 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=RgdvQPey5o1JLQv06wFMoKm9lxyQdPhLNFFvflFYS1c=; b=kg9Lor9P71Aa2g H8hUkK6hAnFviLt+ae10QiKntlg/7Qi2i8DGyK/3yqj9/frXrF4I1xKeFv5rOBA1xCBxM55dtKHGX mKB28+wnwvUKVVzx/89Cmron5afTTmniEvOuidwks2wsRWC0VeOLF7asDj8u6lmJYWbeSUCNHPiUZ jeB4DMbzEDvQdnea2xeNWHPLmZxiqQ7NRKiuwUq7D4SeU30RjH1RJNe8wq+8ilN0m2NyBrx/SjW8y MRYJVdKyy5qN2yFQxTLUaGp1V+F/OUD63+j6hB4ymURtBwEu3UyWKJQaoHDH5mr2tH6CGuzaBfs7e how48HGt7R/UDY9ZGH4g==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98.2 #2 (Red Hat Linux)) id 1uphoG-000000042W1-2gWK; Sat, 23 Aug 2025 06:33:04 +0000 Received: from sea.source.kernel.org ([2600:3c0a:e001:78e:0:1991:8:25]) by bombadil.infradead.org with esmtps (Exim 4.98.2 #2 (Red Hat Linux)) id 1upTOP-00000002xBB-1P49; Fri, 22 Aug 2025 15:09:26 +0000 Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by sea.source.kernel.org (Postfix) with ESMTP id B028D4368F; Fri, 22 Aug 2025 15:09:24 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 4DC2FC113D0; Fri, 22 Aug 2025 15:09:07 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1755875364; bh=BbeE+oYVvXyCl/P3cWovjJUaU7WzCVAlNkMT749qO5w=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=Prntf9uZKZis/U/bJlHQFXtv4HnPV3FVBr1/P31JtBZdZlx8pNyYQrIV2U1OHL2Ph KWg0PSoWLWhirFvfgHCyLwMGddND32c/PoybCUWyTY4uJJaWAm3pqSnmsGRF97A6G4 VDGi/p4toQ5nig1708cGRPMAz3wCxoj5eCkSR54XvHPYG/bVMzGFIuTMu74kogSth9 uZBDebwYJugk9IlUMY2oDzjDlJybUXGUDToJl2tsj04xT1jSsHqLJwHeqPJg2mwSqm 1JhNQxwyrU8QnJ30mOJ/Iq/kXqrUNLLTQ0bAe831b6zLWD86rnmkM7tBokSIpXtEvj XiFVPUzX/IwAA== Date: Fri, 22 Aug 2025 18:09:03 +0300 From: Mike Rapoport To: David Hildenbrand Cc: linux-kernel@vger.kernel.org, Huacai Chen , WANG Xuerui , Madhavan Srinivasan , Michael Ellerman , Nicholas Piggin , Christophe Leroy , Paul Walmsley , Palmer Dabbelt , Albert Ou , Alexandre Ghiti , "David S. Miller" , Andreas Larsson , Alexander Potapenko , Andrew Morton , Brendan Jackman , Christoph Lameter , Dennis Zhou , Dmitry Vyukov , dri-devel@lists.freedesktop.org, intel-gfx@lists.freedesktop.org, iommu@lists.linux.dev, io-uring@vger.kernel.org, Jason Gunthorpe , Jens Axboe , Johannes Weiner , John Hubbard , kasan-dev@googlegroups.com, kvm@vger.kernel.org, "Liam R. Howlett" , Linus Torvalds , linux-arm-kernel@axis.com, linux-arm-kernel@lists.infradead.org, linux-crypto@vger.kernel.org, linux-ide@vger.kernel.org, linux-kselftest@vger.kernel.org, linux-mips@vger.kernel.org, linux-mmc@vger.kernel.org, linux-mm@kvack.org, linux-riscv@lists.infradead.org, linux-s390@vger.kernel.org, linux-scsi@vger.kernel.org, Lorenzo Stoakes , Marco Elver , Marek Szyprowski , Michal Hocko , Muchun Song , netdev@vger.kernel.org, Oscar Salvador , Peter Xu , Robin Murphy , Suren Baghdasaryan , Tejun Heo , virtualization@lists.linux.dev, Vlastimil Babka , wireguard@lists.zx2c4.com, x86@kernel.org, Zi Yan Subject: Re: [PATCH RFC 01/35] mm: stop making SPARSEMEM_VMEMMAP user-selectable Message-ID: References: <20250821200701.1329277-1-david@redhat.com> <20250821200701.1329277-2-david@redhat.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20250821200701.1329277-2-david@redhat.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20250822_080925_409995_C00ABEDC X-CRM114-Status: GOOD ( 23.08 ) X-BeenThere: linux-riscv@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-riscv" Errors-To: linux-riscv-bounces+linux-riscv=archiver.kernel.org@lists.infradead.org On Thu, Aug 21, 2025 at 10:06:27PM +0200, David Hildenbrand wrote: > In an ideal world, we wouldn't have to deal with SPARSEMEM without > SPARSEMEM_VMEMMAP, but in particular for 32bit SPARSEMEM_VMEMMAP is > considered too costly and consequently not supported. > > However, if an architecture does support SPARSEMEM with > SPARSEMEM_VMEMMAP, let's forbid the user to disable VMEMMAP: just > like we already do for arm64, s390 and x86. > > So if SPARSEMEM_VMEMMAP is supported, don't allow to use SPARSEMEM without > SPARSEMEM_VMEMMAP. > > This implies that the option to not use SPARSEMEM_VMEMMAP will now be > gone for loongarch, powerpc, riscv and sparc. All architectures only > enable SPARSEMEM_VMEMMAP with 64bit support, so there should not really > be a big downside to using the VMEMMAP (quite the contrary). > > This is a preparation for not supporting > > (1) folio sizes that exceed a single memory section > (2) CMA allocations of non-contiguous page ranges > > in SPARSEMEM without SPARSEMEM_VMEMMAP configs, whereby we > want to limit possible impact as much as possible (e.g., gigantic hugetlb > page allocations suddenly fails). > > Cc: Huacai Chen > Cc: WANG Xuerui > Cc: Madhavan Srinivasan > Cc: Michael Ellerman > Cc: Nicholas Piggin > Cc: Christophe Leroy > Cc: Paul Walmsley > Cc: Palmer Dabbelt > Cc: Albert Ou > Cc: Alexandre Ghiti > Cc: "David S. Miller" > Cc: Andreas Larsson > Signed-off-by: David Hildenbrand Acked-by: Mike Rapoport (Microsoft) > --- > mm/Kconfig | 3 +-- > 1 file changed, 1 insertion(+), 2 deletions(-) > > diff --git a/mm/Kconfig b/mm/Kconfig > index 4108bcd967848..330d0e698ef96 100644 > --- a/mm/Kconfig > +++ b/mm/Kconfig > @@ -439,9 +439,8 @@ config SPARSEMEM_VMEMMAP_ENABLE > bool > > config SPARSEMEM_VMEMMAP > - bool "Sparse Memory virtual memmap" > + def_bool y > depends on SPARSEMEM && SPARSEMEM_VMEMMAP_ENABLE > - default y > help > SPARSEMEM_VMEMMAP uses a virtually mapped memmap to optimise > pfn_to_page and page_to_pfn operations. This is the most > -- > 2.50.1 > -- Sincerely yours, Mike. _______________________________________________ linux-riscv mailing list linux-riscv@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-riscv