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 E6E74606A33E for ; Sat, 5 Dec 2026 20:17:37 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key, unprotected) header.d=linux.dev header.i=@linux.dev header.a=rsa-sha256 header.s=key1 header.b=d9Z8xbEl Received: by kanga.kvack.org (Postfix) id 0DA0F6B05B1; Sat, 5 Dec 2026 15:17:37 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 08B396B05B2; Sat, 5 Dec 2026 15:17:37 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id F09476B05B3; Sat, 5 Dec 2026 15:17:36 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0017.hostedemail.com [216.40.44.17]) by kanga.kvack.org (Postfix) with ESMTP id C614C6B05B1 for ; Sat, 5 Dec 2026 15:17:36 -0500 (EST) Received: from smtpin02.hostedemail.com (lb01a-stub [10.200.18.249]) by unirelay07.hostedemail.com (Postfix) with ESMTP id 3A804160517 for ; Sat, 5 Dec 2026 20:17:36 +0000 (UTC) X-FDA: 85511039712.02.16124BB Received: from mta1.migadu.com (out-250.mta1.migadu.com [95.215.58.250]) by imf26.hostedemail.com (Postfix) with ESMTP id 240F4140003 for ; Sat, 5 Dec 2026 20:17:33 +0000 (UTC) Authentication-Results: imf26.hostedemail.com; dkim=pass header.d=linux.dev header.s=key1 header.b=d9Z8xbEl; spf=pass (imf26.hostedemail.com: domain of yanjun.zhu@linux.dev designates 95.215.58.250 as permitted sender) smtp.mailfrom=yanjun.zhu@linux.dev; dmarc=pass (policy=none) header.from=linux.dev ARC-Seal: i=1; a=rsa-sha256; d=hostedemail.com; s=arc-20220608; cv=none; t=1796501854; b=EhaYgvMGUEgvJSzPc6KEctyqtiG3SiXIe0qtxOOUrGfGucyiOPad118kHbCH0svhYHYV/M 7OIc7v/oyaHy16CyVSGkJJAMQ3FLHkITVY/a4EtfdZDdJI8MKG5ukxZzZnvwotS+agVrDV YEgOATBFif8Iu6bJB4z/Fg/CbqNgrSA= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1796501854; 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:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=zszHGLlgPsq8SNNOjBnsxYVQZA4JEVL/R3q5mLIjzJ8=; b=tLCOVIHrGEIjiy/A8TEc5vAk4pciGxHdV/kL3/0GMAB59s16cVNo2O9roZ6do4EuAI8+EW R9GIEli5YaVJiUmAPioQWoBtyf4DRLCMcPftNQgc7AHuavLPd0mNHVhy0ocvOzgAXYwwE8 kEqJAB5bA9zHjlub/HF9nZpkRFtM6oc= ARC-Authentication-Results: i=1; imf26.hostedemail.com; dkim=pass header.d=linux.dev header.s=key1 header.b=d9Z8xbEl; spf=pass (imf26.hostedemail.com: domain of yanjun.zhu@linux.dev designates 95.215.58.250 as permitted sender) smtp.mailfrom=yanjun.zhu@linux.dev; dmarc=pass (policy=none) header.from=linux.dev X-Envelope-To: linux-mm@kvack.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: linux-mm@kvack.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-Rspam-User: X-Rspamd-Server: rspam06 X-Rspamd-Queue-Id: 240F4140003 X-Stat-Signature: pywidoh9gkfqmhx5ku475ibu6zox4313 X-Spam-Status: No, score=-7.5 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_PASS,SPF_PASS,USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=4.0.1 X-HE-Tag: 1796501853-350137 X-HE-Meta: U2FsdGVkX1/klPdXyO2L7ZmYIce1ympIoo3sa21RZ8BDB3BR69ovvKHlH//GVE7PVrYJj0lbq7ds5HWOGmNUzzgXXkKehXeEmjyvPjZQZ57mVxj+U2vy0VsHAsu9PDa3pUNdA2vWwwYO25TJmHjSg2p6OsCRs21e32+YEsulPQttFepuo/YIa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wLA6WzyL8oELIqtcc+etHJfiOFzkhgLpVFGq0Gd9++CvDPINp2xDSBJGUsctHWvqzB/4OkmST4/5+bOOPeE4ryjfWUJJZQ8yCrL9r/bB7929x9D0dGCexD3V/b6uegycUdl6hZt+BKgY+Cao5tkGtgnCTdtfe2JMJsBUcoTIncFmwfq8SSU0PlmEkgeddg9n4xGtsQQZTMw2ptIsrz10CoeLbSs6kLu9jOvVWZmu5mMtk0Xe1MSrJHck3KiBWYlTy472yjG7Xp38N/BZzPwgDA08Mo4ZTRaSd7hzpVBnekY/sKLclF2Pkir7TnrgtVSA/N6kk07vY1RRyREjd+8t7P9tfazrIwKZ7mCO+dV/7CQOWXX6y2xO+eBfPD6VY6pq2YbsusEPQ5GpQraHNWXhbmLpC/TnSPG/dZPeL0CpQpP5BHbec63GBsCIOeKtH20= 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 在 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