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 101EBC3ABB2 for ; Wed, 28 May 2025 17:18:27 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 8AA266B0083; Wed, 28 May 2025 13:18:27 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 881406B0088; Wed, 28 May 2025 13:18:27 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 797886B0089; Wed, 28 May 2025 13:18:27 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0016.hostedemail.com [216.40.44.16]) by kanga.kvack.org (Postfix) with ESMTP id 5CED56B0083 for ; Wed, 28 May 2025 13:18:27 -0400 (EDT) Received: from smtpin04.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay02.hostedemail.com (Postfix) with ESMTP id D9D42120F8E for ; Wed, 28 May 2025 17:18:26 +0000 (UTC) X-FDA: 83492975412.04.2E94359 Received: from mx0b-001b2d01.pphosted.com (mx0b-001b2d01.pphosted.com [148.163.158.5]) by imf09.hostedemail.com (Postfix) with ESMTP id 7BA5814000B for ; Wed, 28 May 2025 17:18:24 +0000 (UTC) Authentication-Results: imf09.hostedemail.com; dkim=pass header.d=ibm.com header.s=pp1 header.b=huO3LMEz; spf=pass (imf09.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=1748452704; 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=rNxRMpzTpRqHtbiY/bcnyUNUB7IoSnep9XeZFcyAA3Q=; b=I+ru6NC/xq9uDGMLSxN9QIU0opJCzqlKVWcDHt8dcZTZyeB0H0N2N6SJP+7rwtB51DzAS4 XSgqjxTznH0ev3i+4fYqhJc1x2dwtLhBYYbIfwfVxfm6L16qVLv8zAGl6roqK0sHDuNHum xiGtXjLgRPU47jRlM23KDJiPaRLQS2U= ARC-Authentication-Results: i=1; imf09.hostedemail.com; dkim=pass header.d=ibm.com header.s=pp1 header.b=huO3LMEz; spf=pass (imf09.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-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1748452704; a=rsa-sha256; cv=none; b=Tf6zMaoJ2M0npKK309yk5EwgPNtvT3Z8WEadMnfCrbGvULyepuqYCarlDeGF+y5kLPvKDc +4v643RndVnoRPfQKmDdtq63EBluaRHbsAmJc7rUSkFktDT7/lLvtbGfbaHXu8K4uZ7MYh s2kx/uv2uZtK9UcYI8roXmcptAcqjuo= Received: from pps.filterd (m0360072.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id 54SE9l0t022766; Wed, 28 May 2025 17:18:15 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=rNxRMpzTpRqHtbiY/bcnyUNUB7Io Snep9XeZFcyAA3Q=; b=huO3LMEzguUMP65ukJy9AKeSLNrL1WiMfzMki2ENYB0V NV02vvtk28dqu9FJxtd6/hr/fq0Eb7EVI9cEfxoamOricCVx7P0svH8Jis7lKR+K rFmUVwstv27R/5ASk5NDdC1sLwaLzXuSgdqoF+U8oDI245+x7/tRKYSStMCLdrWY 7VstbyiK17lZx+RMT+1MV72PGtmTu7iOZAH2p3vfHgklagu63lAJJZS/8HBXl0fe oeVPB8LkBPfV1UlxKLVJKB9arIvG/QqN7qqr+SUeYkHpSgF3MMdjPFL+3JcP3rGt sSWFFZoSeCJ9SIOlVridAylqcgDPZQ9BIrrmqciQ0Q== Received: from pps.reinject (localhost [127.0.0.1]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 46x40h10cc-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 28 May 2025 17:18:15 +0000 (GMT) Received: from m0360072.ppops.net (m0360072.ppops.net [127.0.0.1]) by pps.reinject (8.18.0.8/8.18.0.8) with ESMTP id 54SHDEkg009137; Wed, 28 May 2025 17:18:14 GMT Received: from ppma23.wdc07v.mail.ibm.com (5d.69.3da9.ip4.static.sl-reverse.com [169.61.105.93]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 46x40h10cb-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 28 May 2025 17:18:14 +0000 (GMT) Received: from pps.filterd (ppma23.wdc07v.mail.ibm.com [127.0.0.1]) by ppma23.wdc07v.mail.ibm.com (8.18.1.2/8.18.1.2) with ESMTP id 54SFFKel026439; Wed, 28 May 2025 17:18:14 GMT Received: from smtprelay02.fra02v.mail.ibm.com ([9.218.2.226]) by ppma23.wdc07v.mail.ibm.com (PPS) with ESMTPS id 46usxn0f9j-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 28 May 2025 17:18:13 +0000 Received: from smtpav07.fra02v.mail.ibm.com (smtpav07.fra02v.mail.ibm.com [10.20.54.106]) by smtprelay02.fra02v.mail.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 54SHI9cr34275758 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 28 May 2025 17:18:09 GMT Received: from smtpav07.fra02v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 9EBBB2004D; Wed, 28 May 2025 17:18:09 +0000 (GMT) Received: from smtpav07.fra02v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id E88F420040; Wed, 28 May 2025 17:18:06 +0000 (GMT) Received: from ltczz402-lp1.aus.stglabs.ibm.com (unknown [9.40.194.31]) by smtpav07.fra02v.mail.ibm.com (Postfix) with ESMTP; Wed, 28 May 2025 17:18:06 +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 , Madhavan Srinivasan , Nilay Shroff , linuxppc-dev@lists.ozlabs.org, Donet Tom Subject: [PATCH v7 1/5] drivers/base/node: Optimize memory block registration to reduce boot time Date: Wed, 28 May 2025 12:18:00 -0500 Message-ID: <2a0a05c2dffc62a742bf1dd030098be4ce99be28.1748452241.git.donettom@linux.ibm.com> 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-GUID: cnWZHcMqQQ42pRsCFB6mUvkfzaW15eh1 X-Proofpoint-ORIG-GUID: VB-UuhShpyTVBAeKxCo3gvpYJlXY6-Sy X-Proofpoint-Spam-Details-Enc: AW1haW4tMjUwNTI4MDE0OCBTYWx0ZWRfX/bKOXGZb5Gf3 UQSg044X/FmMij/Vmp5xVk4nkN6mTDwAvIkdwKXVwtz3d2zebTlv9grk+5pYhXMWNwXFTo3Aq/Z KiXFA5q7zXSzo1kw2scBpk2aaKCxJ2jQ8mlHT7NEo9LIYPgxqnvVtK9wwycLHzsDs1PNB7n9wHo oFg4rt9wjUpd7L3orevrh16OsHqANognCBUP1FjpREfQuN+jFOObApz1rIIqo9X0jpI8wk2eiDt 3N+4v5xaCNxYI1CHcryKB8wQIerG+lDLifBf6WCEz6zAqOae2i7pjFA8VpySIUy6P6rX5/PZ1Rr j5hcqDZSXpw40nCE48P6GRANKMWZM+a18CEmykGL4tz9Si4PaXWi+OUdAw5DLDW8dCe6wXVxgm0 Ia6BEI/fXdOzHw3f+vYuhyY8U3Y0Cyrk+YogiSMwXMpDHjIHrVAeQ5zVT1tYCkRwAKl/8cME X-Authority-Analysis: v=2.4 cv=L8MdQ/T8 c=1 sm=1 tr=0 ts=68374557 cx=c_pps a=3Bg1Hr4SwmMryq2xdFQyZA==:117 a=3Bg1Hr4SwmMryq2xdFQyZA==:17 a=IkcTkHD0fZMA:10 a=dt9VzEwgFbYA:10 a=VwQbUJbxAAAA:8 a=VnNF1IyMAAAA:8 a=20KFwNOVAAAA:8 a=Ikd4Dj_1AAAA:8 a=y_Vbiix7gtgA8xZMur0A:9 a=3ZKOabzyN94A:10 a=QEXdDO2ut3YA:10 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-28_08,2025-05-27_01,2025-03-28_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 mlxscore=0 impostorscore=0 adultscore=0 spamscore=0 phishscore=0 bulkscore=0 clxscore=1015 priorityscore=1501 lowpriorityscore=0 mlxlogscore=999 suspectscore=0 malwarescore=0 classifier=spam authscore=0 authtc=n/a authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.19.0-2505160000 definitions=main-2505280148 X-Rspamd-Server: rspam01 X-Rspamd-Queue-Id: 7BA5814000B X-Stat-Signature: b8r6h3sfmq6dhxesw6ce494a3pb17sd3 X-Rspam-User: X-HE-Tag: 1748452704-381588 X-HE-Meta: U2FsdGVkX19HoLFli+G6GfdQu/hx+um+jmj3Gq3N7ymOeMGBPuUoZXHQDkg8+gHNEQ7VYKIvWVabCGHDYRFaCAnS0qFkuQzVrqrir9L02ohu2Ei82q2++6w5CaV05GEXbv5P++yu/WJ4zjxrAjMDKSXCvFRFqp9bc+V4NWVoiKBl21iklAIUXKoAhJCOaRnJrnhA2jFF0XRqbaXJd8VaTTbiXp3+PeOdmShiwG8l35keFfjbLik5bZHf1lOMvKgTx+SnyYJkVqzwFczTHmA1YPHF0k/DBglVYZi45rcoCr7y1KoBeQgYf2ntqLRlMEr2aEDrzOfxRA9uc0Ume0KmN1V7WlXJLR6O/E+G/rBALrIdhuBQzvD4mrc1rn7BLDqifQK93UpnDCsizhhmB/T/MSPs2Kvwkb2wZzSs2UeKyItUXNH9NIx0WLbqHML8TDiYk44hL1WMebjRIahGQu93UvOXibIFBvADaGSD/B6YrQf1VgLY/F3sMZ+mCjc1yq0izrUg2500ugdG/zVVY4NN77/T/Abm/vqpLIHcnl9cKxeT8TXIFNg/Zgo6cqqso/4ZtEkwAUvcEi8OfK73Xqy9HfPOYyiKXOVU6aN5pRw5ucZ3d7ELvG+xSw+BpFQce+m0JgGoN0gasGsNy/ad2WjCai59rjIbITkBVRoTiKl0vSMSYnEiuYOoCh1uqAbSWPCBJ/TF98ceMFeAb7uOY9MNSMu+GEN68UfLV50PDQdxQf0z6e+A4mNKWzP9W9zct7mdo0G3Ub3hMuFIxlNaItuy4tp4CJilrM/Z1qXpVFs9+Jl9ptIjFGz7KBiYdHVN4XmtkvdQ8fCeoj6/iV1rKhchPC7+LDsKcMpTFQ0ga9PJrz744ud9VDNbrsk89jeXp5yswFe0fFdeFD9ACUkp+yU5iiFRIrw50kxNzbbKPDp7du641IgRYYcMQ7hGDVkAxgNR4V1X+qFIbjks9OcEzGe LWMdcctm Ky4GMSgmg6wjhuHMyAG/ilghIqMGfuc8HfiEkSDKXKrbZ+Fpoj8cF6DzTypWoSWgUDJVpwcwzHDe2SbrHj86Touk+vbsPazBEXQtkyiEmnklMrvkE9BPqSGBD+JYjuIgA+GhVIADX8SvSE6Bb0zRj2y68n1/BN5Umvs5uK3FwhhldRHzQ1mGwtwZtN5jJWYrwnp5v/ZyqBHCVfxH8WIP4lCK1tIlxWGAZsfCRj/NZe2FgeKp/aNkHcfGJP4tEd0QJWAffvtJp/dRcvNE2K6FughoJfC1aMIcOvE2f9ZRWO2dHMWU6NuSA/j4R53b5ATuqUuE5WLqkpJctwRaFHPjLPPT7TeOgrB/mbbZa5GzrHE2mpCAy5fPyFHU+6KK8jH67Wfzk 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: David Hildenbrand Acked-by: Oscar Salvador Acked-by: Mike Rapoport (Microsoft) Acked-by: Zi Yan Signed-off-by: Donet Tom --- v6 -> v7 Removed unwanted comments v6 - https://lore.kernel.org/all/bc754a238aa91fa36be463985ccde66aac7055e7.1748270306.git.donettom@linux.ibm.com/ v5 - https://lore.kernel.org/all/d2490e807b2c13950bc1d4199f22ec078cc4c56a.1747904868.git.donettom@linux.ibm.com/ 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 | 35 +++++++++++++++++++++++++++++++++-- include/linux/memory.h | 19 ++++++++++++++++++- include/linux/node.h | 3 +++ 4 files changed, 58 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 618712071a1e..b229dee13632 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,34 @@ void unregister_memory_block_under_nodes(struct memory_block *mem_blk) kobject_name(&node_devices[mem_blk->nid]->dev.kobj)); } +/* register all memory blocks under the corresponding nodes */ +static void register_memory_blocks_under_nodes(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); + const int nid = memblock_get_region_node(r); + unsigned long block_id; + + if (!node_online(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(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 +1000,13 @@ 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); } + + register_memory_blocks_under_nodes(); } 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..485370f3bc17 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_nodes(void) +{ +} #endif extern void unregister_node(struct node *node); -- 2.43.5