From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 8D4A9E674BD for ; Mon, 22 Dec 2025 14:58:57 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id F41316B0005; Mon, 22 Dec 2025 09:58:56 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id F0C286B008A; Mon, 22 Dec 2025 09:58:56 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id E34DE6B008C; Mon, 22 Dec 2025 09:58:56 -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 D2CDE6B0005 for ; Mon, 22 Dec 2025 09:58:56 -0500 (EST) Received: from smtpin30.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay04.hostedemail.com (Postfix) with ESMTP id 811781A01FE for ; Mon, 22 Dec 2025 14:58:56 +0000 (UTC) X-FDA: 84247414272.30.E5292DF Received: from sea.source.kernel.org (sea.source.kernel.org [172.234.252.31]) by imf21.hostedemail.com (Postfix) with ESMTP id C474B1C000B for ; Mon, 22 Dec 2025 14:58:54 +0000 (UTC) Authentication-Results: imf21.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b=Sf8cvv97; spf=pass (imf21.hostedemail.com: domain of pratyush@kernel.org designates 172.234.252.31 as permitted sender) smtp.mailfrom=pratyush@kernel.org; dmarc=pass (policy=quarantine) header.from=kernel.org ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1766415534; 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=RI6wkzq9art1PUr+oZHEIShCAnFL/nfJWig5oY9a9H4=; b=GkGvuU34rlLwyvVIZnTGSF8lN7dTqokCCSAJygjB6zRHOiLrrC/SSk94mG047XVkka8oqT GTA4bn+MeXrK8xb/9QMXBvBH8+HKy8Ikjk5AcDjMU7tmJmAAfrLjRLmoTPq42B8cMjtJjW Mx2rponQu+8YEYdi05t35v3yNtztpHw= ARC-Authentication-Results: i=1; imf21.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b=Sf8cvv97; spf=pass (imf21.hostedemail.com: domain of pratyush@kernel.org designates 172.234.252.31 as permitted sender) smtp.mailfrom=pratyush@kernel.org; dmarc=pass (policy=quarantine) header.from=kernel.org ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1766415535; a=rsa-sha256; cv=none; b=TFRQ0fVYAo+t94G67sVUsSeF2MEN+RApiaCZXsj+8Q1RfdQdVrW7azmU3B3CyUYunNI14i weXAVY0c1FyUtTUqib2tydVvaMf3t1PDmUn6CelxiWVGuGShR0Zpd7w7rVR0SgptLMDZZ5 l53Nz8yJX6SGRbmtYQbQFjBN0dRdVgE= Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by sea.source.kernel.org (Postfix) with ESMTP id E756740684; Mon, 22 Dec 2025 14:58:53 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 95BA5C4CEF1; Mon, 22 Dec 2025 14:58:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1766415533; bh=b4wwckHCSEHA9/WsH/82v8iyuGooOfYc2si289h0qdk=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=Sf8cvv973Ocy86SIfrhCawHgAShUAwMSVQXJmWzuodPbT41k1EQD8ytVx625GsbjA SW8CeuEhVcF9igA8P6YYwwKKILnQ4wtjZ9NJUZC8GVOJy1YFzowIKCHG9Wpke6Cd3p 4hlh6ZLKMflh9K4G4Fn2woo7rNi6d3jEcqdrNbRMhKV4lClYGgNb/eEA1oF9C9q53H PjiLu8ZRc9IoV32IPqFBobyygCnl0aDln4g75qhv3K1GZNkghCwfXPs4qohTcHGSXW Mqh2ghyKhw/orybk4h09OSXMzd0E0OMiPtbla5X7ljWCIHF1WJ1K2PrewNZlPqPMoN ptWtwVifEgDeQ== From: Pratyush Yadav To: Pasha Tatashin Cc: Pratyush Yadav , Mike Rapoport , Andrew Morton , David Hildenbrand , Lorenzo Stoakes , "Liam R. Howlett" , Vlastimil Babka , Suren Baghdasaryan , Michal Hocko , Jonathan Corbet , Thomas Gleixner , Ingo Molnar , Borislav Petkov , Dave Hansen , x86@kernel.org, "H. Peter Anvin" , Muchun Song , Oscar Salvador , Alexander Graf , David Matlack , David Rientjes , Jason Gunthorpe , Samiullah Khawaja , Vipin Sharma , Zhu Yanjun , linux-kernel@vger.kernel.org, linux-mm@kvack.org, linux-doc@vger.kernel.org, kexec@lists.infradead.org Subject: Re: [RFC PATCH 04/10] liveupdate: flb: allow getting FLB data in early boot In-Reply-To: (Pasha Tatashin's message of "Sat, 20 Dec 2025 10:11:34 -0500") References: <20251206230222.853493-1-pratyush@kernel.org> <20251206230222.853493-5-pratyush@kernel.org> <86wm2hj0ky.fsf@kernel.org> Date: Mon, 22 Dec 2025 23:58:43 +0900 Message-ID: <86o6nqd0m4.fsf@kernel.org> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain X-Stat-Signature: x477co7zyjo98qrzh8k8f57sn5u8gi9t X-Rspam-User: X-Rspamd-Server: rspam07 X-Rspamd-Queue-Id: C474B1C000B X-HE-Tag: 1766415534-542529 X-HE-Meta: U2FsdGVkX1/QofVMjBkGlS3yocsxOvRJBBnpxetUa3Hu8bCabLhdH5kn0loEj1CkkpLIkRkdhZ0IeBClflGmN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= X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: List-Subscribe: List-Unsubscribe: On Sat, Dec 20 2025, Pasha Tatashin wrote: >> > [Follow-up from LPC discussion] >> > >> > This patch is not needed, you can use liveupdate_flb_get_incoming() >> > directly in early boot. The main concern is that we take mutex in that >> > function, but that I think is safe. The might_sleep() has the proper >> > handling to be called early in boot, it has "system_state == >> > SYSTEM_BOOTING" check to silence warning during boot. >> >> Right. I will give it a try. For hugetlb, this works fine since it >> doesn't really need to do much in FLB retrieve anyway, it just needs to >> parse some data structures. >> >> If other subsystems end up needing a two-part retrieve, one in early >> boot and one later, then I think it would be a good idea to model that >> properly instead of leaving it up to the subsystem to manage it. >> >> Anyway, that isn't a real problem today so let's look at it when it does >> show up. > > FLB has exactly one .retrieve() lifecycle event. Once called, the data > is considered fully available and cached in private->incoming.obj. > > If a subsystem has a requirement where it needs a specific state > available very early and other state available much later, the clean > solution is simply to register two separate FLBs. Hmm, that can work too. Anyway, let's figure that out when there is a real use case. For now, the current FLB design works fine. -- Regards, Pratyush Yadav