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]) by smtp.lore.kernel.org (Postfix) with ESMTP id 73F27C28B2F for ; Tue, 11 Mar 2025 16:35:19 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 4F0CF280002; Tue, 11 Mar 2025 12:35:17 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 47955280001; Tue, 11 Mar 2025 12:35:17 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 2F301280002; Tue, 11 Mar 2025 12:35:17 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0011.hostedemail.com [216.40.44.11]) by kanga.kvack.org (Postfix) with ESMTP id 10A0A280001 for ; Tue, 11 Mar 2025 12:35:17 -0400 (EDT) Received: from smtpin25.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay02.hostedemail.com (Postfix) with ESMTP id 69081120357 for ; Tue, 11 Mar 2025 16:35:18 +0000 (UTC) X-FDA: 83209820316.25.E32F90F Received: from smtp-out2.suse.de (smtp-out2.suse.de [195.135.223.131]) by imf27.hostedemail.com (Postfix) with ESMTP id 3166E40008 for ; Tue, 11 Mar 2025 16:35:15 +0000 (UTC) Authentication-Results: imf27.hostedemail.com; dkim=pass header.d=suse.de header.s=susede2_rsa header.b=asDfZYqy; dkim=pass header.d=suse.de header.s=susede2_ed25519 header.b=27gEdoBE; dkim=pass header.d=suse.de header.s=susede2_rsa header.b=asDfZYqy; dkim=pass header.d=suse.de header.s=susede2_ed25519 header.b=27gEdoBE; spf=pass (imf27.hostedemail.com: domain of osalvador@suse.de designates 195.135.223.131 as permitted sender) smtp.mailfrom=osalvador@suse.de; dmarc=pass (policy=none) header.from=suse.de ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1741710916; 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=IqLnaJ6B5vJlBfOyqtzWOpIISZfLjXQhQVAEiGNZ9e8=; b=1wv6WfZoukNIxgvlAxw0pou0qxeI4SdtcuHZJPCJQnl8RTY5+B/CgLGnymYqaRKZOpfzax bRG8cFYlTIN1bJLELqMsqXUYJuYJ8/uUbQbj5Jbh7QlNUQjcPqUSVa8sgW4Eh7rKVoneym 84oplos3fREn9V3PLT4vTpWzvXzySlU= ARC-Authentication-Results: i=1; imf27.hostedemail.com; dkim=pass header.d=suse.de header.s=susede2_rsa header.b=asDfZYqy; dkim=pass header.d=suse.de header.s=susede2_ed25519 header.b=27gEdoBE; dkim=pass header.d=suse.de header.s=susede2_rsa header.b=asDfZYqy; dkim=pass header.d=suse.de header.s=susede2_ed25519 header.b=27gEdoBE; spf=pass (imf27.hostedemail.com: domain of osalvador@suse.de designates 195.135.223.131 as permitted sender) smtp.mailfrom=osalvador@suse.de; dmarc=pass (policy=none) header.from=suse.de ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1741710916; a=rsa-sha256; cv=none; b=7B1LJM7s2KdVsuGpIveiXUgnYz9wGr3xajji33RZd/eQnNkWZ0mLQ84a4Iw7zUtfNfx6AH Lby0TLCMsBaiH0yEsXSRvzTePe58Lw9OLDADMU+JQqK7HHt9qc+Zc9kD6dNr7K/2t91K2x YiUkBIg9QLA+4ctt6f3kELV4fE98EIE= Received: from imap1.dmz-prg2.suse.org (unknown [10.150.64.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp-out2.suse.de (Postfix) with ESMTPS id 96C4C1F7F8; Tue, 11 Mar 2025 16:35:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1741710914; h=from:from:reply-to: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; bh=IqLnaJ6B5vJlBfOyqtzWOpIISZfLjXQhQVAEiGNZ9e8=; b=asDfZYqyBkCyzr8CJ2e6ehtldUBJ0YHzjFOXMsjzXK72X/kD1U4ymb16vbtaY52At+Tceo ffbDTrWZaj64yLfuHFrRwJIWyl3sWSvyS9VPvmq1OH2jg02c5/H1aBtVZkBxAzo1E5XcUb wF47e2seMEHyC/y6Dx5Nmgje8fbeV7c= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1741710914; h=from:from:reply-to: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; bh=IqLnaJ6B5vJlBfOyqtzWOpIISZfLjXQhQVAEiGNZ9e8=; b=27gEdoBEv63Z8w2nop7f6TK06Gm+z8fi7Sft2rbkVqj1Crb1D0tevf4nMUaBNVoZjqe5eM KiPmHOlii3Ax5ZBw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1741710914; h=from:from:reply-to: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; bh=IqLnaJ6B5vJlBfOyqtzWOpIISZfLjXQhQVAEiGNZ9e8=; b=asDfZYqyBkCyzr8CJ2e6ehtldUBJ0YHzjFOXMsjzXK72X/kD1U4ymb16vbtaY52At+Tceo ffbDTrWZaj64yLfuHFrRwJIWyl3sWSvyS9VPvmq1OH2jg02c5/H1aBtVZkBxAzo1E5XcUb wF47e2seMEHyC/y6Dx5Nmgje8fbeV7c= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1741710914; h=from:from:reply-to: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; bh=IqLnaJ6B5vJlBfOyqtzWOpIISZfLjXQhQVAEiGNZ9e8=; b=27gEdoBEv63Z8w2nop7f6TK06Gm+z8fi7Sft2rbkVqj1Crb1D0tevf4nMUaBNVoZjqe5eM KiPmHOlii3Ax5ZBw== Received: from imap1.dmz-prg2.suse.org (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by imap1.dmz-prg2.suse.org (Postfix) with ESMTPS id 233CE132CB; Tue, 11 Mar 2025 16:35:14 +0000 (UTC) Received: from dovecot-director2.suse.de ([2a07:de40:b281:106:10:150:64:167]) by imap1.dmz-prg2.suse.org with ESMTPSA id fxP5BUJm0GeTAwAAD6G6ig (envelope-from ); Tue, 11 Mar 2025 16:35:14 +0000 Date: Tue, 11 Mar 2025 17:35:12 +0100 From: Oscar Salvador To: Zi Yan Cc: Gregory Price , David Hildenbrand , Yang Shi , lsf-pc@lists.linux-foundation.org, linux-mm@kvack.org, linux-cxl@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: CXL Boot to Bash - Section 3: Memory (block) Hotplug Message-ID: References: <1b4c6442-a2b0-4290-8b89-c7b82a66d358@redhat.com> <4ae838ee-b079-408e-8799-e9530ca50417@redhat.com> <0C5749C4-B3EE-4393-A8EA-AA56B399E9E3@nvidia.com> <7A60A7B1-0BFF-45ED-8A11-06F0D5286723@nvidia.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <7A60A7B1-0BFF-45ED-8A11-06F0D5286723@nvidia.com> X-Stat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8IWnklkLxiXvJf/5Rf5cn YlRYqbrW n545xXu7kNlcQsLkhtUrqOB+v4I+C5iol+oveXTLeWI1FCtnRVbkxqR9NIt24XaVkxhzv9G9LI+C0g+8PKRFa852w1R7syzdEfDx8gmcmUTShd5S5AwhOqi6lhAXRL2z4vthlD4ALRDiXxxpAYXufdYWvOCJVriThliKAxV8omX0D77SyvtOXUo6knz+fumif1DzS2/Ga173vwVhS9yWmvz0jsIBpx4E08Y6qxUyixJbX2x8f3lDGdGIgwHQLeAp1XWtc1h7YkLdaMdVc6WA6bibY31ILLw4xMGKt 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 Tue, Mar 11, 2025 at 12:08:03PM -0400, Zi Yan wrote: > Or a new option for memmap_on_memory like “use_whole_block”, then hotplug > code checks altmap is NULL or not when a memory block is plugged. > If altmap is NULL, the hot plugged memory block is used as memmap, > otherwise, the memory block is plugged as normal memory. The code also > needs to maintain which part of the altmap is used to tell whether > the memmap’d memory block can be offline or not. One of the first versions of memmap_on_memory did not have the restrictions of working only per memblock, so one could hot-plug more than a memory-block worth of memory using memmap_on_memory, meaning that we could end up with memblocks only containing memmap pages. Now, we decided to go with only one memblock at a time because of simplicity and also because we did not have any real-world scenarios that needed that besides being able to have larger contiguos memory for e.g: hugetlb. If people think that there is more to it, we could revisit that and see how it would look nowadays. Maybe it is not too much of a surgery. (or maybe it is :-)) -- Oscar Salvador SUSE Labs