From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 6D693367F25; Tue, 10 Feb 2026 15:07:01 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=217.140.110.172 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1770736024; cv=none; b=axHj9ZxQSW6r6Ja5b9ogu+4oxI81IuouScC1Oq0IKaXSAqoZrv5IDHZg6UYJ9+fORyAuogle4OkGhD/QdHo9r47zzEo/EM2CSr/tW7xvj9IASYgPHCErBguw1Uk4PYBuhOWrcXlIPCTIbVQbC4tYi4FX8xiJ5CU7pRZRrjkK3+E= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1770736024; c=relaxed/simple; bh=W95p4VhCTCQaRY027oJYrb08jjxns6gg54ZGyTfK2N4=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=VVwNsdWpQn/zeQ2ReheKH1fGE8/S8oaZRq75TADDmnzoD0GL/rvNnO1CaKzMDg2sN0pMhBpllYiG2PcJPEAh4EcS3kxdx9mbBgzsYr3uxD/4Fj7NA7tFoDqOs3ZWGTZ38DhZZJPdfDN42DCQaIrSWJk3u6otLUZOxrWa4cJZ3sU= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=arm.com; spf=pass smtp.mailfrom=arm.com; arc=none smtp.client-ip=217.140.110.172 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=arm.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=arm.com Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 83A22150C; Tue, 10 Feb 2026 07:06:54 -0800 (PST) Received: from arm.com (usa-sjc-mx-foss1.foss.arm.com [172.31.20.19]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id B054A3F63F; Tue, 10 Feb 2026 07:06:53 -0800 (PST) Date: Tue, 10 Feb 2026 15:06:51 +0000 From: Catalin Marinas To: Mike Rapoport Cc: Andrew Morton , Andreas Larsson , Borislav Petkov , Brian Cain , "Christophe Leroy (CS GROUP)" , "David S. Miller" , Dave Hansen , David Hildenbrand , Dinh Nguyen , Geert Uytterhoeven , Guo Ren , Helge Deller , Huacai Chen , Ingo Molnar , Johannes Berg , John Paul Adrian Glaubitz , "Liam R. Howlett" , Lorenzo Stoakes , Madhavan Srinivasan , Magnus Lindholm , Matt Turner , Max Filippov , Michael Ellerman , Michal Hocko , Michal Simek , Palmer Dabbelt , Richard Weinberger , Russell King , Stafford Horne , Suren Baghdasaryan , Thomas Gleixner , Vineet Gupta , Vlastimil Babka , Will Deacon , linux-alpha@vger.kernel.org, linux-kernel@vger.kernel.org, linux-snps-arc@lists.infradead.org, linux-arm-kernel@lists.infradead.org, linux-csky@vger.kernel.org, linux-hexagon@vger.kernel.org, loongarch@lists.linux.dev, linux-m68k@lists.linux-m68k.org, linux-openrisc@vger.kernel.org, linux-parisc@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, linux-riscv@lists.infradead.org, linux-sh@vger.kernel.org, sparclinux@vger.kernel.org, linux-um@lists.infradead.org, linux-mm@kvack.org, x86@kernel.org Subject: Re: [PATCH v2 4/4] mm: cache struct page for empty_zero_page and return it from ZERO_PAGE() Message-ID: References: <20260209144058.2092871-1-rppt@kernel.org> <20260209144058.2092871-5-rppt@kernel.org> Precedence: bulk X-Mailing-List: linux-alpha@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20260209144058.2092871-5-rppt@kernel.org> On Mon, Feb 09, 2026 at 04:40:57PM +0200, Mike Rapoport wrote: > From: "Mike Rapoport (Microsoft)" > > For most architectures every invocation of ZERO_PAGE() does > virt_to_page(empty_zero_page). But empty_zero_page is in BSS and it is > enough to get its struct page once at initialization time and then use > it whenever a zero page should be accessed. > > Add yet another __zero_page variable that will be initialized as > virt_to_page(empty_zero_page) for most architectures in a weak > arch_setup_zero_pages() function. > > For architectures that use colored zero pages (MIPS and s390) rename their > setup_zero_pages() to arch_setup_zero_pages() and make it global rather > than static. > > For architectures that cannot use virt_to_page() for BSS (arm64 and > sparc64) add override of arch_setup_zero_pages(). > > Signed-off-by: Mike Rapoport (Microsoft) For arm64: Acked-by: Catalin Marinas