From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=209.85.161.70 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796317341; b=U3nR804GyL6a0HNADkRgoa5VAftgwEfohDoaysriPx1wrQSILcA8zum1Ez1TRJKBGGWy USULRfeb/ibBlwt5iAma8H3EDUcL+3SGRdYI3kz/ufOvR9NRQh8ObVkjQLhQ93GmszmdJ T12uvyWyJIGVd6Qto8V/o1CXl0ZkFVarnck/xNbMCnDznjWDcg1QSrQ4g3Nl/bAaYCT9b 3zQzsy/E0Wtrwj1wgb5zv7/3k+fuQLDVro3NK2P3/aijDMLomk3YttBBhhEokDBN/g8TC vX4ppup5mE9vXtpL5+7QuotU36nsJ1EHfP+4l+NFPTH+KvhSBJtAN7y4dKRWyvAGcyQ== 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=zATLWjbJb6KKcxYmzzz5YR9YV+fGDgcaQWTe8VYc208HZeTecqWuEYqm8qhCQaaNLIh5 p0IdMO+l/9sjdGJfZ3qtSKpyJvscqS5RZaf1yFxpgQCcUQI8yiD9+UXdRf/3yaHikQfQG b8p2I1TlOr/sptH0q7d8CF9B6Hihp1ZBKIgjrE7Y9tYqYBuB9REL1s2cqicHqD5b528il +/1Br2avGZS6cLKe91Ajbq9to05qL8g2gQTlHMkFzw97reEGA5yPfMrSHKCogwg5aGTDT iSfDTVMi6XYurTYbYNWcYrGo3+FpnNCVXCGd927Ng0oWsMB7+3XMUenlv9XxoZcutgQ== 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.70 Received: from mail-oo1-f70.google.com (mail-oo1-f70.google.com [209.85.161.70]) (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 BBA64606A32D for ; Thu, 3 Dec 2026 17:02:20 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org BBA64606A32D 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-f70.google.com with SMTP id 006d021491bc7-7044b48537dso11868800eaf.2 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=tqjduvgOWToqWPzBKj73XE1Wm/pzsU0SQGSPmgd1Oj9fZlKmd5WTgPgiVy/spdozYG 1W2i9p3Z9Te8PmS0Lid3t9bWdDZy3jgJegvpW00BSst+OpjH3e0IaILtZo/rvRHrbNP3 lt7/ekKH58h1Ewzn6HsVkIwjEiHDf+/ZNYcj/RadTNypsP2yJr3qIRuQxT6J/bp2OuWj kEHLrvY6b8Uh4q6GId2BEfj1BgSpM85flVlXwNlBpygafTtv/L7vrbUDQ8xsTZkZbeH2 Z79B5RWDHkATFZbyywWQUFrCkm8M4CSaZUCtuG6casaOL5UKwZZ3toEaHgsv9ZjKgVBD koUQ== X-Forwarded-Encrypted: i=1; AL+hErEukSX9pf5zUVlWoNeLOoFcOwj/u8pQiYM4/TQ6HH7BsM7mQB3A7BPo+oLig47jFoWaVGBOtpJWe9I=@vger.kernel.org X-Gm-Message-State: APuU4Z/qySYlxjG4uma8QAtE4wO1DKMV/IfyDLZjPPvL4tcABrZT2jRc sBYpjHAyYQ0i5jninlX3b1YHsljWpLu+BacNf9EK3rzbLTMoPoc3VSXOMCjK64Qjiydgmfts3za AFgK32C0QvrQSTpGLE8L5t73PEA== 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-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> <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