From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id C34AA606A322 for ; Thu, 3 Dec 2026 00:25:26 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.a=rsa-sha256 header.s=bombadil.20210309 header.b=Fe4hjJ2l; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.a=rsa-sha256 header.s=20260707 header.b=Ap7xCLe7 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:Content-Type:Cc:To:From: Subject:Message-ID:References:Mime-Version:In-Reply-To:Date:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Unsubscribe-Post:List-Owner; bh=F+5Ngi9w7Q4q5SmQnzGzUb43dpEkQG/nRC1G7qCCX6M=; b=Fe4hjJ2lvK3X4wXc4ITu5j45Wi vHOtHC8S5lER7tm/PVmW5AP8axxZJr7mPrJ88PXzNh+9MzqS1N3Ha7y+WpYA09AqgkkQL0k5HUtfT qJDSbCQbsSaFvxsOp4ikKIOuRxhN/3IY/snElRoPLaBSJ+MDyUr05s1Zzf8laf+HhZ+ShKC/hlJxa 0shVs/0gu6gyE20708o7R9oN1CF/EqxAvcAQQQXXfgmqE+Nck8vwE/XWoFaG1TrtVnYuJd+g8J2eU ni3zjo3Unxje4yjYW8O5fd3Bx2IiJCI0xKPm0lAiOqXanuLGWrZ0aVwnMqY8nNYk/6QkD6Ovhkw23 AeH4E8iw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.100.1 #2 (Red Hat Linux)) id 1xYudU-0000000D55V-13SS; Thu, 03 Dec 2026 00:25:20 +0000 Received: from mail-pf1-x447.google.com ([2607:f8b0:4864:20::447]) by bombadil.infradead.org with esmtps (Exim 4.100.1 #2 (Red Hat Linux)) id 1xYudP-0000000D54g-0KcP for linux-arm-kernel@lists.infradead.org; Thu, 03 Dec 2026 00:25:16 +0000 Received: by mail-pf1-x447.google.com with SMTP id d2e1a72fcca58-89e05d31e54so9898235b3a.1 for ; Wed, 02 Dec 2026 16:25:13 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20260707; t=1796257512; x=1796862312; darn=lists.infradead.org; h=content-type:cc:to:from:subject:message-id:references:mime-version :in-reply-to:date:from:to:cc:subject:date:message-id:reply-to :content-type; bh=F+5Ngi9w7Q4q5SmQnzGzUb43dpEkQG/nRC1G7qCCX6M=; b=Ap7xCLe72aWCDo9fNTHrJGz7itwTQyEZcLZ4AsHoMtG34DLE4v6ms7Hw9xgG+4TAic CnjLpzqmcbV2Qeg6jbhe6K0gp8JOj3BKE82a4tVHAW/1W+pHJ0E1f5KqoV9bA3GMrj1e dRTx1nsQWAPpKEhbE4kd5dpIQFt+yW/+FdKKS5Xq9bomCgaH1zthkqhTIe0uy/ERtVlP G4VbfwKJOtRHL3qoKwywYtTK0T12ctNMK9zR+H/CzsW8m49RDomZLlgBt5WzfGXSA3hQ iAEnI5u1WdnznSHHpR1XWFYBdlH4zyHZ01V0PRlgfkVKHkfTgaDi/WDQ0CXj3d/ciL9y K6yQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1796257512; x=1796862312; h=content-type:cc:to:from:subject:message-id:references:mime-version :in-reply-to:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to:content-type; bh=F+5Ngi9w7Q4q5SmQnzGzUb43dpEkQG/nRC1G7qCCX6M=; b=YfEgb0vKoeZOV8GCTC4KqxXLHmR1lnLM2ctyCd59Bk+BWAolKygEIW5ju21zXh5vAS hWrRfcnQlxXeFV0buMDdKQ1SRqJ13VHTas8C8zdDaQeFYYgPEjS3+OB4HLFAKoVdyPcl JJalAWYJXJJkJFZ58imHTzg0SeUNtjHj5nWBSZEm3RZAilTHgyypVPqPYkARebJsJbrD q4gedQsm3bK83PM+Sbtmw2YLLcsRC13SiqmckPcPzxjPIj1aAU6b/0o+duwEEjT9WY8+ Te4om14uQw+t1nKXD57YZBRSlXkPwfbIxjqsj/MtdK08U33LAuLreKgbvxD2O9wNm4Wc S8Lg== X-Forwarded-Encrypted: i=1; AL+hErG9R5QXsnzFGpvLeXVJ2oISwQDI0sxv7OtQ+lw7z8/HOEyV/t8w5FdDu8iZS6D5NrSfWqWFE3i4Aks3jb1bHG4l@lists.infradead.org X-Gm-Message-State: APuU4Z8eU+N2qqaNqIc1WMr8776sCLmK3tYn6Rgkg7JlSQbvNpQmcJc6 xkRofJ9Awi0DV/Y7GzBbedlutZ5x3lCD4d0SxMApCyuErScHoPlagI82PGhPHU0yd3AMlW4B3Ae /DUrVupqeuHCrn1ZUttz7XdGIYw== X-Received: from pfoa6.prod.google.com ([2002:aa7:8646:0:b0:8a1:6f:7af2]) (user=suseendranb job=prod-delivery.src-stubby-dispatcher) by 2002:a05:6a00:2c94:b0:893:32df:ebdd with SMTP id d2e1a72fcca58-8c8792a48d8mr40145387b3a.4.1796257511490; Wed, 02 Dec 2026 16:25:11 -0800 (PST) Date: Thu, 3 Dec 2026 00:24:37 +0000 In-Reply-To: <38f6a880-b2ff-491a-910a-f003a01ca0e5@kernel.org> X-Archived-By: Mime-Version: 1.0 References: <20261202001946.1226273-1-suseendranb@google.com> <38f6a880-b2ff-491a-910a-f003a01ca0e5@kernel.org> X-Mailer: git-send-email 2.56.1.911.g883d8bcb20-goog Message-ID: <20261203002447.1164611-1-suseendranb@google.com> Subject: Re: [RFC PATCH 00/11] mm: NUMA-aware boot memory carving (extmem) From: Suseendran Bhaskaran To: David Hildenbrand , Mike Rapoport Cc: Andrew Morton , Dan Williams , Alexander Graf , Alison Schofield , Andy Lutomirski , Borislav Petkov , Catalin Marinas , Changyuan Lyu , Dave Hansen , Dave Jiang , David Rientjes , Frank van der Linden , "H. Peter Anvin" , Ingo Molnar , Ira Weiny , Jonathan Corbet , "Liam R. Howlett" , Mark Rutland , Michal Hocko , Oscar Salvador , Pasha Tatashin , Peter Zijlstra , Pratyush Yadav , Randy Dunlap , Shuah Khan , Thomas Gleixner , Vishal Verma , Vlastimil Babka , Will Deacon , kexec@lists.infradead.org, linux-arm-kernel@lists.infradead.org, linux-cxl@vger.kernel.org, linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-mm@kvack.org, nvdimm@lists.linux.dev, x86@kernel.org Content-Type: text/plain; charset="UTF-8" X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.9.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20261202_162515_115373_70736C80 X-CRM114-Status: GOOD ( 21.19 ) X-Spam-Score: -9.5 (---------) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" X-Spam-Status: No, score=-16.4 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIMWL_WL_MED,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS,USER_AGENT_GIT,USER_IN_DEF_DKIM_WL autolearn=unavailable autolearn_force=no version=4.0.1 X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-26) on aws-us-west-2-korg-listserv-alma10-1 Hi Mike, David, Thanks for taking a look and sharing your feedback. On Wed, Dec 02, 2026 at 04:45:24PM +0200, Mike Rapoport wrote: > I agree that we need a generic way to define memory carve-outs, but I > doubt that a command line parameter is the way to go. The primary requirements I am trying to address are: 1. An arch-agnostic way to carve out memory across ACPI x86_64, ACPI arm64, and DT arm64 without per-host firmware changes. 2. NUMA-aware carving without hardcoding machine-specific physical addresses or firmware holes. 3. Preserving the exact carved ranges across KHO kexec. Specifying the carveout via the kernel command line was the most straightforward way I could see to satisfy those across both ACPI and DT platforms. If you have a different mechanism in mind, I would be glad to hear it and explore that direction. > That sounds backwards to me. These ranges should not be mapped from > the start. Agree that not mapping them in the first place would be much cleaner. Because init_mem_mapping() (x86_64) and paging_init() (arm64) currently run before NUMA discovery (ACPI SRAT / DT), carving per-node in the kernel meant RAM was already mapped and had to be unmapped pre-SMP. Please let me know if there is a cleaner way to avoid mapping them from the start (for example, parsing NUMA topology before setting up the direct map, if that's an option). On Wed, Dec 02, 2026 at 04:10:37PM +0100, David Hildenbrand (Arm) wrote: > And I am also not convinced that we want more of special+weird core-mm > infrastructure KHO for ("mm/extmem: preserve carved regions across KHO > kexec"). The motivation here is live-updating hosts where carved regions back running VMs and the exact same physical ranges and contents must survive KHO kexec. Existing KHO preservation mechanisms (reserve_mem= and kho_preserve_pages()) operate on System RAM tracked in memblock.memory with boot struct page arrays, whereas carved external regions are removed from memblock.memory before struct page allocation. Because cold boot specifies sizes rather than fixed physical addresses, Patch 11 saves the resolved region descriptors in a KHO subtree so the next kernel revives the exact same ranges. If there is a cleaner way to preserve those resolved ranges across kexec without adding KHO support to core mm, I would be happy to explore it. Thanks, Suseendran