From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=209.85.161.71 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796317341; b=3xBUjkxGuXa2jtgkoa4thjQnEazvS/qFMx8p4ieecXNHV9wZXaAfte7RF5+3cjZIAYWV xDCxRGrl2GjCXlgnGFUi+tNojeFVFxRpY02ZBb34WMI5FvkXSawcRY/WQSWP/+hpNzqV5 QlkxuROX9iCBGymkkuFZPAMMquVac87FMKshRubZ7YIwFaHlWg61kfB9Efjcbd/o1qfLw SflDGXJRj1ProRqi+pH/aNP2MokUClIg3/mCVAlZEzX8I+aBlgTIHwAjx1ffYxr2BNBXR GVIn8BZN5fdNeYB9n8311xHi5p7DtAlgJCiuI8cpFvYgte6mrFyhso/7ClSfKViKrkg== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796317341; 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=D087ZCYjlYVMs+4aSwyHru0jvEINoAAdrZKjRL9oSMk=; b=kkcWkYgdjavIvhlAFAJXfGikMk05uc3rX+NYbEWzYeskXpA72oIs8zF0YEJvOdeA86AC 6uVZXl1NIgU3CdryKhSdFN0LIj6D/4dLsrf/nelqySvZJSqURXhU3yRVyNKNNVeaf6ojm 5kNpXsn/zjIxHaIGnXfETYrh6OtCnD1w7Gg/TaApeGNbrPTzU7YRKkncZZkXnVWyVLZ4s eYelAJWkLGt8AYSWAFc4awzX/x/TlgG1dR0utq6xrSIGAp4HtYNhrp5/0snFq0yc7Oek6 c/oUEftvHN1hqx3E/AxjaM/wJWgkS1m3kZS7WFnR1BC8NlS0XjxhZGWBlHGmPRhZ05w== 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=GdFb4Mbw; arc=none smtp.remote-ip=209.85.161.71 Received: from mail-oo1-f71.google.com (mail-oo1-f71.google.com [209.85.161.71]) (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 AB0DE606A322 for ; Thu, 3 Dec 2026 17:02:20 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org AB0DE606A322 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=GdFb4Mbw Received: by mail-oo1-f71.google.com with SMTP id 006d021491bc7-71addb06a78so14948497eaf.3 for ; Thu, 03 Dec 2026 09:02:20 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20260707; t=1796317340; x=1796922140; 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=D087ZCYjlYVMs+4aSwyHru0jvEINoAAdrZKjRL9oSMk=; b=GdFb4MbwjcUQFNs9/QAS5GILHmBZMWsdKIyLn24vGCuIO+a9W+9yD+rKOQINpv3R5j tR+VT6WKnJ6sR/eGBT8VnTqVcqhnsWaxM3Rdn3aBy+I++BHf8xNW7q2FrWuNQbWgrL+Y dcViAJK7JsRiZE0Ofp6y3r3I1iclyMxouwz75EpRu/L0mvO5LGzUwXK43GR6dCXAaeum 54uadt8TVxHKI5aDrlOigpM3IWg2ayoqegeuuAnE3UAHS+98uQIwdXlpRptDsaZ3H63R neT3071+Nbr1aLdBhqKqpolEJKIs/p/SHY6VUbHM5lKDIpsFimm+je4tlfUjQR7xdDCc DPFg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1796317340; x=1796922140; 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=D087ZCYjlYVMs+4aSwyHru0jvEINoAAdrZKjRL9oSMk=; b=efPjPrbCQSJv5RMLk/eWewMivgsQ9RRzvd3n+cqWUGNqO3zkdCS3d/MYsJHkmTKXht 8GWzObTxTusmJwvy7yvpFHG37BBNwlSumDID8RI6moSLbsv8IsrHlprB5iZp4Z4SWB4T yZS87pHvZd4rRwcGT5/ObPnMV/7BYxJzHYW3XICf5BOWQoX/q7JBkCIQe1dKQ9L8nGH4 a2HDCya2jXAhX/QDlE0eYVZ2hV5GBHbclIkOFx0BzHNAfK2AWzQbT7KIqQieog4rbtXf Rt9FFgHbHTyZcV/uuodsq4BviKNT42JiGMtYkfHDfYUk9Ce1yu1JI50d/1I/KStdXAD7 EIxA== X-Forwarded-Encrypted: i=1; AL+hErGMRT9SZcKrd5M3TdJf73M0/8IYw1IACeH01N7waN+z6JO4EHm+BkQz6GMnZTx8AJV0nizTLndcEu4=@vger.kernel.org X-Gm-Message-State: APuU4Z+jnFZUOZWX8ZKIECcjxYObSP/ShW9zcP/5CHC2EbqJjm6NB59G +OM4bBmMRuP+tsMiNMEmNLu3+Ls0s8TmQrQUdlq7wUPPnxxhqcFrZIS6Guzq0gLbPeRcletBtY+ ShqnFN7m+9L4Qv3JQpixeSnlDxA== X-Received: from oobeu17.prod.google.com ([2002:a05:6820:3091:b0:716:84f6:89ba]) (user=suseendranb job=prod-delivery.src-stubby-dispatcher) by 2002:a05:6820:161f:b0:71b:8a74:fc20 with SMTP id 006d021491bc7-71b8a7501c1mr24340469eaf.39.1796317338834; Thu, 03 Dec 2026 09:02:18 -0800 (PST) Date: Thu, 3 Dec 2026 17:02:07 +0000 In-Reply-To: <13f4b407-7020-451f-89c9-61bfa59c763c@intel.com> X-Mailing-List: linux-cxl@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> <13f4b407-7020-451f-89c9-61bfa59c763c@intel.com> X-Mailer: git-send-email 2.56.1.911.g883d8bcb20-goog Message-ID: <20261203170208.4170050-1-suseendranb@google.com> Subject: Re: [RFC PATCH 00/11] mm: NUMA-aware boot memory carving (extmem) From: Suseendran Bhaskaran To: Dave Hansen Cc: Andrew Morton , Mike Rapoport , Dan Williams , David Hildenbrand , 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 Dave, Thank you for your feedback. Agree that the cover letter jumped to the solution too quickly. Here is the goal and reasoning behind it. On Wed, Dec 02, 2026 at 04:34:59PM -0800, Dave Hansen wrote: > I think this jumps to the solution space far too quickly. What is the > actual goal? What does the carve-out achieve? > > Do you just want to do your own memory allocation? Are you trying to > reduce 'struct page' overhead? The goal is to let DAX/libnvdimm consumers use normal DRAM without x86-only hardcoded memmap=nn!ss ranges (which break when memory layout changes) or per-host firmware setup (EFI_MEMORY_SP): e.g. /dev/daxX.Y for guest VMs persisting in place across live updates, or /dev/pmemX for fsdax where block-filesystem semantics are needed instead of tmpfs. Primary requirements (as in the other sub-thread): 1. Arch-agnostic across ACPI x86_64, ACPI arm64, and DT arm64 without per-host firmware changes. 2. NUMA-aware partitioning (keeping System RAM on every node) without hardcoding physical addresses or firmware holes. 3. Preserving the exact ranges across KHO kexec. For allocation, yes: consumers allocate out of /dev/daxX.Y (or fsdax) directly via existing DAX and libnvdimm drivers, not a new kernel allocator. Reducing 'struct page' overhead is a secondary benefit. Boot skips ~16 MiB/GiB (4 KiB pages); post-bind, the overhead depends on how the region is bound (e.g. raw pmem uses none and huge-page-aligned device_dax on x86_64 shares tail vmemmap pages). >> - Runtime memory offlining cannot guarantee 1 GiB physical contiguity >> after early allocations (and boot RAM cannot be offlined on arm64). > > Could you talk a bit more about this, please? You're talking about > limitations of the existing implementation, right? Why, for instance, is > enhancing runtime memory offlining to fix this not an option? Yes, some of the problems are current implementation constraints. Even if lifted, I feel a few gaps remain with runtime offlining: - Across KHO kexec, live ranges must be excluded early; post-boot offlining runs too late on unpreserved RAM. kho_preserve_pages() and reserve_mem= are already early-boot reservations and keep the range as reserved System RAM, blocking DAX bind. - On cold boot, 1 GiB PUD mappings in device_dax (x86_64) need 1 GiB-aligned chunks. One unmovable page would block offlining its whole memory block. - Offlining leaves the range as IORESOURCE_SYSTEM_RAM, so DAX requires hot-removing boot memory blocks and re-adding them as ZONE_DEVICE. In-kernel helpers exist (offline_and_remove_memory()), but it still initializes and tears down boot struct pages on every boot. If you'd like to suggest a better approach for the requirements, I'd be happy to look into it. Thanks, Suseendran