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 lists.ozlabs.org (lists.ozlabs.org [112.213.38.117]) (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 1B1EDEA8126 for ; Tue, 10 Feb 2026 15:07:35 +0000 (UTC) Received: from boromir.ozlabs.org (localhost [127.0.0.1]) by lists.ozlabs.org (Postfix) with ESMTP id 4f9Q0P3f5Pz2xN5; Wed, 11 Feb 2026 02:07:33 +1100 (AEDT) Authentication-Results: lists.ozlabs.org; arc=none smtp.remote-ip=217.140.110.172 ARC-Seal: i=1; a=rsa-sha256; d=lists.ozlabs.org; s=201707; t=1770736053; cv=none; b=CiYLunT1iDN7sDTswH9R8lscml29pmrma6aBxEN8DaDqjCU+ykBH1mKwBVSRwq606iHHPm4EtQCpPCApFd+dhZ9k3teE9fTDES3HSbqsNS02UJcsxlTpie7NSQmHrLpEfzVn0Gk7Kgr+uGZmzjLM/t4cEMVUGp9x7CJURL9ME4TjeRoXEr3crSJs02zYjx1jFCHtQIOroXSAWkmI0HNsXz5PIvXRllXIoqRidk6pBpwfI/Tz68TXtVMd5dpVkEKS9Ln0LWqDpY9Kp2UMep23R8oC1CE967tar2oSx3cWjqyRkPshT0AWy1HKqqqxH+EjUFIhUIUFsDgEnr3mvmZ+Ug== ARC-Message-Signature: i=1; a=rsa-sha256; d=lists.ozlabs.org; s=201707; t=1770736053; c=relaxed/relaxed; bh=sOFu981r064UEV4nZdYzmU+/xsnUioQlrTOeHah7SXY=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=XX9jumCWyVg0j/4T2pO9Vl3V2z2NEIPsKwldWVeEjB+g6/Iio/44qkXaDIdToNHXXvfUXEISpRYfCbIWQbZcKOG5yEwDSxFRoQfXYswhfjPQEiD1vQvxodEo3hMKLoq+KHtfaNd3JOn83xDE6VvzqO8PqBgNtbd+FEq8fZZAHTBGsTYL5nn3Yv9RYjQIgLcl3pf5GsU4sxJENiS+8UHwM+h1ix4OEuvfM1ZYsimjdpBbJ6lffXR7/qp+6a4xj+o2EKu6M4LIsfjlf7Rp+9p98O5UytwNKstQg2GrhTT2o6ntwQ79wRSCqV24aburlzQOxcSYL6WYAG4Tg4enAmiqVQ== ARC-Authentication-Results: i=1; lists.ozlabs.org; dmarc=pass (p=none dis=none) header.from=arm.com; spf=pass (client-ip=217.140.110.172; helo=foss.arm.com; envelope-from=catalin.marinas@arm.com; receiver=lists.ozlabs.org) smtp.mailfrom=arm.com Authentication-Results: lists.ozlabs.org; dmarc=pass (p=none dis=none) header.from=arm.com Authentication-Results: lists.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=arm.com (client-ip=217.140.110.172; helo=foss.arm.com; envelope-from=catalin.marinas@arm.com; receiver=lists.ozlabs.org) Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by lists.ozlabs.org (Postfix) with ESMTP id 4f9Q0N5rqLz2xKx for ; Wed, 11 Feb 2026 02:07:32 +1100 (AEDT) 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> X-Mailing-List: linuxppc-dev@lists.ozlabs.org List-Id: List-Help: List-Owner: List-Post: List-Archive: , List-Subscribe: , , List-Unsubscribe: Precedence: list 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