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 kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 53681C28B20 for ; Wed, 2 Apr 2025 13:07:57 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 96562280007; Wed, 2 Apr 2025 09:07:55 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 8F081280004; Wed, 2 Apr 2025 09:07:55 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 78EBB280007; Wed, 2 Apr 2025 09:07:55 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0017.hostedemail.com [216.40.44.17]) by kanga.kvack.org (Postfix) with ESMTP id 554E1280004 for ; Wed, 2 Apr 2025 09:07:55 -0400 (EDT) Received: from smtpin29.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay05.hostedemail.com (Postfix) with ESMTP id 250A659B83 for ; Wed, 2 Apr 2025 13:07:56 +0000 (UTC) X-FDA: 83289131352.29.0E26FEC Received: from galois.linutronix.de (Galois.linutronix.de [193.142.43.55]) by imf12.hostedemail.com (Postfix) with ESMTP id 4AA0C4000E for ; Wed, 2 Apr 2025 13:07:54 +0000 (UTC) Authentication-Results: imf12.hostedemail.com; dkim=pass header.d=linutronix.de header.s=2020 header.b=qJ+t6SGu; dkim=pass header.d=linutronix.de header.s=2020e header.b=NiG1u7Az; dmarc=pass (policy=none) header.from=linutronix.de; spf=pass (imf12.hostedemail.com: domain of t-8ch@linutronix.de designates 193.142.43.55 as permitted sender) smtp.mailfrom=t-8ch@linutronix.de ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1743599274; a=rsa-sha256; cv=none; b=D7jYKgP9pQs0O/h4UmNC4qiuhRvX8P00e1VjlU3YDa21DYiuKh91xFn7oIkVOABfBItdLu kP5qLchttcOOpBTBO12sVRQ/AO+IBrAQqE32Rb0xEruIoKFn/2WlnYhB41WVDIC3fY1HAa B3twsjF0+0iQG6gsfnuuR3RJtIpAxSY= ARC-Authentication-Results: i=1; imf12.hostedemail.com; dkim=pass header.d=linutronix.de header.s=2020 header.b=qJ+t6SGu; dkim=pass header.d=linutronix.de header.s=2020e header.b=NiG1u7Az; dmarc=pass (policy=none) header.from=linutronix.de; spf=pass (imf12.hostedemail.com: domain of t-8ch@linutronix.de designates 193.142.43.55 as permitted sender) smtp.mailfrom=t-8ch@linutronix.de ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1743599274; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=1X5wKZymmcKMOD5wz7WhMq48v9AtCOzb7Bp+Wejqjt8=; b=R7ldJU8Hn9DMLaforeY1G+UnBNjCCHOCwQtJE3CKAECXR7i/WDxeyeKGtjnzxEUWhXj+Au xjxNnosrDvbDtmDpoq+VIqF0vl+pS/JzuVSsTcT2maF0nNoaGxJnsvfnzeG67sOtA3g4FJ 81htJia3M43w+uE6B1ajuzBAkpjZmZQ= Date: Wed, 2 Apr 2025 15:07:50 +0200 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1743599271; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=1X5wKZymmcKMOD5wz7WhMq48v9AtCOzb7Bp+Wejqjt8=; b=qJ+t6SGuwcs0fcyTCbz3+CsuGvBvpcjRYcRy/lpyBhR+xNgkf0K9rJPWuH0Ai+vKzYoypW hqrNELPyFAyCERAgiBi7wAA54c3Chm8qfwjjDzhdUPZRvvAMPqKEo4uSn+n+whHb0reT8i wbUReQVouPVIqlxZ6r8BTrHhifDE2WHyP3Wy9EL8f/yEnnGI5zIKUPIBCYSUrVyAaQXsra KeQDShbcfQn2CDTOO5A+IHd7IX+XVzqSQsZnteNmyMY4FkI9MYmdiIlJnoGRg+W2QYUy8p UZSllggqcCZAQ0lxGVyI18oFzgzoD5Sxv/zkJj3Z1jCPpaYXFavROx6jN2z7yA== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1743599271; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=1X5wKZymmcKMOD5wz7WhMq48v9AtCOzb7Bp+Wejqjt8=; b=NiG1u7AzlJl1SUEGEOjj7BJBgsegHE66/nZ7RMmUJd1+EAbdhFi4oSlsDCHU/zRo4c/EEd L5aOdKtWP/pNZrAA== From: Thomas =?utf-8?Q?Wei=C3=9Fschuh?= To: Mike Rapoport Cc: Andrew Morton , Dave Hansen , Andy Lutomirski , Ard Biesheuvel , Arnd Bergmann , Borislav Petkov , "David S. Miller" , Geert Uytterhoeven , Ingo Molnar , Peter Zijlstra , Thomas Gleixner , linux-kernel@vger.kernel.org, linux-arch@vger.kernel.org, linux-mm@kvack.org, x86@kernel.org, Naresh Kamboju , lkft-triage@lists.linaro.org, Linux Regressions Subject: Re: [PATCH v2 10/13] arch, mm: set high_memory in free_area_init() Message-ID: <20250402145330-3ff21a6b-fb03-4bc8-8178-51a535582c6f@linutronix.de> References: <20250313135003.836600-1-rppt@kernel.org> <20250313135003.836600-11-rppt@kernel.org> <20250402140521-bf9b3743-094e-4097-a189-10cdf1db9255@linutronix.de> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: X-Rspam-User: X-Rspamd-Server: rspam03 X-Rspamd-Queue-Id: 4AA0C4000E X-Stat-Signature: tgarr3for3ra4j8nycbythnk7hwwb781 X-HE-Tag: 1743599274-602769 X-HE-Meta: U2FsdGVkX199m54bZAsVipDyfn3FKru9Yt4la7zub7kfYhLiXgtogDmycAP2ghVaRaeq06j+krQreH6v8ktY8X44eo+kTdmF/SqSRcIoxF4S+57xtXHVX1uaM0joZnIMLO21YqyexhDwQ6xuRrZFDStLgvW8wxZcNxi42GzTOcLFy9vgBuDcetI0an2Mo1P8YV8pKT8+29T2FzxJol7RO21FIHF963iyrbRfY1iciipTOxCaVYzZuKomZzjlckOyMz4qd0pL/bxfKv4yv35cxzIfAPYUHki5/FeZM4Bak4x906+hYcHHXPpTb/AEdp0pX8Orhk/kUfZjKCHvTSoJ28ClTWvmYqlYyUi//lS+09HTXJV1gwiJA144vpmf1+iqFEEFfiqshRbSE9rnG273s3nDn8TB56jfA/EvUWSaf9eU2d0uoSQvpsy9EHoAcLIchJnmAzCWxuEa9Br1WdYyXZY3eR+StltsaJw+v1y2Bpe4WWhYw2O0QiuqvLo+5lBdYXaGjrKdoHSVlqgtf27CfbqWK23BfIhmrx/gnJ93/RB/sBPqeLp5EyQNdPy+AFXoFFUDdxQcxK372ffDvGGljE/UWsKrzZuZJf6vDpREXlnQmIBXI9zTa1gYFWwiww4eLf614kABg+gZEQa8HU3NP8mMP3eP4IV8L8ELHhe9gseWBrmMYq1+B8NA3L67muGGDTZ0aoqSK5GD54qoQJripfzh1So9ac5Sp0DMwv2tuPA8SNAlKt77g1ZDna90aAKFjUGO/nFxXEgk+xH8L9yC5yXPmL9UbJBulrAoj32QJteWvMElrSK/ZpCrRUT/Taf04dHcloMLRcGzfc2QcvVIYVKjZZrr8wb0xPwGhW8ns+Tom+4LdS2/WU8RxzLZhAYJtx3iUqxsQ1kQGxGNe3ZePCKLuUXU51Ip38y/XP6blWKuYV/LxwXFkLvkvBd7yAfWy7r234q1TYuUPbf/uUO f5fqQDEV PxpwClppU0GsW61Oh0W7OtURIqgvOicsQdLRH5oVeZaEG6E7DSvYg9gu/XIKx+Yg1B4ITiof9fzbbLUXYhvlX+41Ro7uSc+mh35XEYdJcIYkiSny84YKT4daf5wPuvGd3Ycut+r/CEyTKUbs+M7yOpcKq83UYV1r9iRlKLoDCYgN3f+SxrmqpONUOfj0WFHcvE9870vuw4IXzUbt73NWHhNx1mY6YJlvoDFkOQVdMVZxkCuV1hnxZ8VHTPknxFropre1mbuRbftSvFboILfDvZU6U/I+Hol/yHVBXD++DDSB+j6f59J4myV06bmsFJfQN1T1R1qScDjVaC73uO6IIX4+MWaBau5ylzpEHpf/yotW83WlBHyQoK+9AVav47yW5bUTK4NrTHFZLOFz3gtzZge0zpXVszzXu0Y9tYSO35hnJTqytHtPAujjGS0UVoqycjYGxvR7kCKlK1cc2SasSKnq9YpAZAVFphDWiFj86sOhhGmQcbcxY23OmLAZxgj/aR2RHmn4NyuJ/OyClpDKVMAd/SA== X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: List-Subscribe: List-Unsubscribe: On Wed, Apr 02, 2025 at 03:46:37PM +0300, Mike Rapoport wrote: > On Wed, Apr 02, 2025 at 02:19:01PM +0200, Thomas Weißschuh wrote: > > (drop all the non-x86 and non-mm recipients) > > > > On Thu, Mar 13, 2025 at 03:50:00PM +0200, Mike Rapoport wrote: > > > From: "Mike Rapoport (Microsoft)" > > > > > > high_memory defines upper bound on the directly mapped memory. > > > This bound is defined by the beginning of ZONE_HIGHMEM when a system has > > > high memory and by the end of memory otherwise. > > > > > > All this is known to generic memory management initialization code that > > > can set high_memory while initializing core mm structures. > > > > > > Add a generic calculation of high_memory to free_area_init() and remove > > > per-architecture calculation except for the architectures that set and > > > use high_memory earlier than that. > > > > This change (in mainline as commit e120d1bc12da ("arch, mm: set high_memory in free_area_init()") > > breaks booting i386 on QEMU for me (and others [0]). > > The boot just hangs without output. > > > > It's easily reproducible with kunit: > > ./tools/testing/kunit/kunit.py run --arch i386 > > > > See below for the specific problematic hunk. > > > > [0] https://lore.kernel.org/lkml/CA+G9fYtdXHVuirs3v6at3UoKNH5keuq0tpcvpz0tJFT4toLG4g@mail.gmail.com/ > > > > > > > diff --git a/arch/x86/mm/init_32.c b/arch/x86/mm/init_32.c > > > index 6d2f8cb9451e..801b659ead0c 100644 > > > --- a/arch/x86/mm/init_32.c > > > +++ b/arch/x86/mm/init_32.c > > > @@ -643,9 +643,6 @@ void __init initmem_init(void) > > > highstart_pfn = max_low_pfn; > > > printk(KERN_NOTICE "%ldMB HIGHMEM available.\n", > > > pages_to_mb(highend_pfn - highstart_pfn)); > > > - high_memory = (void *) __va(highstart_pfn * PAGE_SIZE - 1) + 1; > > > -#else > > > - high_memory = (void *) __va(max_low_pfn * PAGE_SIZE - 1) + 1; > > > #endif > > > > Reverting this hunk fixes the issue for me. > > This is already done by d893aca973c3 ("x86/mm: restore early initialization > of high_memory for 32-bits"). Thanks. Of course I only noticed this shortly after sending my mail. But this usecase is indeed broken on mainline. Some further bisecting lead to the mm merge commit being broken, while both its parents work. That lead the bisection astray. eb0ece16027f ("Merge tag 'mm-stable-2025-03-30-16-52' of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm") As unlikely as it sounds, it's reproducible. I'll investigate a bit. > > > memblock_set_node(0, PHYS_ADDR_MAX, &memblock.memory, 0);