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 8D267C54756 for ; Thu, 22 May 2025 09:17:56 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 075DA6B0083; Thu, 22 May 2025 05:17:56 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 025DC6B0085; Thu, 22 May 2025 05:17:55 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id E7E456B008A; Thu, 22 May 2025 05:17:55 -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 C318B6B0083 for ; Thu, 22 May 2025 05:17:55 -0400 (EDT) Received: from smtpin13.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay10.hostedemail.com (Postfix) with ESMTP id 795BFC0C50 for ; Thu, 22 May 2025 09:17:55 +0000 (UTC) X-FDA: 83469991710.13.8BCAE6E Received: from mx0b-001b2d01.pphosted.com (mx0b-001b2d01.pphosted.com [148.163.158.5]) by imf27.hostedemail.com (Postfix) with ESMTP id 3B84140015 for ; Thu, 22 May 2025 09:17:53 +0000 (UTC) Authentication-Results: imf27.hostedemail.com; dkim=pass header.d=ibm.com header.s=pp1 header.b=Pak1SCnU; spf=pass (imf27.hostedemail.com: domain of donettom@linux.ibm.com designates 148.163.158.5 as permitted sender) smtp.mailfrom=donettom@linux.ibm.com; dmarc=pass (policy=none) header.from=ibm.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1747905473; 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: references:dkim-signature; bh=lBDpZiO1yUtTyxHpkb7qLwmM8OHESiXqRzpIRSysli4=; b=Dmg1kJdeihariIZu0zxR8BIGUX2Y57hsqSaIQCagEzNRDsJykuS/ajklPe6r2M4wwjj3QK Q4tK0TU4W/sWirfcum9l1GSDfVepsy3xVqTaD+hiF4nex4ETwxzqLLvi/J6qODkRbWKJdO aIfqsrRyzth0UxmK/lSKj6gNRmtUhAA= ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1747905473; a=rsa-sha256; cv=none; b=EA736aBGgzmlooyEMSphWnBzTneqxu7TUUz5S+HkQaGY4/PbLnbL5A0yS2Y+PWbSz2x+st rPe3kRKD4R2n9qrokD6SYLlwkrMWdfoqOshjGFD0jdOzvWHJj4n+N13u9kOkSbqOG+EWVG 60AMk1kMvxetL+tpkpLc0d+xvtU1xB8= ARC-Authentication-Results: i=1; imf27.hostedemail.com; dkim=pass header.d=ibm.com header.s=pp1 header.b=Pak1SCnU; spf=pass (imf27.hostedemail.com: domain of donettom@linux.ibm.com designates 148.163.158.5 as permitted sender) smtp.mailfrom=donettom@linux.ibm.com; dmarc=pass (policy=none) header.from=ibm.com Received: from pps.filterd (m0353725.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id 54LMchwQ006712; Thu, 22 May 2025 09:17:40 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ibm.com; h=cc :content-transfer-encoding:content-type:date:from:message-id :mime-version:subject:to; s=pp1; bh=lBDpZiO1yUtTyxHpkb7qLwmM8OHE SiXqRzpIRSysli4=; b=Pak1SCnUm0vn0lkHVGST3stHug/QlC/W5UgToDDithnx LjYQWC7TAmuErqikGcEzGCSgiyMbd+JVbIYfu1vig2Y0WMuAASW2f6nkOylZr+Ra MJ+cuJgQ7EXvQQBfPAcKHFLJHvtT6G1bCpcoGiH9R5f6a4Z59OIBAVMH4QdL2+OO +wE46HsMV8HK+OU/pvqzFTAG9XD+5dqbGB/DECuzAlSYUARiH76wjPDpIFUZaNlP v5v6mDiawoxd35J6roGkmWG6ZOsvzmv/z/NkZzLefiwsEl9NlTot215kVSRT/eF+ 0ijRo/TvJCEkOoIrBB/6ZztM0nQgzx2ii+XIOUAeAw== Received: from pps.reinject (localhost [127.0.0.1]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 46sg234s8n-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 22 May 2025 09:17:39 +0000 (GMT) Received: from m0353725.ppops.net (m0353725.ppops.net [127.0.0.1]) by pps.reinject (8.18.0.8/8.18.0.8) with ESMTP id 54M9GImx022491; Thu, 22 May 2025 09:17:39 GMT Received: from ppma13.dal12v.mail.ibm.com (dd.9e.1632.ip4.static.sl-reverse.com [50.22.158.221]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 46sg234s8k-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 22 May 2025 09:17:39 +0000 (GMT) Received: from pps.filterd (ppma13.dal12v.mail.ibm.com [127.0.0.1]) by ppma13.dal12v.mail.ibm.com (8.18.1.2/8.18.1.2) with ESMTP id 54M5KKEo020708; Thu, 22 May 2025 09:17:38 GMT Received: from smtprelay06.fra02v.mail.ibm.com ([9.218.2.230]) by ppma13.dal12v.mail.ibm.com (PPS) with ESMTPS id 46rwkq0rga-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 22 May 2025 09:17:38 +0000 Received: from smtpav03.fra02v.mail.ibm.com (smtpav03.fra02v.mail.ibm.com [10.20.54.102]) by smtprelay06.fra02v.mail.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 54M9Ha4K15008102 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 22 May 2025 09:17:36 GMT Received: from smtpav03.fra02v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id D03A220043; Thu, 22 May 2025 09:17:36 +0000 (GMT) Received: from smtpav03.fra02v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id A3A5320040; Thu, 22 May 2025 09:17:34 +0000 (GMT) Received: from ltczz402-lp1.aus.stglabs.ibm.com (unknown [9.40.194.31]) by smtpav03.fra02v.mail.ibm.com (Postfix) with ESMTP; Thu, 22 May 2025 09:17:34 +0000 (GMT) From: Donet Tom To: David Hildenbrand , Andrew Morton , Mike Rapoport , Oscar Salvador , Zi Yan , Greg Kroah-Hartman Cc: Ritesh Harjani , linux-mm@kvack.org, linux-kernel@vger.kernel.org, "Rafael J . Wysocki" , Danilo Krummrich , Jonathan Cameron , Alison Schofield , Yury Norov , Dave Jiang , Donet Tom Subject: [PATCH v5 1/4] drivers/base/node: Optimize memory block registration to reduce boot time Date: Thu, 22 May 2025 04:17:28 -0500 Message-ID: X-Mailer: git-send-email 2.43.5 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-TM-AS-GCONF: 00 X-Proofpoint-ORIG-GUID: LUMnjde9qio-gsYLBeN9QusqwaycjVgV X-Authority-Analysis: v=2.4 cv=RPmzH5i+ c=1 sm=1 tr=0 ts=682eebb4 cx=c_pps a=AfN7/Ok6k8XGzOShvHwTGQ==:117 a=AfN7/Ok6k8XGzOShvHwTGQ==:17 a=IkcTkHD0fZMA:10 a=dt9VzEwgFbYA:10 a=VwQbUJbxAAAA:8 a=VnNF1IyMAAAA:8 a=Ikd4Dj_1AAAA:8 a=RTzChAaceUBdyRMociwA:9 a=3ZKOabzyN94A:10 a=QEXdDO2ut3YA:10 X-Proofpoint-Spam-Details-Enc: AW1haW4tMjUwNTIyMDA5MSBTYWx0ZWRfX9I2IoEh8COtq ceA2mGtdJIY0N6Co1krUNfXzLWyxSjBEWDQMdD/Y/34Gv8mL7lk7E/QfAbDyKFGKF+UUIaeFOXw nFNBiXfLGdBm4NIx4SrsNCOShpav0LwKP2XQKm8ahuS5NsWFenNVlkY3mZzHV/J16YWADrxq3Tg pUzJLTZk6hTF42jso9glAlblMRX+p5dDhYTpUDV8ARjitWz/x7LtD4JY95vpoSCUDp8g5UySwX7 xd/EyslJ3iBSg4hAJ6gmLz+5Z3u+Ftfur/P0j7dQUTh7C6V2RuQwuBlGU7TAYS2EXzFW25P8zmE 5NXTqBAqQ90ysk35COzpoIAwlmagDVCKgdUivZ8zPvr0Lo4MFASHy+SCuRdKvFDKDbeI/9vtshK UCTq7qAPP7XKJMXjTTPmmrKYUyw747rYiqzdbyEgFK2ONku3h8kgBvENCkrzNeGKry2iMyIe X-Proofpoint-GUID: QUqjqLTmuIxyIVezXSYGb6VrCDuUMpdD X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1099,Hydra:6.0.736,FMLib:17.12.80.40 definitions=2025-05-22_04,2025-05-22_01,2025-03-28_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 clxscore=1015 lowpriorityscore=0 impostorscore=0 adultscore=0 priorityscore=1501 bulkscore=0 phishscore=0 mlxscore=0 malwarescore=0 spamscore=0 mlxlogscore=999 suspectscore=0 classifier=spam authscore=0 authtc=n/a authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.19.0-2505160000 definitions=main-2505220091 X-Rspamd-Server: rspam06 X-Rspamd-Queue-Id: 3B84140015 X-Stat-Signature: esgfbcrn8rmcwfkiy3dur7jxmkoenbhr X-Rspam-User: X-HE-Tag: 1747905473-302161 X-HE-Meta: U2FsdGVkX18xh4V5iLvKU1OVbgjBSyUOAnwFkpL484dgA1O9O3y8VCrc0bnzNL+CHOtLHA7wz6s8TvnQYthU8I4cbtaltI98PNbpjGmEVJaZaXqCT6FIke6/8jrUzRuRV8pXl3Ll+gVuo8iRAJns1eFLGIfXyXlpb02RrFKXu8jJDMs/dAgQmbmIJXj5CAXpzeHzrvxVXSE/bn0cfaxCUWat1CE/yoypZKOL/Zn+AF4ztR8k+X/KO5rclF4uOSv6Oda66S4UjkiepDUju2NP5AARU+dO6hXo9F6KNWGYT2uf0uG3UStY0sTvM0EVoX3jDzU+VL6t6b/noXfRGfMbZLBKzZcmHNrImqFUTu0wSjvaovrgnpNQkM/oW1QyJo/OYtQzmHBMT60wErvm37MAAYHydq7gXhGkmMT0dbH+RzPq/Y+Myk1rLNGZm3dKEl7/MD7BeLaNn4uM5mp14X4FDaXvI9gXgbBYWlPach0FbHB5Au9H3xc3+yJCBnnoKuxWIOrugwrehhZa1aCK2sUWePXD7pbPcQXj8CvpweEkZHzbu6UMMoMSsNIWTnf+2jCoyMiGZO5dSAOuC3MtVSCK4ifZbJLnczJPJE9mN3ydiU08MEuircT8Ri4LvDAt9QibkNG336Co+KCW+4NPgXjrWNR/25SfZ/1WlpX1MwA7dkJO+PrBkqJapgrk6fNPTQTS/dk63LN3paslovDs5w5pYP5MuajIj2Rgp7aD4sR79TJTSy+TMYAU02a1VQdg5DqH2TMhAWnwHgXp98qInQClzolC0j1EVU/S2tN4stQDLb9Tq5nB5wFcHEmXNmLJT5e/G2pKK83YAE7lXrRxlyI+LrGMAzLhUAPvJ2T+5708ponggtX3CdAsvZDwf1IQwFzwEp6e2VU2mgiP+4ymVZiNNWRNa4kjZ8uUQz//kdwiKPNu7XFQ+V/MdQ0q1JtnWHgpoXJbErgRgC4XcX11rIW 88Lz6SNx BW1PkyltUUsjp+ix0AJb5ovcJwHSO1RZvlVdiaPShJKbEaEJEMXgkiwIsfxn2eW839L4mfJ4n79gWV/CIAsaM3aSszu10c9WgZjxlQgI95wZJnspbPWnx0m38SNify7meZaiQMpaMa+5xZai9grJT2QWqnKIWUzuThqzY1TfaAZR7PJfhEb3OpKnxSa706mgXdd9EWWzw57g1StxI586pcaoitzg3C17YjvSCwUC6ezOXysDX99DcfYR8dsY6zAiT3NNRnGGMZfmEZvNHejZjbjjCp7HgpL2z0uPLGyDZW1SsGrSsk/lnoZE3P1OaQReCBQSdHs63QL2koYGgs0lQwiKajxjXH3xFENDQawyNtlTVOQwOeWhsS1l0G2lylpZFnAB4VapxgChMNaIN41ekg/+y45pRv3QoS4mJWOr/yFT8MLsWGOLdUo2/myocqu1cXAR5 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: During node device initialization, `memory blocks` are registered under each NUMA node. The `memory blocks` to be registered are identified using the node’s start and end PFNs, which are obtained from the node's pg_data However, not all PFNs within this range necessarily belong to the same node—some may belong to other nodes. Additionally, due to the discontiguous nature of physical memory, certain sections within a `memory block` may be absent. As a result, `memory blocks` that fall between a node’s start and end PFNs may span across multiple nodes, and some sections within those blocks may be missing. `Memory blocks` have a fixed size, which is architecture dependent. Due to these considerations, the memory block registration is currently performed as follows: for_each_online_node(nid): start_pfn = pgdat->node_start_pfn; end_pfn = pgdat->node_start_pfn + node_spanned_pages; for_each_memory_block_between(PFN_PHYS(start_pfn), PFN_PHYS(end_pfn)) mem_blk = memory_block_id(pfn_to_section_nr(pfn)); pfn_mb_start=section_nr_to_pfn(mem_blk->start_section_nr) pfn_mb_end = pfn_start + memory_block_pfns - 1 for (pfn = pfn_mb_start; pfn < pfn_mb_end; pfn++): if (get_nid_for_pfn(pfn) != nid): continue; else do_register_memory_block_under_node(nid, mem_blk, MEMINIT_EARLY); Here, we derive the start and end PFNs from the node's pg_data, then determine the memory blocks that may belong to the node. For each `memory block` in this range, we inspect all PFNs it contains and check their associated NUMA node ID. If a PFN within the block matches the current node, the memory block is registered under that node. If CONFIG_DEFERRED_STRUCT_PAGE_INIT is enabled, get_nid_for_pfn() performs a binary search in the `memblock regions` to determine the NUMA node ID for a given PFN. If it is not enabled, the node ID is retrieved directly from the struct page. On large systems, this process can become time-consuming, especially since we iterate over each `memory block` and all PFNs within it until a match is found. When CONFIG_DEFERRED_STRUCT_PAGE_INIT is enabled, the additional overhead of the binary search increases the execution time significantly, potentially leading to soft lockups during boot. In this patch, we iterate over `memblock region` to identify the `memory blocks` that belong to the current NUMA node. `memblock regions` are contiguous memory ranges, each associated with a single NUMA node, and they do not span across multiple nodes. for_each_memory_region(r): // r => region if (!node_online(r->nid)): continue; else for_each_memory_block_between(r->base, r->base + r->size - 1): do_register_memory_block_under_node(r->nid, mem_blk, MEMINIT_EARLY); We iterate over all memblock regions, and if the node associated with the region is online, we calculate the start and end memory blocks based on the region's start and end PFNs. We then register all the memory blocks within that range under the region node. Test Results on My system with 32TB RAM ======================================= 1. Boot time with CONFIG_DEFERRED_STRUCT_PAGE_INIT enabled. Without this patch ------------------ Startup finished in 1min 16.528s (kernel) With this patch --------------- Startup finished in 17.236s (kernel) - 78% Improvement 2. Boot time with CONFIG_DEFERRED_STRUCT_PAGE_INIT disabled. Without this patch ------------------ Startup finished in 28.320s (kernel) With this patch --------------- Startup finished in 15.621s (kernel) - 46% Improvement Acked-by: Zi Yan Signed-off-by: Donet Tom --- v4 -> v5 1. Moved all helpers(memory_block_id(), pfn_to_block_id(), and phys_to_block_id()) into memory.h and exported sections_per_block. 2. register_memory_blocks_early() moved out of for_each_online_node(). Now we iterate over all memory regions at once and register the memory blocks. Tested corner cases where memory blocks span across multiple memblock regions; it is working fine. #cd /sys/devices/system/node/ # find node1/ |grep memory0 node1/memory0 # find node0/ |grep memory0 node0/memory0 # find node0/ |grep memory0 node2/memory0 # cat node0/memory0/valid_zones none V4 - https://lore.kernel.org/all/f94685be9cdc931a026999d236d7e92de29725c7.1747376551.git.donettom@linux.ibm.com/ V3 - https://lore.kernel.org/all/b49ed289096643ff5b5fbedcf1d1c1be42845a74.1746250339.git.donettom@linux.ibm.com/ v2 - https://lore.kernel.org/all/fbe1e0c7d91bf3fa9a64ff5d84b53ded1d0d5ac7.1745852397.git.donettom@linux.ibm.com/ v1 - https://lore.kernel.org/all/50142a29010463f436dc5c4feb540e5de3bb09df.1744175097.git.donettom@linux.ibm.com/ --- drivers/base/memory.c | 21 ++++---------------- drivers/base/node.c | 45 ++++++++++++++++++++++++++++++++++++++++-- include/linux/memory.h | 19 +++++++++++++++++- include/linux/node.h | 3 +++ 4 files changed, 68 insertions(+), 20 deletions(-) diff --git a/drivers/base/memory.c b/drivers/base/memory.c index 19469e7f88c2..39fcc075a36f 100644 --- a/drivers/base/memory.c +++ b/drivers/base/memory.c @@ -22,6 +22,7 @@ #include #include #include +#include #include #include @@ -48,22 +49,8 @@ int mhp_online_type_from_str(const char *str) #define to_memory_block(dev) container_of(dev, struct memory_block, dev) -static int sections_per_block; - -static inline unsigned long memory_block_id(unsigned long section_nr) -{ - return section_nr / sections_per_block; -} - -static inline unsigned long pfn_to_block_id(unsigned long pfn) -{ - return memory_block_id(pfn_to_section_nr(pfn)); -} - -static inline unsigned long phys_to_block_id(unsigned long phys) -{ - return pfn_to_block_id(PFN_DOWN(phys)); -} +int sections_per_block; +EXPORT_SYMBOL(sections_per_block); static int memory_subsys_online(struct device *dev); static int memory_subsys_offline(struct device *dev); @@ -632,7 +619,7 @@ int __weak arch_get_memory_phys_device(unsigned long start_pfn) * * Called under device_hotplug_lock. */ -static struct memory_block *find_memory_block_by_id(unsigned long block_id) +struct memory_block *find_memory_block_by_id(unsigned long block_id) { struct memory_block *mem; diff --git a/drivers/base/node.c b/drivers/base/node.c index cd13ef287011..e8b6f6b9ce51 100644 --- a/drivers/base/node.c +++ b/drivers/base/node.c @@ -20,6 +20,7 @@ #include #include #include +#include static const struct bus_type node_subsys = { .name = "node", @@ -850,6 +851,41 @@ void unregister_memory_block_under_nodes(struct memory_block *mem_blk) kobject_name(&node_devices[mem_blk->nid]->dev.kobj)); } +/* + * register_memory_blocks_under_node_early : Register the memory blocks + * under the nodes. + * + * This function iterates over all memblock regions, and if the node associated with + * the region is online, calculates the start and end memory blocks based on the + * region's start and end PFNs. Then, registers all the memory blocks within that + * range under the region node. + */ +static void register_memory_blocks_under_node_early(void) +{ + struct memblock_region *r; + + for_each_mem_region(r) { + const unsigned long start_block_id = phys_to_block_id(r->base); + const unsigned long end_block_id = phys_to_block_id(r->base + r->size - 1); + unsigned long block_id; + + if (!node_online(r->nid)) + continue; + + for (block_id = start_block_id; block_id <= end_block_id; block_id++) { + struct memory_block *mem; + + mem = find_memory_block_by_id(block_id); + if (!mem) + continue; + + do_register_memory_block_under_node(r->nid, mem, MEMINIT_EARLY); + put_device(&mem->dev); + } + + } +} + void register_memory_blocks_under_node(int nid, unsigned long start_pfn, unsigned long end_pfn, enum meminit_context context) @@ -971,11 +1007,16 @@ void __init node_dev_init(void) /* * Create all node devices, which will properly link the node - * to applicable memory block devices and already created cpu devices. + * to already created cpu devices. */ for_each_online_node(i) { - ret = register_one_node(i); + ret = __register_one_node(i); if (ret) panic("%s() failed to add node: %d\n", __func__, ret); } + + /* + * Link the node to memory block devices + */ + register_memory_blocks_under_node_early(); } diff --git a/include/linux/memory.h b/include/linux/memory.h index 12daa6ec7d09..2a61088e17ad 100644 --- a/include/linux/memory.h +++ b/include/linux/memory.h @@ -171,12 +171,30 @@ struct memory_group *memory_group_find_by_id(int mgid); typedef int (*walk_memory_groups_func_t)(struct memory_group *, void *); int walk_dynamic_memory_groups(int nid, walk_memory_groups_func_t func, struct memory_group *excluded, void *arg); +struct memory_block *find_memory_block_by_id(unsigned long block_id); #define hotplug_memory_notifier(fn, pri) ({ \ static __meminitdata struct notifier_block fn##_mem_nb =\ { .notifier_call = fn, .priority = pri };\ register_memory_notifier(&fn##_mem_nb); \ }) +extern int sections_per_block; + +static inline unsigned long memory_block_id(unsigned long section_nr) +{ + return section_nr / sections_per_block; +} + +static inline unsigned long pfn_to_block_id(unsigned long pfn) +{ + return memory_block_id(pfn_to_section_nr(pfn)); +} + +static inline unsigned long phys_to_block_id(unsigned long phys) +{ + return pfn_to_block_id(PFN_DOWN(phys)); +} + #ifdef CONFIG_NUMA void memory_block_add_nid(struct memory_block *mem, int nid, enum meminit_context context); @@ -188,5 +206,4 @@ void memory_block_add_nid(struct memory_block *mem, int nid, * can sleep. */ extern struct mutex text_mutex; - #endif /* _LINUX_MEMORY_H_ */ diff --git a/include/linux/node.h b/include/linux/node.h index 2b7517892230..5c763253c42c 100644 --- a/include/linux/node.h +++ b/include/linux/node.h @@ -120,6 +120,9 @@ static inline void register_memory_blocks_under_node(int nid, unsigned long star enum meminit_context context) { } +static inline void register_memory_blocks_under_node_early(void) +{ +} #endif extern void unregister_node(struct node *node); -- 2.43.5