From nobody Sat Feb 7 21:08:13 2026 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 0BA4033FE27 for ; Thu, 18 Dec 2025 15:10:08 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1766070609; cv=none; b=FNFHBx4VsmoX88RR++vWTWh1eWiOjOWUdGpk/RQu7jhH0w6EXXDrzmHD7tbmL+MR+pnYQ2Taxgg0Apu1FbNJC46LNpZHe3MtcIRNJKkblkFTGfMgR8MRDC7Y6Z2JRQo1AFrqZXnxXbd159wBa1RLHSyid7BMWEISL/Frr3RlUpE= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1766070609; c=relaxed/simple; bh=Kq8kgjoW35TGaaX30yH963wFdY5bwi75+JeGAznZYJE=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=c24Qjxzwd5dTcstN/PA/BuoRnwBIjYI9MsbhX8z+C7Lql6Wng0PlbGHVkDxyNo1/YVMXfNLd+8+MZUkSP1a0TespkrVidL9zrBtk2b6xKDcJTvp0MnrrUPDcQ+g4IExPakJ974PMA8OTSV2DuOVzxJGC3/uJnZU037fm4+NnVbw= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=bb4n0ptR; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="bb4n0ptR" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 2C375C116C6; Thu, 18 Dec 2025 15:10:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1766070608; bh=Kq8kgjoW35TGaaX30yH963wFdY5bwi75+JeGAznZYJE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=bb4n0ptRDJm6VjhnYzuel9TvhDmDm8afHnxfN299Vv0IUMOIywzNAPgis0QWIrhQQ xLLAokV3eSgWrkiZ+G3KhmC59xc/T4UfdBH1UnJGmbsTutp0bFn+Fa7eXngHKXKTsi ipQkIaVb2Ewx34QoHUZetmqR+SpIh7V68Ctwwn7PChUWpQXfyNx2Ag3dwnhuqr6FiB edOKlBNjXUmWk6/jAI6c+ESBqObRDFBdh6u9FSlH1JeLDqpHhgswxyKQTdx32Mvbzr bkXUq1IMNs6Yhs59j5oqTOhCKo9JYTfLD8DdHnweaBLTFwzupYmsMOmW8q3HcvXMeV pBoXMOVwPQPLg== Received: from phl-compute-02.internal (phl-compute-02.internal [10.202.2.42]) by mailfauth.phl.internal (Postfix) with ESMTP id 7AAF9F40075; Thu, 18 Dec 2025 10:10:07 -0500 (EST) Received: from phl-frontend-04 ([10.202.2.163]) by phl-compute-02.internal (MEProxy); Thu, 18 Dec 2025 10:10:07 -0500 X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeefgedrtddtgdegheejgecutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpuffrtefokffrpgfnqfghnecuuegr ihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenucfjug hrpefhvfevufffkffojghfggfgsedtkeertdertddtnecuhfhrohhmpefmihhrhihlucfu hhhuthhsvghmrghuuceokhgrsheskhgvrhhnvghlrdhorhhgqeenucggtffrrghtthgvrh hnpefhudefjeehhfektdeuvdefveejffdvhfevtddugfduffejfeeikeelhedvtedvveen ucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpehkihhrih hllhdomhgvshhmthhprghuthhhphgvrhhsohhnrghlihhthidqudeiudduiedvieehhedq vdekgeeggeejvdekqdhkrghspeepkhgvrhhnvghlrdhorhhgsehshhhuthgvmhhovhdrnh grmhgvpdhnsggprhgtphhtthhopedvtddpmhhouggvpehsmhhtphhouhhtpdhrtghpthht oheprghkphhmsehlihhnuhigqdhfohhunhgurghtihhonhdrohhrghdprhgtphhtthhope hmuhgthhhunhdrshhonhhgsehlihhnuhigrdguvghvpdhrtghpthhtohepuggrvhhiuges khgvrhhnvghlrdhorhhgpdhrtghpthhtohepfihilhhlhiesihhnfhhrrgguvggrugdroh hrghdprhgtphhtthhopehushgrmhgrrghrihhfieegvdesghhmrghilhdrtghomhdprhgt phhtthhopehfvhgulhesghhoohhglhgvrdgtohhmpdhrtghpthhtohepohhsrghlvhgrug horhesshhushgvrdguvgdprhgtphhtthhopehrphhptheskhgvrhhnvghlrdhorhhgpdhr tghpthhtohepvhgsrggskhgrsehsuhhsvgdrtgii X-ME-Proxy: Feedback-ID: i10464835:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Thu, 18 Dec 2025 10:10:06 -0500 (EST) From: Kiryl Shutsemau To: Andrew Morton , Muchun Song , David Hildenbrand , Matthew Wilcox , Usama Arif , Frank van der Linden Cc: Oscar Salvador , Mike Rapoport , Vlastimil Babka , Lorenzo Stoakes , Zi Yan , Baoquan He , Michal Hocko , Johannes Weiner , Jonathan Corbet , kernel-team@meta.com, linux-mm@kvack.org, linux-kernel@vger.kernel.org, linux-doc@vger.kernel.org, Kiryl Shutsemau Subject: [PATCHv2 07/14] mm: Make page_zonenum() use head page Date: Thu, 18 Dec 2025 15:09:38 +0000 Message-ID: <20251218150949.721480-8-kas@kernel.org> X-Mailer: git-send-email 2.51.2 In-Reply-To: <20251218150949.721480-1-kas@kernel.org> References: <20251218150949.721480-1-kas@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" With the upcoming changes to HVO, a single page of tail struct pages will be shared across all huge pages of the same order on a node. Since huge pages on the same node may belong to different zones, the zone information stored in shared tail page flags would be incorrect. Always fetch zone information from the head page, which has unique and correct zone flags for each compound page. Signed-off-by: Kiryl Shutsemau --- include/linux/mmzone.h | 1 + 1 file changed, 1 insertion(+) diff --git a/include/linux/mmzone.h b/include/linux/mmzone.h index 9f44dc760cdc..7e4f69b9d760 100644 --- a/include/linux/mmzone.h +++ b/include/linux/mmzone.h @@ -1224,6 +1224,7 @@ static inline enum zone_type memdesc_zonenum(memdesc_= flags_t flags) =20 static inline enum zone_type page_zonenum(const struct page *page) { + page =3D compound_head(page); return memdesc_zonenum(page->flags); } =20 --=20 2.51.2