From patchwork Mon Jan 27 15:34:03 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gregory Price X-Patchwork-Id: 13951559 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 6004BC0218A for ; Mon, 27 Jan 2025 15:34:18 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id C53BC28016A; Mon, 27 Jan 2025 10:34:17 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id C03EC280165; Mon, 27 Jan 2025 10:34:17 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id A7D4B28016A; Mon, 27 Jan 2025 10:34:17 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0010.hostedemail.com [216.40.44.10]) by kanga.kvack.org (Postfix) with ESMTP id 81EEC280165 for ; Mon, 27 Jan 2025 10:34:17 -0500 (EST) Received: from smtpin07.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay05.hostedemail.com (Postfix) with ESMTP id 31A7045814 for ; Mon, 27 Jan 2025 15:34:17 +0000 (UTC) X-FDA: 83053628154.07.B475AA2 Received: from mail-qk1-f178.google.com (mail-qk1-f178.google.com [209.85.222.178]) by imf27.hostedemail.com (Postfix) with ESMTP id 67FBE40002 for ; Mon, 27 Jan 2025 15:34:15 +0000 (UTC) Authentication-Results: imf27.hostedemail.com; dkim=pass header.d=gourry.net header.s=google header.b=foaVcCuj; spf=pass (imf27.hostedemail.com: domain of gourry@gourry.net designates 209.85.222.178 as permitted sender) smtp.mailfrom=gourry@gourry.net; dmarc=none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1737992055; 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-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=WEKgJJf51nUXgtjwZFRtEbK89HKdrqyuzjYJ58simEs=; b=lRdNaFa1lLCz0JuGkYCQFKgSf7g/tqU4/nWlU4zaj8brQCpIP4XYwRvj31Q7LhF7voKpgI rYPi1DZzyxyGsPg/Zv1O0yQfXH5kKhfhvcSKzTh9O0Zg0taRwSlxX1Jh8yKrNMoWLQIyMZ NseMsdtfSYBF6nfUrXSGLpju/BikuNY= ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1737992055; a=rsa-sha256; cv=none; b=0ZnPRRWJ/UihiueClk1z2gHxjqrxQJhC8G+si/XOJ2K1B4FfNgHmPpfWECV9td7bc9Qg5N DRrq5ojDkCvULK+ImbwAKH/Fse8VyXw+W2t1SESUGPWP0x1f1+SH2e0Ii0Ry1jqC4foH8E Z3BxlDFAsqLzfbZ9GsnAYL/Q33rca1Q= ARC-Authentication-Results: i=1; imf27.hostedemail.com; dkim=pass header.d=gourry.net header.s=google header.b=foaVcCuj; spf=pass (imf27.hostedemail.com: domain of gourry@gourry.net designates 209.85.222.178 as permitted sender) smtp.mailfrom=gourry@gourry.net; dmarc=none Received: by mail-qk1-f178.google.com with SMTP id af79cd13be357-7be8f281714so428846085a.1 for ; Mon, 27 Jan 2025 07:34:15 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gourry.net; s=google; t=1737992054; x=1738596854; darn=kvack.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=WEKgJJf51nUXgtjwZFRtEbK89HKdrqyuzjYJ58simEs=; b=foaVcCuj8bs8eZOA4bHnhIpqgQzX+Ne3A7KiBfeyiGAAzwWwR1W0e+2sv2/wJ3ilKu KFRp5CyD8kXeOi8eaQze/ECVlFxu8uLWuj9oP1u4Q+J8OoYbhcWbdjirNXitoEuPtT+E jIp2kqIKRuKMbdh2wntvb6aGA4bZj1mYROeAOsi8S+BmGCWkcconqZIINRSlENcein/T wsDsc52mbLofTgjLtdunkYZV1mmcrGvONBgjs7lP8Q0TpWJPuwPfbnTQpwOpTALQ9sPz OridSOEdL0rPHjRoW5wSFt7f8stZTCRHfZpQCLTvCUyubTgCdQ0C14VOwSxNa+beTjvB ZX5A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1737992054; x=1738596854; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=WEKgJJf51nUXgtjwZFRtEbK89HKdrqyuzjYJ58simEs=; b=VWDuhG5YFgpKALNEgmZaAwyEGScSJQYLgM75n1Yvn6mG0hGowkbVTnuOMvsvOvCJCU UDg4c7NQXZq6al5k64Cr3RNxtkOnZ4UMzeraLIOC3jGWDMQc3VL0Sp414lDA3w85iIKC 1VCjvypcCpgZFM64riN7oMluUzgzLR91emKhoRjgOMZHqHCgIeu/0xdt6XX6kO6JXYk9 Bqrvm0iMi0IgXteBpcPMiactoba60a8e+BCYUK6Q6hi54VgsUOixszK7QwkKrA8RzUBK tJQyihdIbeHjyqx+Zm2OTJ7VUvnpX90GX2sDWogrkLI1DUqFSDvwHYMTBWBeKw5/Nah5 33lg== X-Gm-Message-State: AOJu0YwYXO3Vw+c9LJ2XXOGeN3xYGN2m9Ft7XioIyMy/irnKwsd20Cff qHlepKFyht389MGn52Ao0yfgItskOPj9sNNdYua+1+N4OSWfs0u9+51/Oi9K/rT2t3DGUQlqvvE A X-Gm-Gg: ASbGnctrO1sugxpFKiCYkeVugxIZ4c88CLerhBeamKmPWuvWwLYMa8JO/0xt9BNu/kT cRsrSf61Gmd+oANlmqBnaSJ97UYVxvoO1ZwSqz9x+u5ZxHmO7mGTqZBm7Von4sZeE0yB1zsaCIT YizULVuAvYyots7N/x0HicygeiCpEQnpeFviveW15g2wW0bjdxmUkwAfssxtHt0kpF7+rVVcvjh v3fwAZVvnuHMbHQVepDNW1mWZtfJbcBMe4f1GeU9UkX7T7TffduEHRDQrqbF6WEAZG/ebqdJYO/ TDW8euSqjIWw9nFdY9KkBvZq7PJeG8EXSCUz7ogZIrxRQ54d/ROd+k7CAzc6HZkFuPtp X-Google-Smtp-Source: AGHT+IGoKs+d0lqDKVI9i+teoRAx9CQCD+e8LPsJoU6HHbn9z9w7GdlOVjcgcKDj1hULyXcfAypH2A== X-Received: by 2002:a05:6214:4b0f:b0:6e1:a36b:3445 with SMTP id 6a1803df08f44-6e1b21857c6mr708814736d6.19.1737992054132; Mon, 27 Jan 2025 07:34:14 -0800 (PST) Received: from gourry-fedora-PF4VCD3F.lan (pool-173-79-56-208.washdc.fios.verizon.net. [173.79.56.208]) by smtp.gmail.com with ESMTPSA id 6a1803df08f44-6e2058c2a51sm35380476d6.109.2025.01.27.07.34.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 27 Jan 2025 07:34:13 -0800 (PST) From: Gregory Price To: linux-mm@kvack.org, linux-acpi@vger.kernel.org Cc: kernel-team@meta.com, x86@kernel.org, linux-kernel@vger.kernel.org, dave.hansen@linux.intel.com, luto@kernel.org, peterz@infradead.org, tglx@linutronix.de, mingo@redhat.com, bp@alien8.de, hpa@zytor.com, rafael@kernel.org, lenb@kernel.org, david@redhat.com, osalvador@suse.de, gregkh@linuxfoundation.org, akpm@linux-foundation.org, dan.j.williams@intel.com, Jonathan.Cameron@huawei.com, alison.schofield@intel.com, rrichter@amd.com, rppt@kernel.org, gourry@gourry.net, bfaccini@nvidia.com, haibo1.xu@intel.com, dave.jiang@intel.com, Ira Weiny , Fan Ni Subject: [PATCH v8 1/3] memory: implement memory_block_advise/probe_max_size Date: Mon, 27 Jan 2025 10:34:03 -0500 Message-ID: <20250127153405.3379117-2-gourry@gourry.net> X-Mailer: git-send-email 2.48.1 In-Reply-To: <20250127153405.3379117-1-gourry@gourry.net> References: <20250127153405.3379117-1-gourry@gourry.net> MIME-Version: 1.0 X-Stat-Signature: epyn3zzxe31pbty4fmaqt4gxtespfrtp X-Rspamd-Queue-Id: 67FBE40002 X-Rspam-User: X-Rspamd-Server: rspam06 X-HE-Tag: 1737992055-359302 X-HE-Meta: U2FsdGVkX19almQa0IYxU1dkNcS4UUxhOnxnMX9DEUNbzwbQ9IcGukpVBJ8Ckdzjrn0JzTXU3vv09JwyHW1Q+cGXnjlTM5nwvPN1e9FfSqUro51BU739eRYvmXIy4PUVYGHNtQdIpb3jzfYCAWrGk1qmpHB1BQD/F/xT7RBmTNmeNkbTeW8Nw0OdIEowoUjAlzY5JD5Nhrr1PfuMbLrEp/HFuGr1NLx2+u6cyylST8XXurK611v6ok76vI1TN44KRTPksxQz6mZ3/lvcCx5Ps9+/4imqfcLAKFERhvx56C5rYYb+eGTN8t5kZN9PG9sBzmQkwNBIV/uLiMXSqGpjsjJ4MKLZ4dIgCwGGB4wmMjvfHAe8pxmq4hrXCW/581XYJidd/ugjHYyl+xR4rH8pStc5buHDik8832iyrX+FltIGLDVgMG3veBAXWhcyyfjpLnrjEyqlvsLQRY8XgpPuVfRWFRfx36DFORtxMbsTNDuz5ONeMfgCmJLIuR8/VbK16tFP4U2hcLSGIuR5a0jByaWx8ZvTT4roc85ep5kg8fmL2cLfKS9GGK9lcr6s7ndKfWQBpf9lznHKFvVfd6seCcylIRcyRlz80t3Kzw9DNqDtLuZT+QkaVgqwtTSIPdny/1ge8694xrTcRi9FqEQpYBtJr/MJTrKOcXU6QbsLtBX0zRNZUhwxfkcXoxlwEbST3Fxwm78lCx+fmCCIl1PU/zVDvJ9xpoFRxzzxWZUA+WMRVkO3ZsMkTWq/ODSaFqm4essXl4sKixa/JNvTQpRUSWtWm4sR7Y/LKvkrsOzPIdI7FFxLKHpP2/sL8jovvoYDDsFY7GuC65soKvDtnqjKXDyZRPjIOjcEnS5YOzek2ER0csf0Mv8iWPhaL57d7F2YJO+47KmTSUHmhqby/87s1KKWHRaWc+PPt26Kg7B+aAt5zwvW2yryWW5hQCGph9oCLFwZjvf5vVWg9WlvrH/ eC+hRpnL DXHc3jyT6XqKScGStzMHgXhmrsV/6vuxfnx+iTm/fjGRaK4A+5HRB5Idgt/xy2rCWqeVrTVHccO8bQXHIuceXRcbvCIoDcPC22wRLh6OkJyBPktQe07KLSpuWaiTF2yttyxS5ZaVoN1kH5IYItLg0O2Lj4gajFUtdpBL9h2SkHWJX167HCUnIGKORcXn17SrsBP3qW+bXkI4pf66KnJbDOoZGcU39zbGh7eNrnQcnfJ7Sce8hosc8rqav55bOMW051/H7RdSVrgApkEyMvCPHq67gWC8S1u14eT/zzR/0hunCeV9tgdHlI9xzXZXRWATjYSHgiZHn0pYLb3NDm6BPjC9ynVY5ruK14fk6Iibb0cqk0PI6VDrKQMhtWoB0mhMKYLrk4roDobBEHlE+NygqkSv4KShZkHeJPhffLNb8XszjCSzGQjX7HTCyGdBe1fv5xaGv 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: Hotplug memory sources may have opinions on what the memblock size should be - usually for alignment purposes. For example, CXL memory extents can be 256MB with a matching alignment. If this size/alignment is smaller than the block size, it can result in stranded capacity. Implement memory_block_advise_max_size for use prior to allocator init, for software to advise the system on the max block size. Implement memory_block_probe_max_size for use by arch init code to calculate the best block size. Use of advice is architecture defined. The probe value can never change after first probe. Calls to advise after probe will return -EBUSY to aid debugging. On systems without hotplug, always return -ENODEV and 0 respectively. Suggested-by: Ira Weiny Acked-by: David Hildenbrand Acked-by: Mike Rapoport (Microsoft) Acked-by: Dan Williams Tested-by: Fan Ni Reviewed-by: Ira Weiny Signed-off-by: Gregory Price --- drivers/base/memory.c | 51 ++++++++++++++++++++++++++++++++++++++++++ include/linux/memory.h | 10 +++++++++ 2 files changed, 61 insertions(+) diff --git a/drivers/base/memory.c b/drivers/base/memory.c index 348c5dbbfa68..69feacbac3da 100644 --- a/drivers/base/memory.c +++ b/drivers/base/memory.c @@ -110,6 +110,57 @@ static void memory_block_release(struct device *dev) kfree(mem); } + +/* Max block size to be set by memory_block_advise_max_size */ +static unsigned long memory_block_advised_size; +static bool memory_block_advised_size_queried; + +/** + * memory_block_advise_max_size() - advise memory hotplug on the max suggested + * block size, usually for alignment. + * @size: suggestion for maximum block size. must be aligned on power of 2. + * + * Early boot software (pre-allocator init) may advise archs on the max block + * size. This value can only decrease after initialization, as the intent is + * to identify the largest supported alignment for all sources. + * + * Use of this value is arch-defined, as is min/max block size. + * + * Return: 0 on success + * -EINVAL if size is 0 or not pow2 aligned + * -EBUSY if value has already been probed + */ +int __init memory_block_advise_max_size(unsigned long size) +{ + if (!size || !is_power_of_2(size)) + return -EINVAL; + + if (memory_block_advised_size_queried) + return -EBUSY; + + if (memory_block_advised_size) + memory_block_advised_size = min(memory_block_advised_size, size); + else + memory_block_advised_size = size; + + return 0; +} + +/** + * memory_block_advised_max_size() - query advised max hotplug block size. + * + * After the first call, the value can never change. Callers looking for the + * actual block size should use memory_block_size_bytes. This interface is + * intended for use by arch-init when initializing the hotplug block size. + * + * Return: advised size in bytes, or 0 if never set. + */ +unsigned long memory_block_advised_max_size(void) +{ + memory_block_advised_size_queried = true; + return memory_block_advised_size; +} + unsigned long __weak memory_block_size_bytes(void) { return MIN_MEMORY_BLOCK_SIZE; diff --git a/include/linux/memory.h b/include/linux/memory.h index c0afee5d126e..8202d0efbf46 100644 --- a/include/linux/memory.h +++ b/include/linux/memory.h @@ -149,6 +149,14 @@ static inline int hotplug_memory_notifier(notifier_fn_t fn, int pri) { return 0; } +static inline int memory_block_advise_max_size(unsigned long size) +{ + return -ENODEV; +} +static inline unsigned long memory_block_advised_max_size(void) +{ + return 0; +} #else /* CONFIG_MEMORY_HOTPLUG */ extern int register_memory_notifier(struct notifier_block *nb); extern void unregister_memory_notifier(struct notifier_block *nb); @@ -181,6 +189,8 @@ int walk_dynamic_memory_groups(int nid, walk_memory_groups_func_t func, void memory_block_add_nid(struct memory_block *mem, int nid, enum meminit_context context); #endif /* CONFIG_NUMA */ +int memory_block_advise_max_size(unsigned long size); +unsigned long memory_block_advised_max_size(void); #endif /* CONFIG_MEMORY_HOTPLUG */ /* From patchwork Mon Jan 27 15:34:04 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gregory Price X-Patchwork-Id: 13951560 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 6BC96C02188 for ; Mon, 27 Jan 2025 15:34:20 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id E9EDE28016B; Mon, 27 Jan 2025 10:34:19 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id E4DCE280165; Mon, 27 Jan 2025 10:34:19 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id CA13728016B; Mon, 27 Jan 2025 10:34:19 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0015.hostedemail.com [216.40.44.15]) by kanga.kvack.org (Postfix) with ESMTP id A5239280165 for ; Mon, 27 Jan 2025 10:34:19 -0500 (EST) Received: from smtpin26.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay03.hostedemail.com (Postfix) with ESMTP id 5C9CFA02C1 for ; Mon, 27 Jan 2025 15:34:19 +0000 (UTC) X-FDA: 83053628238.26.325065C Received: from mail-qv1-f48.google.com (mail-qv1-f48.google.com [209.85.219.48]) by imf25.hostedemail.com (Postfix) with ESMTP id 844CBA001C for ; Mon, 27 Jan 2025 15:34:17 +0000 (UTC) Authentication-Results: imf25.hostedemail.com; dkim=pass header.d=gourry.net header.s=google header.b=Rqn70QIM; dmarc=none; spf=pass (imf25.hostedemail.com: domain of gourry@gourry.net designates 209.85.219.48 as permitted sender) smtp.mailfrom=gourry@gourry.net ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1737992057; a=rsa-sha256; cv=none; b=U+faKga2BJixZVS+yO7vfa9SxPa0Hk/Q6uTXfRxq67K1Qwugd+UBJFyUAZPAEV/dqI3PcZ h5QFJPe/rGNXMbAXJod55TfOJcBqrj/sXcZWjcfb1NbI4RpZCK0OoFzYmPLOZTHHN314HK xwATkaoZd3O87EsaYmL3sNmg0zvPGcc= ARC-Authentication-Results: i=1; imf25.hostedemail.com; dkim=pass header.d=gourry.net header.s=google header.b=Rqn70QIM; dmarc=none; spf=pass (imf25.hostedemail.com: domain of gourry@gourry.net designates 209.85.219.48 as permitted sender) smtp.mailfrom=gourry@gourry.net ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1737992057; 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-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=cuGLm5QAWvME/iYTUeN4C38ZerEmS6SWYSvNtkJw+ks=; b=Io9VcEL8h0sq18ze/qO8pj77LFVKE0ect0x2VsXqqmucxBTM7omlCJflQweCIhszrgl1KC Kv1t+PzU01Ni76SMDwCQb5nkmbZGIz7rFHGCxN3EDs/Akr8gi5o9WslJxouPLcnADRoC4r lSGGbNV4Ay68l0h36+d4BJmjWsctqXU= Received: by mail-qv1-f48.google.com with SMTP id 6a1803df08f44-6dcdd9a3e54so46012226d6.3 for ; Mon, 27 Jan 2025 07:34:17 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gourry.net; s=google; t=1737992056; x=1738596856; darn=kvack.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=cuGLm5QAWvME/iYTUeN4C38ZerEmS6SWYSvNtkJw+ks=; b=Rqn70QIMJnJTEV7hMUuucrhC3DzpmuIlaiIPHqYIfZmGL5M6F3nEpxnukZrxqCtFaL bRZiJc5yNV2+RIG+gn+Mn7ryOTkBlN3938Iu7fWYe0YKjRFw71j08O15faFUv7zZ3FQO 6czG+fa/59Z/qYkMCWV2tl1W5hpYK9d/ekpWfIThhCBtB1eJAcCsj+oivr+lTEyoHNMk LsdVTlirbdMzCYCQBX0J7kgIxu25kSs6yCUTqh9A4btuZsRjAzM1fYlkpxQs67s88+Ho SBot0FCl1wRtAljclyX2XcrLgvDu5W4KdNz9zWUPJng2AIWsYiLVPlYNZYkq6ie0zNed 2f3A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1737992056; x=1738596856; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=cuGLm5QAWvME/iYTUeN4C38ZerEmS6SWYSvNtkJw+ks=; b=fYh+MSjO/a2V/QeN7HhxDplrJ8kx2lgjs2yL9aGa9HWRe/v15T3NftOVlDJdDNJOIH /uQaJitafjtDXqQ6VXlvPxEswYKdE5HOLNV4DUL6rFvY0DAd+LqI6c0CH/lVlm548xSv AM/ghj+uGOXhA4DQaE6ZIcIRYDFrR3CW+AsfByP/lEmqOyaM5LGDxc8xjEP0I5ye2piD omQn5vnVY19lZatuxEbk7w2vzhIlcve/9d5JQFlrXfcc1z2mn4Aqw3UEUPNYUWVhF+Nb eNwU7kMIfYzyreCm/CAfKtQXKhLinFJhOFCl5Doct2kifJXMQbldbUyrkuOiA4i13JXh +Rpw== X-Gm-Message-State: AOJu0YykBVjScvbh8PyOmjrasIfKOZHqgXVk2m9WuGFmzxZbdKv+CcpH AUhv+1jclUD4OOKUp1TEfzkewtStS7Zvu5kUoKWI202NyE4qj8502PDd4Gjs+AtpHOUAfbjOQ+w + X-Gm-Gg: ASbGncsL1attJX08qXhTS+wGe3tGL7wDCZ0VPIdU7n4B785BXPrzhM4X3zfljDSI9nA oel4n5yGsq8goTyJ4fV7Mb/gekUpC9uwBfOICIYnVnQCKourB1LP/maOzPXK0HvQWuiToRPlqgA MkE2CuVvcQEsQ3+RYFM0jsARYuMnKgtG+2zqotZ2FS6Yx/2S9zmQ/uaaYU2Cqln3eV+vHr+Aglc Vekyq+SdOZAxZLz6MTOOqiVaFKI4RMQR+E7qTTNKRNJ/QbUjQB9zGh5hbbexNmz1RA2eX49519o G8nMqI8TdszHHjlt/66L38GI8ozETsd1jAsPSt+Bl2irjnQyzILPwPmCx1+h1iqxl/g5 X-Google-Smtp-Source: AGHT+IH3YD2uq0s2UOyUMAffGvHi1zghb5NCWsDgLZca9QQje9OVBrkdwmDEWT3QH9fizy2t68UjHA== X-Received: by 2002:a05:6214:1248:b0:6d8:b3ee:8b72 with SMTP id 6a1803df08f44-6e1b2229d49mr616446186d6.32.1737992056362; Mon, 27 Jan 2025 07:34:16 -0800 (PST) Received: from gourry-fedora-PF4VCD3F.lan (pool-173-79-56-208.washdc.fios.verizon.net. [173.79.56.208]) by smtp.gmail.com with ESMTPSA id 6a1803df08f44-6e2058c2a51sm35380476d6.109.2025.01.27.07.34.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 27 Jan 2025 07:34:15 -0800 (PST) From: Gregory Price To: linux-mm@kvack.org, linux-acpi@vger.kernel.org Cc: kernel-team@meta.com, x86@kernel.org, linux-kernel@vger.kernel.org, dave.hansen@linux.intel.com, luto@kernel.org, peterz@infradead.org, tglx@linutronix.de, mingo@redhat.com, bp@alien8.de, hpa@zytor.com, rafael@kernel.org, lenb@kernel.org, david@redhat.com, osalvador@suse.de, gregkh@linuxfoundation.org, akpm@linux-foundation.org, dan.j.williams@intel.com, Jonathan.Cameron@huawei.com, alison.schofield@intel.com, rrichter@amd.com, rppt@kernel.org, gourry@gourry.net, bfaccini@nvidia.com, haibo1.xu@intel.com, dave.jiang@intel.com, Fan Ni , Ira Weiny Subject: [PATCH v8 2/3] x86: probe memory block size advisement value during mm init Date: Mon, 27 Jan 2025 10:34:04 -0500 Message-ID: <20250127153405.3379117-3-gourry@gourry.net> X-Mailer: git-send-email 2.48.1 In-Reply-To: <20250127153405.3379117-1-gourry@gourry.net> References: <20250127153405.3379117-1-gourry@gourry.net> MIME-Version: 1.0 X-Rspam-User: X-Rspamd-Server: rspam01 X-Rspamd-Queue-Id: 844CBA001C X-Stat-Signature: bytgrty51qqqydk63315uparmgh98etd X-HE-Tag: 1737992057-432039 X-HE-Meta: U2FsdGVkX18Br8WFFl3j6zZSntlqVGuS+uzKZdNQBCoNStI8H5940P3jk+gwZIsxzkFz5OW7bOxjgurmkg8fiCmhAwIokSiHrPKavotBBrnvFLP/iONqOaB4LQgRKhwBHRAxXNxy7rjTU0F0hQAr47omDMmjNQmI3yLCZosR0K49aj1grAbcN3GYF10UKLlmMATRoeCxVRvEMKYPdNTtoXt8nIYPBc3eopKOxZtr1gIoUZIi3DUH+o8gWcwL9GCd1B8Jx4AUZ/yBXMUB8WaRD7jlyjhTyM8+u2K3G2MW7m/QKkqKFCt0122AEoA8yOLCvUNAdpTQZjzTGOgAot3w76uY2kR04gnmTR+DQ9IDH93HLCSOrCblDkUYluNzxRZLjq0iTkn8SiEnJgaMzUJv56ZgWaOfYv3fPjFc9qjLF9YS/j45b772SiFW7zoFxm8mp4wjXRysVqDE66QMXd358RxehNsLyTAKf1eo5GzrFbVoZ54dAQ9lkQKoWhVk5YKiH96mtbu9opC3wBRHPb4YhZkNnslXt04IGaePG/cJGmudJUICHBQ7pkEVXfyLRN3DFWel4QMKX8jAN/zpz6509qsklrDS3+G2Y6hVIiGHM/4rnT5LE0wNuWPwrSO2lJRPcJaFNtKQ4UZQqVJUjENFgH6/glfGnv9HTtb79PpNVdXggqJY2vUThRiawMkMzmTkgy/YfMCDbiBK/nqIAjE7Vr67lKLLDUPiwEoNnA2bElH1Tnk0fq056zqoEKIKNIN2hJKHNHd7z7u3Sz9oFjJGhdMZgMQvHBvhGWRYgCXrnhFMRaWH679rbo2j/0N9bqF21v6qqyVMSFP/MS5rICflrRn0Mdql+HXhmhQPEwN2sy1MEHYj9/nBEC5pN/tA0xBXAWGioQ9a4E+P1a0Rl6TdIdCubwM+Fl54348aTPfaqsQ8Kq5S+lcjOEAMKIPQLJI6TiBSwKu8oWrlgmzefIz y19Jyw5s Kkuo6BQm517cyJEIdRiVhhGXRNR87D48TEKt0LKE1qiql0ihFEiIbIfVTkArQ8YjzVPSbkR0jKD39+OMFoaAnp2haXp7RfTdpaxFTHdIOiae4JTcSuRX21zE1poQa4S+JFougZ72icuGupPjtW0WHJIh8VqvG0pTApLomKLXIVffIVBi9vomYXic1Gqk78z9GExHdPc2jr/uzWD3WDTb/D7eXkFzqF61VpK5D7nD+eIxethoEe/f7LHYWE9YQ0NaK1ZwWy6Rs5QOEMgu+mr61Vc8MEEcwbc3d4w/oMMN8OVyEMAr5hFH+JWIcTQ0Vxer6+LfR+rXJkzlo5pqIc6s5DS+bgjwwboo1Wj807p5goVWDIsD6lV7BBgH6vjqYs+iZrfZ3ipjh4FINSCJN+K8Nzl8Tew== 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: Systems with hotplug may provide an advisement value on what the memblock size should be. Probe this value when the rest of the configuration values are considered. The new heuristic is as follows 1) set_memory_block_size_order value if already set (cmdline param) 2) minimum block size if memory is less than large block limit 3) if no hotplug advice: Max block size if system is bare-metal, otherwise use end of memory alignment. 4) if hotplug advice: lesser of advice and end of memory alignment. Convert to cpu_feature_enabled() while at it.[1] [1] https://lore.kernel.org/all/20241031103401.GBZyNdGQ-ZyXKyzC_z@fat_crate.local/ Suggested-by: Borislav Petkov Suggested-by: David Hildenbrand Acked-by: David Hildenbrand Acked-by: Dave Hansen Acked-by: Mike Rapoport (Microsoft) Acked-by: Dan Williams Tested-by: Fan Ni Reviewed-by: Ira Weiny Signed-off-by: Gregory Price --- arch/x86/mm/init_64.c | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/arch/x86/mm/init_64.c b/arch/x86/mm/init_64.c index 01ea7c6df303..58ace82874eb 100644 --- a/arch/x86/mm/init_64.c +++ b/arch/x86/mm/init_64.c @@ -1462,16 +1462,21 @@ static unsigned long probe_memory_block_size(void) } /* - * Use max block size to minimize overhead on bare metal, where - * alignment for memory hotplug isn't a concern. + * When hotplug alignment is not a concern, maximize blocksize + * to minimize overhead. Otherwise, align to the lesser of advice + * alignment and end of memory alignment. */ - if (!boot_cpu_has(X86_FEATURE_HYPERVISOR)) { + bz = memory_block_advised_max_size(); + if (!bz) { bz = MAX_BLOCK_SIZE; - goto done; + if (!cpu_feature_enabled(X86_FEATURE_HYPERVISOR)) + goto done; + } else { + bz = max(min(bz, MAX_BLOCK_SIZE), MIN_MEMORY_BLOCK_SIZE); } /* Find the largest allowed block size that aligns to memory end */ - for (bz = MAX_BLOCK_SIZE; bz > MIN_MEMORY_BLOCK_SIZE; bz >>= 1) { + for (; bz > MIN_MEMORY_BLOCK_SIZE; bz >>= 1) { if (IS_ALIGNED(boot_mem_end, bz)) break; } From patchwork Mon Jan 27 15:34:05 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gregory Price X-Patchwork-Id: 13951567 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 CC107C02188 for ; Mon, 27 Jan 2025 15:34:23 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 0E3ED28016C; Mon, 27 Jan 2025 10:34:22 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 09478280165; Mon, 27 Jan 2025 10:34:22 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id E03CE28016C; Mon, 27 Jan 2025 10:34:21 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0012.hostedemail.com [216.40.44.12]) by kanga.kvack.org (Postfix) with ESMTP id BD1D4280165 for ; Mon, 27 Jan 2025 10:34:21 -0500 (EST) Received: from smtpin23.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay02.hostedemail.com (Postfix) with ESMTP id 6554C120287 for ; Mon, 27 Jan 2025 15:34:21 +0000 (UTC) X-FDA: 83053628322.23.79EB41C Received: from mail-qv1-f52.google.com (mail-qv1-f52.google.com [209.85.219.52]) by imf18.hostedemail.com (Postfix) with ESMTP id 8D3221C0009 for ; Mon, 27 Jan 2025 15:34:19 +0000 (UTC) Authentication-Results: imf18.hostedemail.com; dkim=pass header.d=gourry.net header.s=google header.b="p/uWrEBN"; spf=pass (imf18.hostedemail.com: domain of gourry@gourry.net designates 209.85.219.52 as permitted sender) smtp.mailfrom=gourry@gourry.net; dmarc=none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1737992059; 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-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=K2QKacaR1w2J0DOe/2A1iWnNo84Ql16Satbz8d4J348=; b=8EHFIO5kXouFrq97dZB65fW8QtaiP4QO6WMlLhPCOECqW/oZSV3FjGe1zbzlbuU6GtMF3h YmGg1E7AXLskpgqcbcWD2cEx7Y28ywvcb1twudLmiu/eEGqrkwRa9vNqZJPiXxbgHuzT6f KIXrBnZq3J327fRUWtLL4L0vKLuwWH0= ARC-Authentication-Results: i=1; imf18.hostedemail.com; dkim=pass header.d=gourry.net header.s=google header.b="p/uWrEBN"; spf=pass (imf18.hostedemail.com: domain of gourry@gourry.net designates 209.85.219.52 as permitted sender) smtp.mailfrom=gourry@gourry.net; dmarc=none ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1737992059; a=rsa-sha256; cv=none; b=ZLnyijgrN6YLAwllrb0tT3eM5TxRPOVBGRtQ9E5tjlsicisO0nSaU2BEjkN0kv3wUV8LQ3 FOkPBNWlAkBeIhh1aZYowwQx5EP1CaKy0j+/A5MXRix41eAWlEaRnMkAi3v9S2f7E2xRCR xcQzgX5RbCKu68ki+2dAQV+xMnPZul8= Received: by mail-qv1-f52.google.com with SMTP id 6a1803df08f44-6d8e8445219so41149546d6.0 for ; Mon, 27 Jan 2025 07:34:19 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gourry.net; s=google; t=1737992058; x=1738596858; darn=kvack.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=K2QKacaR1w2J0DOe/2A1iWnNo84Ql16Satbz8d4J348=; b=p/uWrEBNPDsvf6wABOAlm+FRp67OrJLTe81+kXCDPJ5CytuLt4wkl4Gz2DHlDvZMHQ tFLNhv8X6H21xulfhlaGyE45KVektmdQxP0agULQv7vtr4UjI3E8JbMwefd1TSlyuKqK 0xvexJg7iGq3NCakpOUzksoT2Cb0eJNkGyxKkyUKoNpAA7p2TLtmmj+45T8W57DH6uKj +aIfmf8961utw1PyubfESJXQyveZPPpdsY7hm7w2I2YGZMFqk7h3SjO8fksK4qX0SVUG l3llf2EJ5wxU9meVxXDeaT4BNOM7EXoATrPkqsI4l5RgGRplgZk+yf1ld3uW4NDR3bzs uVUQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1737992058; x=1738596858; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=K2QKacaR1w2J0DOe/2A1iWnNo84Ql16Satbz8d4J348=; b=tz2GE3WxV4yZyle030Y+gJdfM4e4roQvgCJIKVj1qTqH4DnRA95Grs0/nT7t3q+3hM 38Ybj4XT8iklSsI1u0mSvhsudokOCjZpDPm3NoLgC5YtcZrbUS3gyVEAKE38rowHYO7c Z/7MTG4qO0WTgIVIJC/eiL1zQMtPp4fliQZXbdd72f4Rab1pmBz6Tmim3cxjZkE97twm hltwnIzo43/ACUxiEV+sRhxzjKGrl603nX7ZZQrRQqtafKu4/BDFBxfrwj0EOiHZh/o/ ghQGBdngNleKlV3lhs9AY9eRPZkxq5L69fInfDzJAkxLjuikANL4cG3Ar5foDoOyu5sN rrwQ== X-Gm-Message-State: AOJu0YwewQbLhQsH2oThqA1l+muoVq3ZQV1UCwcdwU7P7d/AwP4M3ssM dJiNHolkuOEpRVLysljYdpPXL+qikIEiIBW2GbJnS4YqmKLUfgPOmP56QvmbA+IJUYbO0G3D+ef n X-Gm-Gg: ASbGncvfR6kDhewiHdgm0k7RdCewgkU1xet14Dg89cC3rPPwFrwRbYFFmoPjG0waN2w 4Z+mkRsnWS7wsLq14QkVX2BBlm4WqvLFsZHVeCTg9CDcXQYeuUbAW4zX/D7aQOst/q8JG3b8YnZ DSdlRCcZ4N4/WgZ5FKg+7JSgL66oQyCcHJCpfHPOkDyIwHm+iblAqeCZ3RwaCCpkKKqc1RzQWsS C6uAa0+CqUQfUd9W8FnXofJDLn2iaOvHq7+7LTFe0Q6wVj7hUrcYIK5cZVqUhu19dBXNn0l5bO5 VG2cnttz8v8HYGhW97SSqYDA2aFWQuL5moNXDHqmSaiS0PPhkKKRDpTUc/jCGRdIh8/U X-Google-Smtp-Source: AGHT+IEloh1Kwttg6pCvanJlLHnirCN2YmmH2PFhQey08HdVHFNPfJ5MgRHGu5KGGQRd7g7bqkubRw== X-Received: by 2002:a05:6214:2584:b0:6cb:ee08:c1e8 with SMTP id 6a1803df08f44-6e1b21b7b81mr667790436d6.23.1737992058363; Mon, 27 Jan 2025 07:34:18 -0800 (PST) Received: from gourry-fedora-PF4VCD3F.lan (pool-173-79-56-208.washdc.fios.verizon.net. [173.79.56.208]) by smtp.gmail.com with ESMTPSA id 6a1803df08f44-6e2058c2a51sm35380476d6.109.2025.01.27.07.34.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 27 Jan 2025 07:34:18 -0800 (PST) From: Gregory Price To: linux-mm@kvack.org, linux-acpi@vger.kernel.org Cc: kernel-team@meta.com, x86@kernel.org, linux-kernel@vger.kernel.org, dave.hansen@linux.intel.com, luto@kernel.org, peterz@infradead.org, tglx@linutronix.de, mingo@redhat.com, bp@alien8.de, hpa@zytor.com, rafael@kernel.org, lenb@kernel.org, david@redhat.com, osalvador@suse.de, gregkh@linuxfoundation.org, akpm@linux-foundation.org, dan.j.williams@intel.com, Jonathan.Cameron@huawei.com, alison.schofield@intel.com, rrichter@amd.com, rppt@kernel.org, gourry@gourry.net, bfaccini@nvidia.com, haibo1.xu@intel.com, dave.jiang@intel.com, Fan Ni , "Rafael J. Wysocki" , Ira Weiny Subject: [PATCH v8 3/3] acpi,srat: give memory block size advice based on CFMWS alignment Date: Mon, 27 Jan 2025 10:34:05 -0500 Message-ID: <20250127153405.3379117-4-gourry@gourry.net> X-Mailer: git-send-email 2.48.1 In-Reply-To: <20250127153405.3379117-1-gourry@gourry.net> References: <20250127153405.3379117-1-gourry@gourry.net> MIME-Version: 1.0 X-Rspamd-Server: rspam07 X-Rspamd-Queue-Id: 8D3221C0009 X-Stat-Signature: uqdb5twpywxo8sh49gi5t8fkgpkjeaff X-Rspam-User: X-HE-Tag: 1737992059-304905 X-HE-Meta: U2FsdGVkX1/My9hqwq195vVR5ZQY/a6egflouoQjLBqQrZmLSf/GpqEF9HA53OsUUxGTQCkqHWBvgMAtRyF7/WvXO6kIKeZ07/33958NvKlAoazDlp3y+Yk88oIkPMyOzdrF8/tXL7YRQfhS+8/ifOguHNHOeGjunWJ3uxREWpyDFDf3C5r//rDaOtLnxQKCMkX/EbD1wQu96DTZ7MWuKaebmf3eNO1onNZsKLj4+7cpikDJ4Ubxn6miJYogl1dkQipEo21XjZiD2LD2QauzeD/AefSUqzImjUEEcS4qJqC7fAxj65zcN9TQXdmU5lE/08OD4DcZ4Rb9AJoflJexnVh9t68uN3Hsv5kR8G8sXmO+H/U+7f1d+tU/1JS7vDKy+yslD1D0prJpRkQREv+03Tcdsr2oH0zWLoQceWZ39o6nYxqJ3HuX0lKSXl+MTgCUjLTR0511pAgrYMMT/g2w2Cyx5I8zxvqlKV+wJCALfCVLh2RY3xwAwJmTkQGsCLpgHsVdQm3vmQRKuqm74+F/mGwNy6HSK8LT694b24cUr4zm8MqXRYzNQ1B09Qp9KDeTVAjDMXCrvXaGAKZJOlqAU++qjeJFQh9GUOxjqCDtV86YSvyyO1J5h95+oQ9qj928ywidNTAhPlOKqogD25xoSC6Gzn6Syl6RdujWRKpb6WkfxhaUA3xz1rKDhF7+XSA6+1gaK2LbX6AHTcXzM4IdcjwCwjW2HSVglBxOVOuFfVre1NNW9U9AJ8QvGxsnwcpgxyMpXK6EqBhQNGweK5m24ClJ3l3BSVRLo9V7k6Cb8U1f6poOzUhYYxwi+eNVu4z46EbcSMzOU/73MStmfijKl16nPr2NBibglypiQ75aOMJJZZ9Y/DK7eDg/HZA3NWN2ElEde+etyNDxo3Dt7X+aAWdEw3xmQejhPFHT4BLKuqBpREVRq5ltOyyderM8tjlWxXgGAF0xVZMEqzCbo9l T3OI/pLO iTC3+6wAyxCrDvR67n8K2z5/rjbEQgoBHq6Hs5M83lKuURACub4UelZfPNSaYtB3SkyuxOFOCAd0pPMYtvfonf7NvURGkx8OxiwgZDwMjuPwgNrGk88ZyjLhurwJR0vLZAD85fnf9NW1QnRBZmZ5A+HqC21Pfx3xdREB4nTF48tN4pfct9kfXO4r8ihR4b0+wqnh+AmBeveR0/HNy8uvUFNNJSda8lnwNHWBCpA4T+qBZywywkG7SEqJESqHE322zSnoiVsr9/VHJqArW1bsIbAi3R4KiX5RiTCqnJix9+PjuFIvJ8M9eTv/+qmWGXbvL/unqsfrkgFTUW1MRmPPmTJNU/PCvKD3qxmP3vvvXqBwe7ia91EuNmH2O+D83xH4SOLYcZ7Fy1gcGgi7wci6MqcRKOw== 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: Capacity is stranded when CFMWS regions are not aligned to block size. On x86, block size increases with capacity (2G blocks @ 64G capacity). Use CFMWS base/size to report memory block size alignment advice. Suggested-by: Dan Williams Acked-by: Mike Rapoport (Microsoft) Acked-by: David Hildenbrand Acked-by: Dan Williams Tested-by: Fan Ni Acked-by: Rafael J. Wysocki Reviewed-by: Ira Weiny Signed-off-by: Gregory Price --- drivers/acpi/numa/srat.c | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/drivers/acpi/numa/srat.c b/drivers/acpi/numa/srat.c index 59fffe34c9d0..1501a9bb3936 100644 --- a/drivers/acpi/numa/srat.c +++ b/drivers/acpi/numa/srat.c @@ -14,6 +14,7 @@ #include #include #include +#include #include #include #include @@ -425,13 +426,23 @@ static int __init acpi_parse_cfmws(union acpi_subtable_headers *header, { struct acpi_cedt_cfmws *cfmws; int *fake_pxm = arg; - u64 start, end; + u64 start, end, align; int node; + int err; cfmws = (struct acpi_cedt_cfmws *)header; start = cfmws->base_hpa; end = cfmws->base_hpa + cfmws->window_size; + /* Align memblock size to CFMW regions if possible */ + align = 1UL << __ffs(start | end); + if (align >= SZ_256M) { + err = memory_block_advise_max_size(align); + if (err) + pr_warn("CFMWS: memblock size advise failed (%d)\n", err); + } else + pr_err("CFMWS: [BIOS BUG] base/size alignment violates spec\n"); + /* * The SRAT may have already described NUMA details for all, * or a portion of, this CFMWS HPA range. Extend the memblks