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 5B934E77188 for ; Fri, 20 Dec 2024 14:39:30 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id E4CDA6B0083; Fri, 20 Dec 2024 09:39:29 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id DFC366B0089; Fri, 20 Dec 2024 09:39:29 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id C4E876B008A; Fri, 20 Dec 2024 09:39:29 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0011.hostedemail.com [216.40.44.11]) by kanga.kvack.org (Postfix) with ESMTP id A48F56B0083 for ; Fri, 20 Dec 2024 09:39:29 -0500 (EST) Received: from smtpin06.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay07.hostedemail.com (Postfix) with ESMTP id 60FD0160A55 for ; Fri, 20 Dec 2024 14:39:29 +0000 (UTC) X-FDA: 82915594314.06.05B7F20 Received: from fhigh-b1-smtp.messagingengine.com (fhigh-b1-smtp.messagingengine.com [202.12.124.152]) by imf24.hostedemail.com (Postfix) with ESMTP id DA56F180006 for ; Fri, 20 Dec 2024 14:39:22 +0000 (UTC) Authentication-Results: imf24.hostedemail.com; dkim=pass header.d=arndb.de header.s=fm1 header.b=k1Ia4Hye; dkim=pass header.d=messagingengine.com header.s=fm1 header.b="x y94a0s"; spf=pass (imf24.hostedemail.com: domain of arnd@arndb.de designates 202.12.124.152 as permitted sender) smtp.mailfrom=arnd@arndb.de; dmarc=pass (policy=none) header.from=arndb.de ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1734705541; 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=TH0ggL15ha3cHvAVBubqS5XbrDlSBVnwD+kCElIWxLY=; b=fI6nzJiEtI8wWN1hJKyZ4RP9KkoOpHVVAt1QZeG8fp9vVKdLnudPnCHNmUmlV94MmrWCBh hAFnsVDq8o0GYa5z7GKs9TYzBfOE1HXdy3r43J0/3JrxGuAQ2DW1/Q1gSZh8Xtfro+44HS QTox36fQsXZ4e/d9uraHFehwt0z+Neg= ARC-Authentication-Results: i=1; imf24.hostedemail.com; dkim=pass header.d=arndb.de header.s=fm1 header.b=k1Ia4Hye; dkim=pass header.d=messagingengine.com header.s=fm1 header.b="x y94a0s"; spf=pass (imf24.hostedemail.com: domain of arnd@arndb.de designates 202.12.124.152 as permitted sender) smtp.mailfrom=arnd@arndb.de; dmarc=pass (policy=none) header.from=arndb.de ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1734705541; a=rsa-sha256; cv=none; b=hyWy5IP6iHD+8LTZJQMf81MbFX+CaGIycDA9skr317UWCf83Cp19m+BInOSlG5ahfDQW48 WIXwOv00ZCD5iP3Ww5dwPy+XQSzDv/jRsL0yLHHjqHyN/yG7i58oOsqdF2UBZQp29fa1qC UdNjve52dOizbzdFNGsViipWfO32p3E= Received: from phl-compute-10.internal (phl-compute-10.phl.internal [10.202.2.50]) by mailfhigh.stl.internal (Postfix) with ESMTP id 2551D25401FB; Fri, 20 Dec 2024 09:39:26 -0500 (EST) Received: from phl-imap-11 ([10.202.2.101]) by phl-compute-10.internal (MEProxy); Fri, 20 Dec 2024 09:39:26 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=arndb.de; h=cc :cc:content-transfer-encoding:content-type:content-type:date :date:from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to; s=fm1; t=1734705565; x=1734791965; bh=TH0ggL15ha3cHvAVBubqS5XbrDlSBVnwD+kCElIWxLY=; b= k1Ia4Hye/+r3OslBAM1Nfg4JNNP2wAGtX/h2mle4t2Rq9CXKP1sZZqcdnzMvUyqv Lx4M1XJ1y7rghBiGweJe1Rizz0401DVg9Reg/kR9VtnVAuDH9LO//3KL9wbR1oJV 8mDmDSbB8h2yIEfqH6BrzYE+7v/ZX4Ujywbyw262LZpwPrqmOiaIdh2jj4QpFxKP Lj8JXV1jsLJmHiuPzNriKzUm+0vdMvynmUvcCHFtmRdRQQmfTClRN3ynH3I+FkNv AV7kL7QWZdYgw38Yejho0v8o8tX5s9e2Pmnft92daOQzupRGKXX5+FS8EnwRGE67 UY0B5XnSLx6LzACPgBu0Vw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:content-type:date:date:feedback-id:feedback-id :from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm1; t=1734705565; x= 1734791965; bh=TH0ggL15ha3cHvAVBubqS5XbrDlSBVnwD+kCElIWxLY=; b=x y94a0sw0ybcp+11dExMmj+RMTfxpSykhQSEb2K/+wAL9Khl1kMAxQRB2HKczfN75 NKRw6eJLM21vQjChucba3QPltwOtTbc5tLG8oWjz1P16uyl8+h0iZ7p1XSjNlI/R cEaDHkmCfywffhueszbdgMMKsRouwm5O7hdK5xwdFOClqbUihxkRuwVL5/btrxUB udczGFjAaht0wbHNupaLet9fRmStlC8RnQSExy2URKBVLn0l67ddq2UiWHoATJzH Bz/hpVCsIZYwWr5Gy17IB/oHyGdTqIEHVrGhf8AjmeSl5XtmTMHrulQpD0reycsD lgjHelQfiJE/p6s1On7DQ== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeefuddruddtvddgieegucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdggtfgfnhhsuhgsshgtrhhisggvpdfu rfetoffkrfgpnffqhgenuceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnh htshculddquddttddmnecujfgurhepofggfffhvfevkfgjfhfutgfgsehtjeertdertddt necuhfhrohhmpedftehrnhguuceuvghrghhmrghnnhdfuceorghrnhgusegrrhhnuggsrd guvgeqnecuggftrfgrthhtvghrnhephfdthfdvtdefhedukeetgefggffhjeeggeetfefg gfevudegudevledvkefhvdeinecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpe hmrghilhhfrhhomheprghrnhgusegrrhhnuggsrdguvgdpnhgspghrtghpthhtohepudei pdhmohguvgepshhmthhpohhuthdprhgtphhtthhopehjsggrrhhonhesrghkrghmrghird gtohhmpdhrtghpthhtohepmhgrrhhkrdhruhhtlhgrnhgusegrrhhmrdgtohhmpdhrtghp thhtoheplhhinhhugiesrghrmhhlihhnuhigrdhorhhgrdhukhdprhgtphhtthhopehroh hsthgvughtsehgohhoughmihhsrdhorhhgpdhrtghpthhtohepphgvthgvrhiisehinhhf rhgruggvrggurdhorhhgpdhrtghpthhtohepfihilhhlhiesihhnfhhrrgguvggrugdroh hrghdprhgtphhtthhopegrrhgusgeskhgvrhhnvghlrdhorhhgpdhrtghpthhtoheprghr nhgusehkvghrnhgvlhdrohhrghdprhgtphhtthhopegtlhhrkhiflhhlmhhssehkvghrnh gvlhdrohhrgh X-ME-Proxy: Feedback-ID: i56a14606:Fastmail Received: by mailuser.phl.internal (Postfix, from userid 501) id 5AF242220073; Fri, 20 Dec 2024 09:39:25 -0500 (EST) X-Mailer: MessagingEngine.com Webmail Interface MIME-Version: 1.0 Date: Fri, 20 Dec 2024 15:37:30 +0100 From: "Arnd Bergmann" To: "Russell King" , "Sebastian Andrzej Siewior" Cc: "Arnd Bergmann" , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-mm@kvack.org, linux-rt-devel@lists.linux.dev, "Ard Biesheuvel" , "Clark Williams" , "Jason Baron" , "Josh Poimboeuf" , "Linus Walleij" , "Mark Rutland" , "Matthew Wilcox" , "Peter Zijlstra" , "Steven Rostedt" Message-Id: <41427a05-f032-4713-812d-7f8a021067d8@app.fastmail.com> In-Reply-To: References: <20241210160556.2341497-1-arnd@kernel.org> <20241210160556.2341497-3-arnd@kernel.org> <20241211134811.wM_UADhQ@linutronix.de> <20241211140402.yf7gMExr@linutronix.de> Subject: Re: [PATCH 2/4] ARM: Disable HIGHPTE on PREEMPT_RT kernels Content-Type: text/plain Content-Transfer-Encoding: 7bit X-Rspamd-Queue-Id: DA56F180006 X-Rspamd-Server: rspam12 X-Stat-Signature: st16j3tz6nnoxkw19x4iwdzpm6pdcg3y X-Rspam-User: X-HE-Tag: 1734705562-598760 X-HE-Meta: U2FsdGVkX1+kisV0LyPJsUBPfxGY/rDiMhyFwxAir8wWIIO8WWkSvZ9P1/PN27hxJnBSS/KHIa+yRTPS5SJln+M8girl9+MdKXgBjA/f3A2+pu/xq5P2B3ejPyj4SBkRSfNtBHWH7VnwVv7bqUoQZJHK9wp3gGu5i1xH6S3Bgt4zvyukIJSBf8DfSjWIs/EZ+TaLsQNDk8W04f+Wzzjz1QiAivYdPnrNHOT5wKP5FVIdLg4ClsvA9TOuOzaCpd69UWbHf/+0U2DfgsuTZlK9jlwzEjDdAv+TTsskwdqsFIs8FFGBE5sWrZYMiix5d51Kt1y85bBvrceNyvfOu9vHgYHiv+UkeFe5SzbQz7LnGej6Xmo77wiNIqu6swtTw3vAB5zso4VDhorrR0/gV90Ar4eCVSUqg4XkCsXbKJZmW4HQ/0bcNfm5IALqEdGnUYgWU2WBONjZqmv/JSS4aiZ9wWjhKFd00GUGbLpIcPrUKkdRJVy9dM82H45hrInRuYIlb+OC6qj3Z4zHMl4QV1p7mXMZlPo5NFNoAU6DCr6u5bmXqeuhW2cykIHZrOhm6FBe+B0ZllmQJvs+jbaroXnYD7NhMZZOqus7QXI5QeTUqhmSBGpHeJ5WTsOaHY+TrZm8XMbLpgo1LD5ox/k+Nt4c7VcEOq1lDaTzoAsizBhd2WAqqVZLySj9ZHH/2QqBzXxToRvqTzfR+/0hv6y6euiypYH1qv/GJgXJkyoZ5MEJeZ2nE07m4Qns+a6o2ILm0MF9Q+/a6K2t+Ws9Kun+/+yGTzaVJqO58t2BsU4daNASg3Cc+YUR7UPmfV99r5t1mLF2UkZSA7LY2i1hl/RXnqdDIPt152Ycp4j2OxFTwGkxv8Yd66zFTll9p5Rza/3s6RWbrHwq/uJCLvKBJ4t4xmMv+wA68KWnmG+e2LpOSos09mLkBcgQkm9+LI1+FisqvHtgHx3CnJCdZefbf4Xlz1/ aAbVZq3a 6kmCa6aoV1KB5g1TW9O/TaU5w7+CToRbZgD9ixOirw/kdT+iTE3KQvaXSeO3tmz7z9AJHqX34ME2onfArE7PvtLHxRq6vg8f+a6Z4eNzxcUULGRKwWc2tpzGXbSP0pabjNlfJCKzlNFUnTsMAEER1weOn6MNzNfOCnFLzM3Zf7dnV0xyq+cM+l7xDTEZIV89aVHFvV7s43g+aELsimbgDZOBgUIXKC2xjV2dkgGTddLxMVESzUoRRPPgzeWMmVkgw/BW7knRRHf823eRb+5Buk7uvRQ== 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: TL;DR: I would still like to merge patch 3 and 4, but let's keep that separate from the RT patches. (just realized I had never sent my reply here) On Wed, Dec 11, 2024, at 16:55, Russell King (Oracle) wrote: > On Wed, Dec 11, 2024 at 03:04:02PM +0100, Sebastian Andrzej Siewior wrote: > > However, what is quite different is the L1 page tables. On x86, > everything is nice and easy, and each page table is one 4k page. > On 32-bit Arm, this is not the case - we need to grab a 16k page for > the L1, and the more immovable allocations we have in lowmem, the > harder it will be to satisfy this. Failing to grab a 16k page > leads to fork() failing and an unusable system. > > So, we want to keep as many immovable allocations out of lowmem as > possible - which is an additional constraint x86 doesn't have, and > shouldn't be overlooked without ensuring that the probability of it > happening remains acceptably low. Right, non-LPAE systems indeed have a bigger problem with fragmentation here, I hadn't thought of that. Most of the systems with 4GB RAM (and all of those with more) support LPAE though, which means they can use the same page table layout as x86 when when using CONFIG_LPAE=y. Almost all SoCs prior to ARMv7VE are limited to 2GB of RAM or less, the only exceptions I can think of are three SoCs that can use close to 4GB (a small physical address range is used for MMIO): - Calxeda highbank - Hisilicon hip01 - NXP i.MX6D/DP/Q/QP We can throw the first two under the bus, I'm sure nobody cares enough, but the i.MX6Q was actually shipped in a handful of products with 4GB that some users still have: - Bunnie's Novena Laptop (856 original backers on crowdsupply) - Solidrun CuBox i4x4 (not the more common i4P) - Solidrun Hummingboard (early revisions only, later 2GB) A couple of other i.MX6Q boards were advertised as supporting "up to 4GB", but if you tried to buy those, the only ones in stock anywhere seemed to be limited to 1 or 2 GB. Examples: - armstone A9r4 (dts not upstream) - DFI FS053 (dts not upstream) - VAR-SOM-MX6 [Part of the problem here apparently was availability and cost of qualified 8Gbit DDR3 chips.] Do you know of any other SoCs or boards in that category? My feeling so far is that none of these are show-stoppers: - The 4GB/8GB boards with LPAE don't have the added problem of fragmentation with order-2 page table allocations. They can run low on lowmem with CONFIG_VMSPLIT_3G, but as Sebastian cited, HIGHPTE is not likely to be the breaking point for them. These were mainly built around 2012-2013 (before 64-bit became available) as high-end SoCs and are reaching the end of their commercial life. - The 4GB boards without LPAE are also 10+ years old by now and were fairly rare even then. These would suffer the most from the fragmentation though. - The 2GB boards with or without LPAE can theoretically avoid HIGHMEM entirely by using CONFIG_VMSPLIT_2G_OPT. These are still very common today, but at least a third of the total memory is going to be available as lowmem even with VMSPLIT_3G. The case that is less clear to me is the one where memory is sparse enough to lead to exhausting lowmem without having a lot of total RAM. These are a little harder to find, but I think e.g. Renesas has some chips that need this, and Realview PBX had a custom __phys_to_virt in earlier versions to work around this. This should be solved when we get the "densemem" support that Linus mentioned. Arnd