From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 2CBFB606A31F for ; Sat, 5 Dec 2026 20:17:41 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.a=rsa-sha256 header.s=bombadil.20210309 header.b=P9MRLrPR; dkim=pass (1024-bit key, unprotected) header.d=linux.dev header.i=@linux.dev header.a=rsa-sha256 header.s=key1 header.b=d9Z8xbEl DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Content-Transfer-Encoding: Content-Type:In-Reply-To:From:References:Cc:To:Subject:MIME-Version:Date: Message-ID:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Unsubscribe-Post: List-Owner; bh=zszHGLlgPsq8SNNOjBnsxYVQZA4JEVL/R3q5mLIjzJ8=; b=P9MRLrPRCZhX5R 321RI3EsEclt6XgOpHk1P29JuTxf92cQDpSIXD2DWvniJLB1QlgWhNlxyJHV163XT1gi6y0QOiSnb TycB/VYEBDmVsAejcTr7KkfuwSorMeFc5Th6lcKGjNkdLXfRLkzYQmuf0JM+pQkXyjWnrHh1Qj7cJ MpfrRYdSHj608Rh9fjJMV73SDVfodqwxf2jAOXaw1m43FnEVlsPAVYP+2fVdFbsV1DfO2P3mW334f T8r3SFlD0I+Ow4cCOQMY96cDbJDtkfYdOemKpSsUUBX079Q9GvpGvnHErDoz9fQCFfb1XWMXHu3Et rMj7ZVQRsezKCl3vUntA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.100.1 #2 (Red Hat Linux)) id 1xZwCS-00000002qyl-0Rcm; Sat, 05 Dec 2026 20:17:40 +0000 Received: from out-149.mta1.migadu.com ([2001:41d0:203:375::95] helo=mta1.migadu.com) by bombadil.infradead.org with esmtps (Exim 4.100.1 #2 (Red Hat Linux)) id 1xZwCO-00000002qyK-2TPq for kexec@lists.infradead.org; Sat, 05 Dec 2026 20:17:38 +0000 X-Envelope-To: kexec@lists.infradead.org DKIM-Signature: a=rsa-sha256; bh=LZB7JElgh+KDLgaZK04Q6kV3ExahsDkjkRHtX7/dZco=; c=simple/simple; d=linux.dev; h=from:to:subject:date:message-id:mime-version:content-type; s=key1; t=1796501852; v=1; x=1797106652; b=d9Z8xbElVceYWvv6+OPhkCj5nmpK9xp3P97EtSzb3mKTpjg/MSUDfnvZzzDry6FpTlIMvV/8 m63TuqLvs7imjuuZSdVDIG1+dVF3Itqydj45yBaXQstQDbxemtURXgyGDsSvPmp8pqqoEj3LxkO U5AM0o8SrSrvYbnMn2tP42CE= X-Envelope-To: kexec@lists.infradead.org Received: by smtp.migadu.com with ESMTPS id d7000a0507a83f7e; Sat, 05 Dec 2026 20:17:32 +0000 X-Mizu-Trace-ID: d7000a0507a83f7e X-Migadu-Flow: FLOW_OUT Message-ID: <8015da3a-3f7e-4945-a26b-240df4a960e4@linux.dev> Date: Sat, 5 Dec 2026 12:17:22 -0800 X-Archived-By: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: KHO bootmem without pre-reservation To: Chris Down , Samiullah Khawaja , Pratyush Yadav , Tarun Sahu Cc: Pasha Tatashin , Mike Rapoport , Alexander Graf , "Andersen, Tycho" , Anthony Yznaga , Baolu Lu , David Hildenbrand , David Matlack , "Heyne, Maximillian" , James Gowans , Jason Gunthorpe , Pankaj Gupta , Praveen Kumar , Sagi Shahar , Vipin Sharma , Vishal Annapurve , "Woodhouse, David" , Luca Boccassi , Jork Loeser , Chenghao Duan , Sourabh Jain , linux-mm@kvack.org, kexec@lists.infradead.org, linux-kernel@vger.kernel.org, "yanjun.zhu@linux.dev" References: <20261124205808.4097419-1-pasha.tatashin@soleen.com> From: Zhu Yanjun In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.9.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20261205_121736_779566_3D9E7461 X-CRM114-Status: GOOD ( 30.73 ) X-Spam-Score: -2.1 (--) X-BeenThere: kexec@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "kexec" X-Spam-Status: No, score=-7.7 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS,USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=4.0.1 X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-26) on aws-us-west-2-korg-listserv-alma10-1 在 2026/12/2 12:26, Chris Down 写道: > Hi Samiullah, Pratyush, Tarun, > > At Meta, the size of the bootmem reservation is currently the main thing > stopping us from enabling KHO more widely, so I'd like to spend some time > on reducing it. Before I start, I want to make sure that I don't duplicate > or get in the way of what's already planned or in motion. Hi, Chris I have a question about the motivation for reducing the KHO bootmem reservation. From my understanding, KHO bootmem regions are declared as CMA when the page allocator is initialized. This means that, during normal host operation, these regions can still be used for movable allocations, while unmovable allocations are excluded to ensure that the memory remains available for future kexec operations. This seems somewhat similar to the CMA approach. For example, CMA-reserved memory can still participate in normal page allocation through MIGRATE_CMA pageblocks, and pages can be migrated out when contiguous memory is needed. Given this, I'm curious about the actual limitation you are encountering at Meta. Is the main concern that a large KHO bootmem reservation reduces the amount of memory available for unmovable allocations, potentially causing allocation failures or memory pressure during normal host operation? Or are there other concerns, such as memory fragmentation, NUMA constraints, or the overall memory footprint? I'm trying to understand whether the issue is primarily the amount of physically reserved memory, or rather the restrictions on how that memory can be used by the running kernel. Thanks! Yanjun Zhu > > Here is my understanding of the situation as it is right now. Please let me > know if I have anything muddled! > > - On 21 Sep [0] there was discussion about dropping the pre-reserved > areas and relying on dynamically extended bootmem instead, perhaps with > a small bootstrap region. Samiullah wrote up the initial ideas. > - On 19 Oct [1] there was discussion about the report about CMA pinning, > and Tarun's work with David on migrating movable pages into CMA. > - Mike's sizing fixes are now in the liveupdate tree, and the notes in > this thread say that the bootmem layout is still expected to change. > > I have a few questions: > > 1. Samiullah, is the design doc public, or could you share it? I couldn't > find a link to it on the list. I also saw there's a mention of a Google > Doc attached to the calendar invite, but I didn't find a link to that, > only to the Meet link itself. > > 2. Is anyone working on an implementation at the moment? If not, I'm > happy to take this on. > > 3. Is the main open problem still how to guarantee that the next kernel > can boot when the preserved memory is badly fragmented, or has the > thinking moved on since LPC? > > 4. Would smaller reductions to the current scheme be welcome in the > meantime? I haven't measured anything yet, so please tell me if I'm > missing something. :-) > > Either way, I can measure on top of Mike's fixes and test with our > workloads, and I'm glad to pick up whichever pieces are useful. > > I'd also like to propose that as a topic for the next call if that sounds > good? Is that scheduled yet, by the way? > > Thanks, > > Chris > > [0]: https://lore.kernel.org/r/20260925143000.2729890-1-pasha.tatashin@soleen.com > [1]: https://lore.kernel.org/r/20261025143601.2564170-1-pasha.tatashin@soleen.com -- Best Regards, Yanjun.Zhu