From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.subspace.kernel.org (Postfix) with ESMTP id D2615606A32F for ; Thu, 3 Dec 2026 17:02:25 +0000 (UTC) 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=RJ4mRvLE Received: by kanga.kvack.org (Postfix) id E24C86B05BB; Thu, 3 Dec 2026 12:02:23 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id DFBFF6B05BD; Thu, 3 Dec 2026 12:02:23 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id D11B76B05BE; Thu, 3 Dec 2026 12:02:23 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0016.hostedemail.com [216.40.44.16]) by kanga.kvack.org (Postfix) with ESMTP id AC71A6B05BB for ; Thu, 3 Dec 2026 12:02:23 -0500 (EST) Received: from smtpin29.hostedemail.com (lb01a-stub [10.200.18.249]) by unirelay06.hostedemail.com (Postfix) with ESMTP id A8EC0A842D for ; Thu, 3 Dec 2026 17:02:22 +0000 (UTC) X-FDA: 85503290124.29.9B98BCF Received: from mail-oi1-f197.google.com (mail-oi1-f197.google.com [209.85.167.197]) by imf29.hostedemail.com (Postfix) with ESMTP id B6B81120019 for ; Thu, 3 Dec 2026 17:02:20 +0000 (UTC) Authentication-Results: imf29.hostedemail.com; dkim=pass header.d=google.com header.s=20260707 header.b=RJ4mRvLE; dmarc=pass (policy=reject) header.from=google.com; spf=pass (imf29.hostedemail.com: domain of 3mqARawsKCIExzxjjsiwfsglttlqj.htrqnsz2-rrp0fhp.twl@flex--suseendranb.bounces.google.com designates 209.85.167.197 as permitted sender) smtp.mailfrom=3mqARawsKCIExzxjjsiwfsglttlqj.htrqnsz2-rrp0fhp.twl@flex--suseendranb.bounces.google.com ARC-Seal: i=1; a=rsa-sha256; d=hostedemail.com; s=arc-20220608; cv=none; t=1796317340; b=yQMMnrgtsg89zBzWY4E1RfTDQRsDX9dqto3bPp6cRVJAu5eAw4v7/zEZQGbJ2FLQIN72bX 0LBERgI9xX30czurOkXdXRHF7x6vdhznfr4ai9PckJ1aoMbFYkQaLJqDC2bQRnbuTrUmjZ u1GpJL1DE5bhomgQWBTv2OUnN7tjSlg= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1796317340; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=D087ZCYjlYVMs+4aSwyHru0jvEINoAAdrZKjRL9oSMk=; b=T4GCv5QRcOP5PSUhDKNf+nndr1FFewNi4XePUvpykpNn1uSIIApCYpDOlcy9maNjp6JUNA r1nddHbaxjkFEw0JKS3d1CajwcGndtyHWfFm8fDIP6/9M9iPgjGshKtu/izyJ7rexrla6t ss7rF36OFg+nX233eKX4EislVqboPS0= ARC-Authentication-Results: i=1; imf29.hostedemail.com; dkim=pass header.d=google.com header.s=20260707 header.b=RJ4mRvLE; dmarc=pass (policy=reject) header.from=google.com; spf=pass (imf29.hostedemail.com: domain of 3mqARawsKCIExzxjjsiwfsglttlqj.htrqnsz2-rrp0fhp.twl@flex--suseendranb.bounces.google.com designates 209.85.167.197 as permitted sender) smtp.mailfrom=3mqARawsKCIExzxjjsiwfsglttlqj.htrqnsz2-rrp0fhp.twl@flex--suseendranb.bounces.google.com Received: by mail-oi1-f197.google.com with SMTP id 5614622812f47-5735cd94235so49444b6e.0 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=kvack.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=RJ4mRvLEk+RYAaf8/zR0uZP/6+pl0FlMmLJzCPEvMlJLS/shkuLS/NKFB2Xpo9QTWu H/iHFTu88xYwGIAX0k83SxuCeI456QVCP7Qk+4yPhutzDKL2DhDVpHsW6KfEfUlDIY95 BmC5MWZtcAsuGBLQm3ZxEaMEHsSAeXMKOY/YGHx2c9cZCANi4XFMbazCJbZCTTBeH4xd WZdWQ6BBubW9ChqrWmlVKAJKNDnaEC9iCGYMjKF8QzEpCCxIE2M8x3kHbFjqlm/4lQM0 Yylg7hvV7FZCtb+lsBjFsfyC+14DB2zcciB0CsbVmKnoLZgekOXd+gZg3cs32VZdrnL2 UNfA== 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=VkVfuhqfp3g816LOBKr6RX8WvesgMiblhlK17ef7S1gHuayyHWzQwjoqZ29KjnVMpN xN5/ttybSEKu18/uR69653ayDI84hzDI6lR8Omz75ePEDjHnNI6uRO4em8SMDdKDPbXc AeOuKugZFb4L4UrF4zMWPBelc7SzgldUXx3YBIB6+Lyw7WarIFWOT7fGUmCsDHdJlHp1 vkmHGOOeJjGQwZEzBTTthu1notbkNwItKiGPGytXyzNWPtOXPsalNT7o7MvyNfGiOMsG bfOzDJuyBwh3eYTMIwLOJ3fHg/NEvoSMPtwn3Krgip4eswgHGdN7eBHLJwuAXuCy40iG eiuw== X-Forwarded-Encrypted: i=1; AL+hErHXVek1fR/dMTTiqut2Oobt6tvHe9/HM4PYNVtQh89kUpdqgHosbHbAqKkxNLOhxCRewbwcHHLlhw==@kvack.org X-Gm-Message-State: APuU4Z/SdnPBJiKrfKD6xnfaKibfpsipD1MOQQby+6IO2AvakkW/gem1 /b8KScCWSbjzpkcoG1EKFnWDr/oqE8PuB8TsE6qossZx/xNV4g2+xlpG0MHM/GGTcZDDWHfb1mV saU1DM+2HQpgHuWfqx6j/wF7uhA== 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-Archived-By: 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" X-Stat-Signature: 13e6pmqo3snruiqu6e4zwmidxugk65py X-Rspam-User: X-Rspamd-Server: rspam11 X-Spam-Status: No, score=-16.3 required=3.0 tests=BAYES_00,DKIMWL_WL_MED, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_PASS,SPF_PASS,USER_AGENT_GIT, USER_IN_DEF_DKIM_WL autolearn=unavailable autolearn_force=no version=4.0.1 X-Rspamd-Queue-Id: B6B81120019 X-HE-Tag: 1796317340-176330 X-HE-Meta: U2FsdGVkX1+Y+NLYnKUG4tdXof1x81SbLjdmEZSZdlpMOB+BqT5lU2hDic8zT9s6F7a4sB1f7iks4SkU1WbDrUC4eOb5oITQmvwMs8N/a+TArsUrPa4qxfxqJhdZ3ZJyYAeoz+kGa+uzOx6pBQ3rnErZpsD52PTwtnfOTdVgLJa/iWrDOmWW3JnWJB4Vd/pH7OmiglWd0smTslvwLhknnhVLg1ZaQftF91k+3fyL1ep+1ZjI+FylUXop8qjFlv++cPGE4HCkg2B/qf4SnQ1B3A9xQKL2soccyFMQYfGB2jVaLTBBk7BeYp7gbsFaPV1y3HKrPClcZlSFTgbKYb2EJrXy+IUxEO7kdoyCtv+gOyR0aJLrzb6LjwGzipI35gVVPtWncTeH2hrZ/4qiMxuRCgYKYBj8FJSG//DRsEKwqBjajo77mZt114TmyLLNeFl1t25+ODnyH8nkFbXYivhplG2owZUoL2JyUvn9SJ8g/n1Df3pEbPBpKk/ceS7cDPEc14JqyVN/m9+Eoo6lSo7AtcGDrR9p+TwSGuYtjpHNV+pffiWkXB6UYik217qFMw5JjyIv/DhIZ8LppV8iEdycNxgFzT1uyWkoUgxD84eM/7+gtrmQtAPmGgn4uG5eqxslLrq0huJk/8hYtAu/FoO3Bkl/qnkOY62HfhPNik/bsESlsiNczTP10ZPavyOfmLJPUYzOGKqpalqG1YavxrsjDN+hOepeGBWCDtfKvOAZNZFS60+Aaszo+PVf4OjA6Xj9UcwWDQgg71c2GpBwTj0nZV5/srZ5vqx9FkiMsRiQddgoqtL5BaMqUJ34FoYpX16enRP3SPz+Quo02ekP/sf97VjdMdKEq/soJFa1UxXu/m6+At07x0GnTIapF7eUXfxWQtVowP2CyfHRPe2ME70PY7n+CztHCiCSasmJjCfq9WuX1RIAplx8AsDwO5QFAuQrNjqwCRIxJyHNPUPpwiK KyL2VoRO yop5LTEvhCMNa/lzgDaLAqxglFgY84fR7uKNGP5vTSBQeYib0isu7X/JCQ4hzvoCazZwAn6/vT+lEja8GKRiqNcONL1idTsJJHog8XgMqWQVf69neZVUvwlXz5JuPwhIsOtprfp7HpFM5BLT1yACEIf1pk30M/qasTPi+37c3wKJ4VBjGtOi34Mf/wFgt5TuPtvjW+YwPItrzZB2QaqjjS95A5E613oztjqMk0AjL2TQm0W3ba2jBMo6YSg6rGJ9goguCpV6LHX7IXfFz7gZU+3HGYSQAznjX7/j6A09UEON5auUqtNHyGcDbCHjfsVsBVJu7Cj6s5WgpGqr5/qbUh9mEqGToAx1h4x2m1iEFLzP/66WtvRf1JjS53G7m2qxJvBRlInWYzDv5fcQ0gdTNtoqF4L92Kj1wKcNzWnbOX6sp6Uv/8JCa0gHMKRHCsNzZMeU8r/w1a+q/YCK1nyZXoSWgPh+xK9Tc24yH+1etMp27q2NCU/3yi+SI27OXqjr6H2GwmW+PdjdH3oHEejqS8rx9uB7+9uyxxC4R+ppXBk1FMZDz1vkHFNWgQCLfaRac9SfLR2WBw3neh4IZl0paSR+fRwyrfWVmSwO03Ugy0KMFo16CBs/THzFUpmwLPEQdn1Q5gQGMXUQnt3hMsP++p0hF3RiEmqtlV27QpNbrYUo+pcv/iBt692KpaRptt3eO6hRgw5D4YedXYIGnWOa2j6Pl0Srww+1b5nFUNPgrhxBbs02F4GSnJm3W8+3p4HqIBvYigbO8HlVi8CF0iIEp8hoh2+xFl1MuhsCd1qzA76TvtILIkirvGnEt1xnR1zUaJy3E Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: List-Subscribe: X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-26) on aws-us-west-2-korg-listserv-alma10-1 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