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 1C22DEA812C for ; Tue, 10 Feb 2026 15:07:07 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:In-Reply-To:Content-Type: MIME-Version:References:Message-ID:Subject:Cc:To:From:Date:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=sOFu981r064UEV4nZdYzmU+/xsnUioQlrTOeHah7SXY=; b=nxoufXkc39hlOXwBYaKVRfxaY0 +rs4ssSW/VMTrT4uK4HeSJLnGSpewbc2axxKo+MBZ7ASZMQ9ykcEHpDhLvr+wwkBNWVOyviWcmgzq BoNLEkXAFw5WW+CxXVWHWeIWig9H47IohAtU11+cIqv1mqj/KvCSFc9/XgHFl+xbCDNWPjL5Nsg9i udjlQ+jhK3akCFqxGYmaxExPBvFD/ODJ6rt5o8SYBblcVbKRSjhc8/6E8RZg1bS44hx4XWD5jrsMN O6vEhB1+qDJ/GuN98hLJ7OCMkjhOCgHkWjV/oeT+9zWNSwNG8SMGGlF/xLKc2T5Z3JDPVy0BrIFN1 aYk0mxFw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98.2 #2 (Red Hat Linux)) id 1vppKU-0000000H5zU-2GHb; Tue, 10 Feb 2026 15:07:06 +0000 Received: from foss.arm.com ([217.140.110.172]) by bombadil.infradead.org with esmtp (Exim 4.98.2 #2 (Red Hat Linux)) id 1vppKR-0000000H5yE-0G2F; Tue, 10 Feb 2026 15:07:04 +0000 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> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20260209144058.2092871-5-rppt@kernel.org> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20260210_070703_133928_DB4722F5 X-CRM114-Status: GOOD ( 13.35 ) X-BeenThere: linux-um@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-um" Errors-To: linux-um-bounces+linux-um=archiver.kernel.org@lists.infradead.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