From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=209.85.210.200 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796257513; b=K2pOEGDK6avgn2wiiBrmwsHM2nbQwKjKnuhrmlQjy7KROADDsVxNg3oRFiRnspRCIMbq qz66fO/BTh3W3xJtpHGSYg27nRH51bvmpUguXryR9tGFh+jexnWUBkPDla+SkdckerakL kgPrlbqg7qRarFYfcub6zBQfbCWsn7xOhhmHwPauCGv2R4MC8xo7xPY4x3/SRs4tM2io3 t5TNGVATyrDxgff5w4el1fF6dDVgzw/sNY2I1UInNyWRbB4bTKRCdNeZxZ0op3WKC4ybu PncqNIa/BJB7cv1WdhzjCirX1QuJ9HL62uEOwewjSkDh2JyehFHIWY0Gik0cQACFnDw== 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=TvydPu5jkA/KjROpC3kRKZhX21BoPYq048Ea41LXVy2DxWwNW3FQByhYT3ZUOd1XSYtT 7rJcCgLtHEGMzwG8b+LA1pt/SCFusqljOsqdltWPOOognVRk86xec9FxW764xiDKCjWnI tcpPyo4TsrXvofwO1PjCYp4AOKQMrICccVHZ1P/M6zOdHPojikNik9fGhnTlXQk6IMD16 Xu1P3exWPlwX3W9hy2hx0hhSBkpVHHUYtFh1tb5AmSgE4hiilL/tcmsqD6ToEPxp9M0p2 BIpfoym5txHmpBUyu+V+m4I/rQM70zq0oKVSvdeiOnpc/TgfLyELnmJ8IfEACwI7Wxw== 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.200 Received: from mail-pf1-f200.google.com (mail-pf1-f200.google.com [209.85.210.200]) (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 A5963606A32C for ; Thu, 3 Dec 2026 00:25:12 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org A5963606A32C 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) header.d=google.com header.i=@google.com header.a=rsa-sha256 header.s=20260707 header.b=Qc33hpPM Received: by mail-pf1-f200.google.com with SMTP id d2e1a72fcca58-8a0619b1fe5so11179418b3a.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=YPu8l0suY61N72chLisiy1JSHYtNEQcAiKPYwLzc/b6W9aCMviPFIYd3l6FjYBcWSs WrA2uruT8Z+vZpjOpK1ea6MLrCglKTpyScWyB8+jWnri3Hyckw4VRoA43VhYzbZUUHB8 mz+/9EtzIul6lN5ftECOYks/kgmG7hdlbnjNvEdj96zbwY7vlCx2vvdSQi/VyboJCPbu 9fOpNSGOAemN6deSIOjArRg4HAEu61N80HFt++gTDSpzlqCDN3zDlKqG4PWyZhO80R2x HYdE0OzXXZfRh2ISqczJR+B5ZWi4HQK4FHa3sAEZK6eGe4gnFtitsWZd9q8jNyfU4/lo kZUA== X-Forwarded-Encrypted: i=1; AL+hErHXXwyKce6QJVzG0WFGRqHyZ/6aT6hzO8iZGcDBaaPQB5hkTt9hdrBjQxvLg8jqhNyT1RB4aP8O/8w=@vger.kernel.org X-Gm-Message-State: APuU4Z+Xti2D93iEc1dcislTaflcTwvGamo6kuYNuXCrFjha4WP/CwEl X2Z2R4XKbk6dyEd4opjpehb2Bt60188QXVkqkZnifQ4ox3FbFUrwUtfzLmQv08AguVXHsMZSxVs aNdg+pt9tmzTh4LTqguTLzbat8Q== 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-doc@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