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 31EE0E77188 for ; Fri, 20 Dec 2024 14:31:09 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id A4EB46B008C; Fri, 20 Dec 2024 09:31:08 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 9FE516B0092; Fri, 20 Dec 2024 09:31:08 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 89F4B6B0093; Fri, 20 Dec 2024 09:31:08 -0500 (EST) 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 63FCF6B008C for ; Fri, 20 Dec 2024 09:31:08 -0500 (EST) Received: from smtpin18.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay04.hostedemail.com (Postfix) with ESMTP id 11CEC1A0B4A for ; Fri, 20 Dec 2024 14:31:08 +0000 (UTC) X-FDA: 82915573860.18.E4B6EB4 Received: from fhigh-b1-smtp.messagingengine.com (fhigh-b1-smtp.messagingengine.com [202.12.124.152]) by imf30.hostedemail.com (Postfix) with ESMTP id E134380019 for ; Fri, 20 Dec 2024 14:29:59 +0000 (UTC) Authentication-Results: imf30.hostedemail.com; dkim=pass header.d=arndb.de header.s=fm1 header.b="Wz/KG6IZ"; dkim=pass header.d=messagingengine.com header.s=fm1 header.b="T N2RLaN"; spf=pass (imf30.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=1734705030; 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=gsmKBVKplqHqzj+4kwJxOm//rkER8jse8Kuh1bXyrIA=; b=FV20PvmxvanOhmBSqGc5wBwHr7WeKaP11osvWsrpTl8AhLQIN/60Z4Cxcag2j55hUodTfi RNFrd4/mDIEIXWwiUQZoF2w8gXsqUM8wPYnr1sxLG3l0j2UJUw09TvARPeg58pk2ctSpDD LgQaVsIg0TcWLdw2RLW7EOon17dd8hk= ARC-Authentication-Results: i=1; imf30.hostedemail.com; dkim=pass header.d=arndb.de header.s=fm1 header.b="Wz/KG6IZ"; dkim=pass header.d=messagingengine.com header.s=fm1 header.b="T N2RLaN"; spf=pass (imf30.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=1734705030; a=rsa-sha256; cv=none; b=jDbUlO7wb5nB8N5OGY0dtaBhhRT84zbGGIlOzfw09iTvfb9OerFqxltSsGuKbb0fiTUGnj 3+Dx5CML4luMKjS3pcWknS2GXlvNsAGv4LOr8ruReEqd/sk33UFTPy8z9k9dImYL7bUU+w 18pEGd7Legq6YeU1AtfEbSFkAsvPBBc= Received: from phl-compute-10.internal (phl-compute-10.phl.internal [10.202.2.50]) by mailfhigh.stl.internal (Postfix) with ESMTP id 2341725401DE; Fri, 20 Dec 2024 09:31:04 -0500 (EST) Received: from phl-imap-11 ([10.202.2.101]) by phl-compute-10.internal (MEProxy); Fri, 20 Dec 2024 09:31:04 -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=1734705063; x=1734791463; bh=gsmKBVKplqHqzj+4kwJxOm//rkER8jse8Kuh1bXyrIA=; b= Wz/KG6IZ/dI71kGCo09p2O1Y24JF9NKrY6IZXMuv4krvKjUZPAxvEirTZ72N9xpn hD+my3AjjxAWmVooMkf4EgMj06pToN3Cbhhzy8rgJ+zQmabEkneYFpZ8vGkoWnYc E/GUaDG3UFRXa3Eq79aWbsutbagylNeGLKpkKJjmjgJJOnxAFGUGZ1CAyAGrCtlF xt7wCh1x7bIgyoMtRUWuinLGiUtEWOLPEL2C1oKoFqiehueGE5RtUTxed2UYLm3t pzD+0V3mBK/PwN7as8kM9zOzz52pgeXa5opCfp3Dv8pk8k4IKlCajuaTbrSnh1QS tAb1Xk8CMKBGfIjA8FVuLg== 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=1734705063; x= 1734791463; bh=gsmKBVKplqHqzj+4kwJxOm//rkER8jse8Kuh1bXyrIA=; b=T N2RLaN8UW65kC6uLcHIcUsQ8edXE98oo6VLjZGZvq2ztrTINd2MXbWLsFKJ03Ywe lXlz30Cr901fghAQx9FMYxqh+BVEo4Ci3umNWR5pxr7mcIIDtEZniUzjy6aepREV 2g54SkEJDk44UDMUrvumfLHKyLrwxkQJcGTz7HZYJxkoXxtD73xffW6YcVDl+kJn uEZNOiD1xf4Q0RRLpSZe5/M7mBDFjAleaLSqSdhS7u3puXs2ue147jU6Hi4e0b4b nZCvWr1PRtnPqt5/qMZHnQI0S8YVweVGJ8qE+a+4HfVQH7oVzb9oPdWZaonI54Ql cxgzcEGpZE5sGcMinCiYA== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeefuddruddtvddgieefucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdggtfgfnhhsuhgsshgtrhhisggvpdfu rfetoffkrfgpnffqhgenuceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnh htshculddquddttddmnecujfgurhepofggfffhvfevkfgjfhfutgfgsehtqhertdertdej necuhfhrohhmpedftehrnhguuceuvghrghhmrghnnhdfuceorghrnhgusegrrhhnuggsrd guvgeqnecuggftrfgrthhtvghrnhepvdfhvdekueduveffffetgfdvveefvdelhedvvdeg jedvfeehtdeggeevheefleejnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpe hmrghilhhfrhhomheprghrnhgusegrrhhnuggsrdguvgdpnhgspghrtghpthhtohepudej pdhmohguvgepshhmthhpohhuthdprhgtphhtthhopegurghvihgurdhlrghighhhthesrg gtuhhlrggsrdgtohhmpdhrtghpthhtohepjhgsrghrohhnsegrkhgrmhgrihdrtghomhdp rhgtphhtthhopehmrghrkhdrrhhuthhlrghnugesrghrmhdrtghomhdprhgtphhtthhope hlihhnuhigsegrrhhmlhhinhhugidrohhrghdruhhkpdhrtghpthhtoheprhhoshhtvggu thesghhoohgumhhishdrohhrghdprhgtphhtthhopehpvghtvghriiesihhnfhhrrgguvg grugdrohhrghdprhgtphhtthhopeifihhllhihsehinhhfrhgruggvrggurdhorhhgpdhr tghpthhtoheprghruggssehkvghrnhgvlhdrohhrghdprhgtphhtthhopegrrhhnugeskh gvrhhnvghlrdhorhhg X-ME-Proxy: Feedback-ID: i56a14606:Fastmail Received: by mailuser.phl.internal (Postfix, from userid 501) id 063E02220072; Fri, 20 Dec 2024 09:31:03 -0500 (EST) X-Mailer: MessagingEngine.com Webmail Interface MIME-Version: 1.0 Date: Fri, 20 Dec 2024 15:30:41 +0100 From: "Arnd Bergmann" To: "Linus Walleij" , "David Laight" 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" , "Mark Rutland" , "Matthew Wilcox" , "Peter Zijlstra" , "Russell King" , "Sebastian Andrzej Siewior" , "Steven Rostedt" Message-Id: <4d8ee82a-b767-4c3f-9735-2a1e0f6bbc8b@app.fastmail.com> In-Reply-To: References: <20241210160556.2341497-1-arnd@kernel.org> <20241210160556.2341497-4-arnd@kernel.org> Subject: Re: [PATCH 3/4] ARM: drop CONFIG_HIGHPTE support Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Rspamd-Server: rspam06 X-Rspamd-Queue-Id: E134380019 X-Rspam-User: X-Stat-Signature: o71568t4igb9qbsdas7df8r8cshw1sf6 X-HE-Tag: 1734704999-793599 X-HE-Meta: U2FsdGVkX18/kGAg4izW/V6uf6GhpzvwrAQZ26a77sfvm9vyeL0mo+UNWpUqvNXl5Czn1u4AaDDNXSfkEW2/3TN55F/33gVp8WKihsPbvsF+PnxjRn2D7JeWbQHqFGs940CZ0jNy8EvVGQhd+JvIk8Gq0U3ZflTQ3uu4RsCF5XLJkWrhcnk1R7jBUkMr0wT3uOoUBT/HF3uDW810HMWvjBG8OCayy7AIzhpvHf+zVHvQccJgm7d67lrIsOAHiMq1n9kzPMNh5BmMkQO3SAsNZc3gt3BGsL8GzqMqKHJAe/KX7+lfY9zqP0gTLYlCL6jKMx5CDmTyAZkhzj7jiLQj4Wc1vElLYf3jluufqi5rDS8C47fZxewFxV0eaLpk5MUGg33/oE+e3TgDScwiBMwSo9MFxGpo/9Y+GJdd0XTtl+s0hSqntuupD4sZr2eOfC+wG+0mSJdSvmU9cWKHRctN9FYCQHaXFihsRzFmnY3GseW0G38fCtG5OfIYZ0hq6uQD3f+FyXu8IzvZeBSegEjBQKn1XhzwMBh4sNcMxCFETFK17r9ELScHqRvDL8+V4NAncUSGs7ajVf2+w6z2NnLUxaBQ8OIndZFDHYsVGE1C8DzIBeZQE/WqejdC3IIHP96hKEGIwNiuj+Oc4lBoBRurW59Aj+yHDwhw2o742lThdVQANZ8zHRlOthNSM4fZUr4/PwVlZ4e5fY0GdPV4NBRavpXZ3UiQvopemGfsjwz8O5/d3YH/z99woOh00VQ4pMfeGrDKge8NoE6Ae0qFaVtEVcIw2n6gPAZP8swShRsS7ZrtRCk4g5p9fLuBoBBpOANKktKfQpqmpgjbefYAzFWPhTFYK+gHwl5D5AFNURb4KdeCGFt4dMtVQURtW+Wvl+0a0fQNMIRbExl+BCWuEUt+qxH0OzTUjMM9j+S+CeDe5gO1YdEFQ21XbsGpsFAe00GylBYJbmSKefQ7XsAcsVU TGPtGvLV F2ZWaD0/SCJeziiaM3M92K9wjyDzFWK2nE3njLbaf3gWzUzFsAsK59zpugeajPAKf98u47b1x0okh1wDfREUR7OxzW1zmuSwPHig9veWwxQ9uZ6/g4H4ntdV5O7bo3l8WIiAJz9qDfMqvHgjpFCmZGrATp347eBPPQs6ejrElQcEx9ljjCrKyY6Hk/KkipNlVxuULuSzVxYeTBW/syzCdCSh0oxLL7sHe6lsJE4efWVVCkt7xwr0t2pCp1SmJ3yjHlkczePto5rafVEje3IiiKZopzkTmYByUCe5mEjop0gtrY0SCYykL0SRIftyw+2j6QDz0LYXgYZtDVDnnOZW70cUns/2ySLQG85HHppAjispk915q0eSHqLvQYmAmiBOUAaYwfZf1Rlxgzt5Ws/gHg2uA86p66pAUZ4YvwjAsrqMyYiI= 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 Fri, Dec 20, 2024, at 14:10, Linus Walleij wrote: > On Sat, Dec 14, 2024 at 7:41=E2=80=AFPM David Laight wrote: > >> From: Arnd Bergmann >> > Sent: 10 December 2024 16:06 >> ... >> > Since Arm is the last architecture remaining that uses this, and al= most >> > no 32-bit machines support more than 4GB of RAM, the cost of contin= uing >> > to maintain HIGHPTE seems unjustified, so remove it here to allow >> > simplifying the generic page table handling. >> >> 'Picking at nits' 'highmem' support was needed for systems with 4GB o= f RAM >> in order to use more than 3GB or 3.5GB (depending on the bios) because >> of the physical addresses that are reserved for PCI (and other MMIO). What you mean here is CONFIG_HIGHMEM64G on x86, not CONFIG_HIGHMEM or CONFIG_HIGHPTE. > Wow I didn't know that, there are so many reasons why highmem is used > by different architectures. > > On ARM it was originally added for a certain Marvell system with > a mere 2GB of RAM: > commit 053a96ca11a9785a7e63fc89eed4514a6446ec58 > > The reason was that since the virtual address space is just 4GB and > we have reserved virtual kernel memory from (typically) 0xc0000000 > only ~1GB can be linearly accessed by the kernel (actually less than > that). > > This wasn't a problem since no ARM system was using more than > 1GB until Nico ran into it. > > So the ARM "high memory" is something to do with virtual memory > size rather than physical memory reservations as in the x86 case. HIGHMEM works the exact same way on the major 32-bit architectures (x86, arm, powerpc): With the default TASK_SIZE and PAGE_OFFSET of set to 3GB (0xc0000000) you have 1GB left that is use for the linear lowmem and the vmalloc area, leaving between 786MB and 900MB for lowmem, unless you shrink TASK_SIZE (CONFIG_VMSPLIT_*). The most common systems (Intel Pentium M, PowerPC 74xx, Arm Cortex-A9) have a 4GB address limit and have to fit both RAM and MMIO or PCI into that, which is where the 3GB (Pentium M) through 3.9GB (i.MX6, Calxeda Highbank) total-RAM limit comes from. The 4GB physical address limit is broken by CONFIG_PHYS_ADDR_T_64BIT on some x86 server chipsets (Serverworks GC, HP F8, IBM Summit, Intel 450GX, ...), Arm Cortex-A15 and PowerPC e500/e600 cores, which gets you to the point where you fill up all your lowmem before using all of highmem. HIGHPTE was added when x86 servers to to 32GB, at which point the lowmem is mostly filled with page tables for typical workloads. Other architectures (mips, sparc, arc, ...) have some but not all of the above, HIGHPTE was only ever a thing on x86, arm and frv. Arnd