From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=209.85.210.199 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796257513; b=RDdnAZ1qtUQsNHdbCHDBDC91+dgsPMLRwypxoL/uAK8MZV5UFIuOJnVipa4C2maOKyg5 owK8cH1NLDeXE0GIsF6hdDws2l38RdLR69Ql8tA6FLi5CMyGzzxP2vDRJioMjh26SBoEH SLK+uI/2nARUlIReudBTJ4iOVx6OgNwrqlvDSljfVpBiD8bcoM1Hw7m7PXwrqoV5jh3rq PeRMHdPzdHy7B0ycewvEl/t8cDlsXAKaemb/GQ3XOp5ktg3qIODbJKxIx3+EvuqJUaPVC 5Psb9Fv+9Pptm0qAf8qB6VPUvY+Yf5vMFo2aeAcU5ZSn9qkfp1QIcASNH9bKGXtm3Og== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796257513; h=DMARC-Filter:Received:DKIM-Signature:X-Google-DKIM-Signature: X-Forwarded-Encrypted:X-Gm-Message-State:X-Received:Date:In-Reply-To: Mime-Version:References:X-Mailer:Message-ID:Subject:From:To:Cc: Content-Type; bh=F+5Ngi9w7Q4q5SmQnzGzUb43dpEkQG/nRC1G7qCCX6M=; b=XTghWo0Mp87nTGvQnkSHSDI5eAz3PAmQpn7W9rCU16RzRLjUDNO9/GkpVq4HrEVDX334 ARO++hU24haHKxCAaZ2DcjjoSTTHhtA3jWfJFQ4mvwVt59P0hBui29eTh8rew2+5I6/gh A+j+OFACYpFXoSAQIOvX4cTDq+FmG5nhVxA3+FG14n1SeLqBHQzly88wAqs6Nv4OVmsDM 3u/GU51FLn2q/qFl4d4DjGe247EDWVaxAq40n9K+pB1s/tYyhUSqi+rflGw03+vEHb54d +s68A0vnMZXA6KFLmCzknj4MAJQStdCVl/V/NoDEUyVf5UqicMzzjIG8Le02yGy/hNA== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass header.from=google.com; spf=pass smtp.mailfrom=flex--suseendranb.bounces.google.com; dkim=pass header.d=google.com header.i=@google.com header.a=rsa-sha256 header.s=20260707 header.b=Qc33hpPM; arc=none smtp.remote-ip=209.85.210.199 Received: from mail-pf1-f199.google.com (mail-pf1-f199.google.com [209.85.210.199]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 9F6DC606A322 for ; Thu, 3 Dec 2026 00:25:12 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 9F6DC606A322 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=flex--suseendranb.bounces.google.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key, unprotected) header.d=google.com header.i=@google.com header.a=rsa-sha256 header.s=20260707 header.b=Qc33hpPM Received: by mail-pf1-f199.google.com with SMTP id d2e1a72fcca58-8a0619b1fe5so11179416b3a.3 for ; Wed, 02 Dec 2026 16:25:12 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20260707; t=1796257512; x=1796862312; darn=vger.kernel.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=Qc33hpPMX/AuMtfePlZg/qFYLi+oncWtZ/re/X1tpssntEVyL9BqrxSJdREvWlwB04 RCW4p8UVENtETwBKT14k/IVr5HzJSDDYHv4DOD/IOfMV4/+/d36KNSQbsc+oMXInscR4 TWDRmY1L1Vyud7mZ8dZ2V4F5lh4h6RqksnZOtuNmbexgZCUtWfB61ollQlvN01jfEzP7 z6hnBEl0bpcrSqPdtlFddhZ52fiRoeqHe2weokbgxMetqxCpt5LjjJVTHSxOHPmtTobN qKiM6IsLHEz5GeNx1EnT5J1tFWZiBw7F83oIvrZlexls1AhJ6dVHZ4JN9881xf1s6q4g 9+wQ== 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=09mXhDJsUSPGmgGVGNPjAq8d4eZ9Xzri8ZQF8yj21NQF2htOVOzYC+VCxjszX/Q5Aj D3KjKPq+VEMrj04o7u+oL3xKJwpis9dSPc+7CHH9d8AS4VZZm1y67eAguwq6hbyxGjaK bTo9D8gG2reswqt1wfLJdmbw4dSgxbvwtrkI+88lyU943US7vr3Q0FHA9fPJ2XvmdNBC I9+TDdq02np+GEALhDAl53X2lTvneHk/beePRfQa4eN1c+tfub2CkZrczSQCj2RupeMw GwwutH6kO9ToZjDeG3SD6dt6RihpehK6mSL9Jo91bY6h2vS/6XypaJhFLu8+pN9hU9L+ TJcg== X-Forwarded-Encrypted: i=1; AL+hErHnJYkpUzrj1WJGOwp+KQugFnDcmFqpmNRsJA3s2sH3YTPV6PeNAQlmDkVRD9HNFzxoU+Czw+Ycl9EqMlw=@vger.kernel.org X-Gm-Message-State: APuU4Z8Oknfr1M71bg/gahqNQ82TSR+/2ir833uhpYVWXybLOsk3qp4K +TG3MUQ+0rPs9SjkiWlRfN17f8PEayJHkQfycgoWhVRui6rcJprT61gz9uU5AhKUokb3AyNX1ft u8bV1U9fZA2xu1g8NSezwS8LuXQ== 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-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list 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" 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