Storage space allocation method, FM management unit and computing system

By cyclically allocating storage space blocks in the CXL storage pool, the problem that node storage space requirements in traditional computing architecture cannot be met is solved, and efficient sharing of storage space and full utilization of bandwidth is achieved.

CN119902696APending Publication Date: 2025-04-29XFUSION DIGITAL TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202311413529.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-10-27
Publication Date
2025-04-29

AI Technical Summary

Technical Problem

In traditional computing architecture, nodes can only use the storage space provided by the memory connected to the node, and cannot meet the node's needs for storage space.

Method used

A storage space allocation method is provided, and the storage space blocks are circulated to the nodes in the CXL storage pool through the FM management unit to ensure the balanced distribution and efficient utilization of the storage space.

Benefits of technology

Multiple nodes share storage space in the CXL storage pool, improving bandwidth utilization and performance of storage space, and reducing the complexity of storage space management.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119902696A_ABST
    Figure CN119902696A_ABST
Patent Text Reader

Abstract

The embodiment of the invention provides a storage space allocation method, an FM management unit and a computing system, and belongs to the field of computing equipment. The FM management unit is applied to the CXL storage pool and used for distributing storage space in the CXL storage pool and receiving a storage space distribution request from a node; in response to the storage space allocation request, determining the number of configuration blocks based on the configuration capacity, executing at least one round of block allocation process until the number of the blocks allocated to the node is greater than or equal to the number of the configuration blocks, each round of block allocation process comprises the step of sequentially allocating a set number of blocks provided by a plurality of storage devices to the nodes, and the blocks are unit storage spaces of one storage device. According to the embodiment of the invention, the storage spaces provided by the storage devices in the CXL storage pool are distributed to the nodes as many as possible, so that the performance is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of computing devices, and in particular to a storage space allocation method, a FM management unit and a computing system. Background Art

[0002] In traditional computing architectures, nodes are connected to storage via a bus, and nodes can only use the storage space provided by the storage to which they are connected. In scenarios where nodes require more storage space, this solution cannot meet the node's demand for storage space. Summary of the invention

[0003] The present application provides a storage space allocation method, an FM management unit and a computing system, which realize cyclic allocation of storage space provided by multiple storage devices to nodes in blocks, thereby improving performance.

[0004] In a first aspect, a storage space allocation method is provided. The method is applied to an FM management unit of a CXL storage pool, where the FM management unit is used to allocate storage space in the CXL storage pool, including: receiving a storage space allocation request from a node, where the storage space allocation request includes an initial configuration capacity, where the initial configuration capacity is used to indicate the capacity corresponding to the storage space allocated from the CXL storage pool to the node by the FM management unit, where the CXL storage pool includes multiple storage devices; in response to the storage space allocation request, determining a configuration block number based on the configuration capacity, where the configuration block number is used to characterize the size of the configuration capacity, performing at least one round of block allocation process until the number of blocks allocated to the node is greater than or equal to the configuration block number, where each round of block allocation process includes sequentially allocating a set number of blocks provided by multiple storage devices to the node, where a block is a unit storage space of a storage device.

[0005] In the method provided in the first aspect, since the number of configuration blocks is determined according to the initial configuration capacity included in the storage space allocation request of the first node, at least one round of block allocation process is performed until the number of blocks allocated to the node is greater than or equal to the number of configuration blocks, which helps the storage space provided by the CXL storage pool to be shared and allocated by multiple nodes. In addition, the storage space required by each node is relatively evenly distributed on multiple storage channels of the CXL pooling pool, so that multiple nodes can concurrently access the storage space of the storage device, which is conducive to giving full play to the storage space bandwidth.

[0006] In addition, since the storage space is allocated in blocks, the capacity of the storage space allocated each time in each cycle is fixed (the capacity of the storage space allocated each time is the capacity of a set number of blocks), thereby reducing the complexity of FM storage space management and facilitating the development of new features such as expansion and contraction management in the future.

[0007] In some implementations, the process of allocating blocks in each round includes:

[0008] An allocation order of the plurality of storage devices is determined based on a circular allocation chain, and a set number of blocks are allocated from the plurality of storage devices in sequence according to the allocation order. The circular allocation chain is a circular linked list indicating the allocation order.

[0009] In some implementations, allocating a set number of blocks from a plurality of storage devices in sequence according to an allocation order includes:

[0010] When the head pointer of the circular allocation chain points to the first storage device among multiple storage devices, a set number of blocks are allocated from the first storage device to the node; the position of the head pointer is updated to point to the second storage device, and the second storage device is the next storage device of the first storage device in the circular allocation chain.

[0011] In some embodiments, the method further comprises:

[0012] The remaining block quantity of the first storage device is updated, and the updated remaining block quantity is the difference between the remaining block quantity of the first storage device before the update and the set quantity.

[0013] In some embodiments, the process of allocating blocks in each round includes allocating all remaining blocks of the first storage device to the node when it is determined that the current number of remaining blocks of the first storage device among the multiple storage devices is less than the set number of blocks.

[0014] In some embodiments, the method further comprises:

[0015] The number of remaining blocks of the first storage device is updated to zero.

[0016] In some implementations, the process of allocating blocks in each round includes:

[0017] When it is determined that the number of remaining blocks of the first storage device among multiple storage devices is less than the set number of blocks, the first storage device is skipped when allocating blocks in this round, so that the first storage device does not participate in the storage space allocation of the set number of blocks to the node in this round.

[0018] In some embodiments, the method further comprises:

[0019] If the total number of remaining blocks of the multiple storage devices is less than the number of configured blocks or the number of configured blocks is less than or equal to zero, a configuration error message is sent to the node. The total number of remaining blocks refers to the sum of the number of remaining blocks of each storage device in the multiple storage devices.

[0020] In some embodiments, the method further comprises:

[0021] The set number is determined based on the number of configuration blocks and the number of storage devices in the CXL storage pool, and the set number is a ratio between the number of configuration blocks and the number of storage devices in the CXL storage pool.

[0022] In a third aspect, a FM management unit is provided, where the FM management unit is used to allocate storage space in a CXL storage pool, including:

[0023] A receiving unit, configured to receive a storage space allocation request from a node, the storage space allocation request including an initial configuration capacity, the initial configuration capacity being used to indicate the capacity corresponding to the storage space allocated from the CXL storage pool to the node by the FM management unit, the CXL storage pool including a plurality of storage devices;

[0024] A determination unit is used to respond to a storage space allocation request, determine the number of configuration blocks based on the configuration capacity, the number of configuration blocks is used to characterize the size of the configuration capacity, and perform at least one round of block allocation process until the number of blocks allocated to the node is greater than or equal to the number of configuration blocks. Each round of block allocation process includes allocating a set number of blocks provided by multiple storage devices to the node in turn, and a block is a unit storage space of a storage device.

[0025] In some embodiments, the device further comprises:

[0026] The allocation unit is used to determine the allocation order of multiple storage devices based on the circular allocation chain in each round of block allocation, and allocate a set number of blocks from the multiple storage devices in sequence according to the allocation order. The circular allocation chain is a circular linked list indicating the allocation order.

[0027] In some embodiments, the allocation unit is used to allocate a set number of blocks from a first storage device to a node when a head pointer of a circular allocation chain points to a first storage device among multiple storage devices; and update the position of the head pointer to point to a second storage device, which is the next storage device of the first storage device in the circular allocation chain.

[0028] In some implementations, the determination unit is further configured to update the number of remaining blocks of the first storage device, where the updated number of remaining blocks is the difference between the number of remaining blocks of the first storage device before the update and the set number.

[0029] In some implementations, the allocating unit is configured to allocate all remaining blocks of the first storage device to the node when it is determined that the current number of remaining blocks of the first storage device among the multiple storage devices is less than the set number of blocks.

[0030] In some implementations, the determining unit is further configured to update the number of remaining blocks of the first storage device to zero.

[0031] In some embodiments, the allocation unit is used to skip the first storage device when allocating blocks in this round when it is determined that the number of remaining blocks of the first storage device among multiple storage devices is less than the set number of blocks, so that the first storage device does not participate in the storage space allocation of the set number of blocks to the node in this round.

[0032] In some embodiments, the device also includes: a sending unit, which is used to send a configuration error message to the node if the total number of remaining blocks of the multiple storage devices is less than the number of configuration blocks or the number of configuration blocks is less than or equal to zero, and the total number of remaining blocks refers to the sum of the number of remaining blocks of each storage device in the multiple storage devices.

[0033] In some embodiments, the determining unit is further configured to determine the set number based on the number of configuration blocks and the number of storage devices in the CXL storage pool, where the set number is a ratio between the number of configuration blocks and the number of storage devices in the CXL storage pool.

[0034] In a fourth aspect, a FM management unit is provided, characterized in that the FM management unit includes: a processor, the processor is coupled to a memory, at least one computer program instruction is stored in the memory, and the at least one computer program instruction is loaded and executed by the processor to enable the FM management unit to perform the method in the implementation methods of the first to fourth aspects.

[0035] In a fifth aspect, a computing system is provided, the computing system comprising: a node, a FM management unit and a CXL storage pool, the CXL storage pool comprising multiple storage devices, the node being connected to the FM management unit, the FM management unit being used to allocate and manage storage space in the CXL storage pool; the FM management unit being used to implement the method provided in the first aspect or any optional manner of the first aspect.

[0036] In a sixth aspect, a computer-readable storage medium is provided, wherein the storage medium stores at least one instruction, and when the instruction is executed on a computer, the computer executes the method provided by the first aspect or any optional manner of the first aspect.

[0037] In the seventh aspect, a computer program product is provided, which includes one or more computer program instructions. When the computer program instructions are loaded and executed by a computer, the computer executes the method provided by the first aspect or any optional method of the first aspect.

[0038] In an eighth aspect, a chip is provided, comprising a memory and a processor, wherein the memory is used to store computer instructions, and the processor is used to call and run the computer instructions from the memory to execute the method in the above-mentioned first aspect and any possible implementation of the first aspect.

[0039] Based on the implementations provided in the above aspects, this application can also be further combined to provide more implementations. BRIEF DESCRIPTION OF THE DRAWINGS

[0040] Figure 1 It is a schematic diagram of an application scenario provided by an embodiment of the present application;

[0041] Figure 2 is a schematic diagram of the hardware architecture of a computing system provided in an embodiment of the present application;

[0042] Figure 3 is a schematic diagram of a cyclic distribution chain provided in this embodiment;

[0043] Figure 4 is a flow chart of a memory allocation method provided by this embodiment;

[0044] Figure 5 is a flow chart of another storage space allocation method provided by this embodiment;

[0045] Figure 6 This is a flowchart of another storage space allocation method provided in an embodiment of the present application. DETAILED DESCRIPTION

[0046] In order to make the objectives, technical solutions and advantages of the present application clearer, the implementation methods of the present application will be further described in detail below with reference to the accompanying drawings.

[0047] The following is an explanation of some terminology concepts involved in the embodiments of the present application.

[0048] (1) Compute Express Link (CXL) protocol

[0049] The CXL protocol is an open industrial standard, based on the peripheral component interconnect express (PCIe) protocol, for high-bandwidth, low-latency device interconnection. The CXL protocol can be used to connect devices such as central processing units (CPUs), accelerators, memory caches, and smart network cards. The CXL protocol can be used in scenarios such as artificial intelligence (AI) and high-performance computing. CXL reuses three types of protocols based on PCIe 5.0, namely CXL.io, CXL.cache, and CXL.memory. The CXL.io protocol is used to detect devices, configurations, register accesses, and interrupts that support the CXL protocol. The CXL.cache protocol is used for the server to access the memory of the processor inside the server and cache the memory from the processor. The CXL.memory protocol is used for the server's processor to access the server's internal memory.

[0050] (2) Fabric management (Fabric management or Fabric manager or Fabric memory, FM)

[0051] FM is a software used to manage and allocate storage space in the CXL storage pool to provide a large amount of storage space to nodes. There are many types of hardware responsible for running FM. For example, FM is run by a CXL switch chip (CXL switch), or by a CXL memory expansion card (CXL expander), or by a CXL controller; or by a CPU; or by a baseboard manager controller (BMC). In this embodiment, the hardware entities running FM are collectively referred to as FM management units. FM management units may include management software and hardware devices running the management software. For example, the FM management unit may be a CXL controller, a CXL switch chip, or other control chips inside a node, or it may be an independent hardware device, such as an independent server or other terminal device.

[0052] (3) Node

[0053] A node is the smallest computing unit in a computing device. A node may include components such as a central processing unit (CPU), a south bridge chip, an internal memory, a PCIe device, and their peripheral circuits. The computing device may be a server, or a tablet computer, a personal computer, a mobile phone, or other terminal devices. The node may also include an accelerator, such as a tensor processing unit (TPU), a graphics processing unit (GPU), a neural network processing unit (NPU), a data processing unit (DPU), or a smart network interface card (smart NIC, referred to as a smart network card). A node may also be software running on a computing device. For example, a node may also be a virtual machine or a container. In this embodiment, the node supports the CXL protocol, and the node may communicate with a storage device via the CXL protocol. For example, a node may include one or more CPUs, one or more GPUs, and other chips.

[0054] (4) Storage devices

[0055] Storage devices are used to provide storage space for nodes to save data. Storage devices can be memory or hard disk. Memory can be either random access memory or read-only memory (ROM). For example, random access memory is dynamic random access memory (DRAM) or storage class memory (SCM). DRAM is a semiconductor memory, and like most random access memory (RAM), it is a volatile memory device. SCM is a composite storage technology that combines the characteristics of traditional storage devices and memory. Storage class memory can provide faster read and write speeds than hard disks, but has slower access speeds than DRAM and is cheaper than DRAM. Memory can also include other random access memories, such as static random access memory (SRAM). Read-only memory is, for example, programmable read only memory (PROM) or erasable programmable read only memory (EPROM). Exemplarily, the storage device is a dual in-line memory module or a dual in-line memory module (DIMM) memory stick. For example, the storage device is a module composed of DRAM. Exemplarily, the storage device is a memory expansion card. Exemplarily, the storage device is a memory disk with a PCIe interface. Alternatively, the storage device is a hard disk. For example, the storage device is a solid state drive (SSD) or a hard disk drive (HDD).

[0056] The embodiments of the present application relate to application scenarios of a CXL storage pool, which may include storage space provided by multiple storage devices. In order to distinguish different storage devices, "first storage device" and "second storage device" are used to distinguish and describe multiple different storage devices. Since the processing logic of FM for memory allocation from each storage device is similar, in order to describe clearly and concisely, the embodiments of the present application focus on the process of how FM allocates the storage space of the first storage device to the node as an example. The process of FM allocating storage space to other storage devices other than the first storage device can refer to the process of allocating the storage space of the first storage device to the node.

[0057] (5) Configuration capacity

[0058] Configuration capacity can also be called demand capacity, and configuration capacity represents the capacity of storage space that a node needs to obtain from the CXL storage pool. Configuration capacity can also be understood as the capacity of storage space that FM needs to allocate to the node. In some implementations of the present application, if the configuration capacity required by the node is relatively large, and the storage space capacity allocated by FM to the node at one time is less than the configuration capacity, then FM needs to continue to allocate storage space in the CXL storage pool to the node, that is, FM needs to allocate storage space to the node multiple times. Every time FM allocates storage space to the node, FM updates the configuration capacity, for example, FM subtracts the capacity of the allocated storage space from the initial configuration capacity as the updated configuration capacity, so as to determine how much storage space needs to be further allocated to the node through the updated configuration capacity. Configuration capacity should be understood as the current configuration capacity, that is, the configuration capacity can be a dynamic variable that changes with the stage in which FM allocates storage space from the storage pool to the first node. For example, the current configuration capacity may be the initial configuration capacity indicated in the storage space application request sent by the first node to the FM; the current configuration capacity may also be the configuration capacity for the second round of storage space allocation to the first node after FM completes one round of storage space allocation for the first node; the current configuration capacity may be the configuration capacity for the next round of storage space allocation to the first node after FM completes another round of storage space allocation for the first node. Exemplarily, the above-mentioned initial configuration capacity may be understood as the total configuration capacity required for the first node, and the current configuration capacity may be the initial configuration capacity minus the storage capacity allocated by FM to the first node for the first time, and the current configuration capacity may also be the initial configuration capacity minus the total storage capacity allocated by FM to the first node for the first and second times. It should be understood that the size of the current configuration capacity is associated with the number of times the FM management unit allocates storage space to the first node.

[0059] (6) Block

[0060] Blocks are used as the granularity or unit for allocating storage space. FM can allocate one or more blocks in a storage device to a node. The capacity of a block is the set block capacity. A block can be a storage space with a continuous physical address, or a block can include multiple storage spaces with discontinuous physical addresses. All storage spaces in a block are usually located on the same storage device. In one possible implementation, FM divides the available storage space of each storage device in the CXL storage pool according to the set block capacity to obtain multiple blocks. Subsequently, FM allocates the storage space of the storage device to the node in units of blocks. The set block capacity can be a default value or a configurable value. The specific value of the set block capacity can be set by the user according to requirements.

[0061] (7)Total number of blocks

[0062] The total number of blocks of a storage device refers to the number of blocks obtained by dividing the storage space of the storage device according to the set block capacity. The total number of blocks of a storage device is equivalent to the maximum number of blocks that the storage device can provide to nodes. Based on the total number of blocks of a storage device, FM can determine the maximum number of blocks that can be allocated from the storage device to nodes. For example, if the specification capacity of a storage device is 100G and the set block capacity is 1G, then the total number of blocks of the storage device is the ratio of the specification capacity of the storage device to the set block capacity, and the total number of blocks = 100G / 1G = 100.

[0063] (8) Number of blocks used

[0064] The number of used blocks can also be called the number of allocated blocks. The number of used blocks refers to the number of blocks on the storage device that have been allocated to the node. For example, if the total number of blocks on a storage device is 100, and FM allocates 20 blocks to the node, the number of used blocks is 20.

[0065] (9) Number of remaining blocks

[0066] The number of remaining blocks can also be called the number of unallocated blocks, free blocks, or available blocks. The number of remaining blocks refers to the number of blocks in the storage device that have not been allocated to nodes for use. For example, if a storage device has a total of 100 blocks, and FM allocates 20 blocks of the storage device to nodes, the number of remaining blocks of the storage device is 100-20=80.

[0067] (10) Total number of remaining blocks

[0068] The total number of remaining blocks refers to the sum of the number of remaining blocks of each storage device in the multiple storage devices in the circular allocation chain. The total number of remaining blocks is, for example, obtained by adding the number of remaining blocks of each storage device in the circular allocation chain. The total number of remaining blocks is used to indicate the total amount of blocks that have not yet been allocated in the circular allocation chain. For example, the circular allocation chain includes storage device A, storage device B, and storage device C, and the number of remaining blocks of storage device A, storage device B, and storage device C are 10, 20, and 30 respectively, then the total number of remaining blocks = the number of remaining blocks of storage device A + the number of remaining blocks of storage device B + the number of remaining blocks of storage device C = 10 + 20 + 30 = 60, indicating that there are 60 blocks in the circular allocation chain that have not yet been allocated.

[0069] (11) Configuration capacity

[0070] Configuration capacity can also be called demand capacity. Configuration capacity refers to the amount of storage space that a node needs to obtain. Configuration capacity can also be understood as the amount of storage space that FM needs to allocate to a node. For example, configuration capacity is obtained from a storage capacity application request initiated by a node.

[0071] (12)Configuration block number

[0072] The number of configuration blocks can characterize the configuration capacity in units of blocks. The number of configuration blocks is the ratio between the number of configuration blocks and the set block capacity. The number of configuration blocks represents the number of blocks required by a node. The number of configuration blocks can also be understood as the number of blocks that FM needs to allocate to a node. In some implementations of the present application, whenever FM allocates a block to a node, FM updates the number of configuration blocks. For example, FM subtracts the number of allocated blocks from the initial number of configuration blocks as the updated number of configuration blocks, so as to determine how many blocks need to be further allocated to the node through the updated number of configuration blocks. In order to distinguish different numbers of configuration blocks, "initial number of configuration blocks" and "current number of configuration blocks" are used to distinguish different numbers of configuration blocks.

[0073] (13) Storage Channel

[0074] A storage channel refers to a channel between a node and a storage device. A storage channel is used to transmit data or instructions between a node and a storage device. For example, if the CXL storage pool is a memory pool, a storage channel is a memory channel, and a memory channel is a channel between a processor (such as a CPU) and a memory. For another example, a storage channel is a channel between a CPU and a hard disk.

[0075] (14) Storage channel bandwidth

[0076] The bandwidth of a storage channel refers to the amount of data that can be transmitted in a storage channel per unit time. The larger the bandwidth of a storage channel, the faster the storage read and write speed, thereby speeding up data access and processing and improving performance. Improving the bandwidth of a storage channel is particularly important for applications that require large data throughput and high-performance computing, such as data centers, scientific computing, and massively parallel computing.

[0077] (15) Storage capacity table

[0078] The storage capacity table is used to record the information of all storage devices in the CXL storage pool. The information of the storage device includes the identification of the storage device and the block parameters of the storage device. The identification of the storage device is used to identify the corresponding storage device. The identification of the storage device is, for example, the serial number of the storage device. The block parameters of the storage device include but are not limited to the total number of blocks of the storage device, the number of used blocks of the storage device, and the number of remaining blocks of the storage device. In a possible implementation, the memory capacity table is also used to record the total block parameters of all storage devices in the CXL storage pool. The total block parameters include the sum of the total number of blocks of all storage devices in the total CXL storage pool, the total number of used blocks, and the total number of remaining blocks.

[0079] In a possible implementation of generating a storage capacity table, when FM is powered on, FM detects all storage devices connected to FM, FM reads the information of the corresponding storage device from each storage device (such as the identification of the storage device, the total number of blocks of the storage device, and the number of remaining blocks of the storage device), and FM generates a storage capacity table based on the information of all storage devices. The storage capacity table includes information of all storage devices connected to FM. FM saves the storage capacity table when it is powered off, so that it can read the storage capacity table and continue to use the memory capacity table for storage space allocation when it is powered on next time. FM can save the memory capacity table on the persistent storage in the hardware where FM is located, and FM can also save the storage capacity table on the persistent storage of a node.

[0080] Exemplarily, the storage capacity table is shown in Table 1 below. The items in the row with ellipsis ... in Table 1 represent the number of blocks, the number of used blocks, and the number of remaining blocks of storage devices that are not shown in Table 1 but exist. The items in the row of summary represent the sum of the total number of blocks, the total number of used blocks, and the total number of remaining blocks of m storage devices in the CXL storage pool. The total number of used blocks is obtained by summing the number of used blocks of storage device 1 (4), the number of used blocks of storage device 2 (2) ... the number of used blocks of storage device m (2), and the total number of remaining blocks is obtained by summing the number of remaining blocks of storage device 1 (60), the number of remaining blocks of storage device 2 (30) ... the number of remaining blocks of storage device m (30).

[0081] Table 1 Storage capacity table

[0082] Storage device identification Total blocks Number of blocks used Number of remaining blocks Storage device 1 64 4 60 Storage Device 2 32 2 30 …… …… …… …… Storage device m 32 2 30 Summary The total number of blocks Total number of blocks used Total remaining blocks

[0083] The following is an example of an application scenario of the embodiment of the present application.

[0084] The embodiments of the present application can be applied to a scenario where FM allocates storage space to a node from a CXL storage pool. Figure 1 (a) or Figure 1 In (b), the storage space in the CXL storage pool is, for example, the memory space provided by the memory stick. Figure 1 In (c), the storage space in the CXL storage pool includes the memory space provided by the memory module, the storage space provided by the SSD, and the storage space provided by the HDD.

[0085] To facilitate understanding, the following first introduces the CXL storage pooling technology.

[0086] In the architecture of traditional computing devices, such as Figure 1As shown in (a), the memory stick is directly connected to node 1 through a bus, for example, it is connected to the CPU in node 1 (CPU is not shown in the figure), and node 1 can only use the storage space provided by the memory stick directly connected to it. For example, node 1 is directly connected to memory stick 1, memory stick 2 and memory stick 3, and node 2 is directly connected to memory stick 4, memory stick 5 and memory stick 6. The storage space of any memory stick in memory stick 1, memory stick 2 and memory stick 3 can only be allocated to node 1 for use and cannot be allocated to node 2 for use. The storage space of any memory stick in memory stick 4, memory stick 5 and memory stick 6 can only be allocated to node 2 for use and cannot be allocated to node 1 for use, resulting in each node being able to use only the storage space provided by three memory sticks. In addition, the memory capacity and bandwidth available to the CPU in the node will be limited by the number of CPU pins, and the memory capacity and bandwidth are difficult to expand. Among them, a node can include one or more CPU computing modules and / or one or more GPU computing modules, and a node can be a server, or multiple nodes can be deployed on a server.

[0087] The problem of memory capacity and bandwidth being limited by CPU pins can be solved by establishing a storage pool system through the CXL protocol. For example, a large number of memory sticks are combined into a storage pool, and then the storage pool is connected to multiple nodes using the CXL protocol, so that the storage space in the storage pool can be allocated to multiple nodes as needed. For example, please refer to the attached Figure 1 (b), attached Figure 1 (b) shows a scenario of interconnecting multiple nodes and storage pools based on a CXL controller. Memory bars 1, 2 to 6 form a storage pool. Some interfaces of the CXL controller are connected to each of the memory bars 1, 2 to 6, and another part of the interfaces of the CXL controller are connected to node 1 and node 2. FM runs on the CXL controller, and the CXL controller manages the allocation of storage space of each of the memory bars 1, 2 to 6 based on FM. The CXL controller can allocate the storage space of any memory bar from 1 to 6 to node 1 or node 2, so that node 1 and node 2 can share the storage space of 6 memory bars. Since each node connected to the CXL controller can share the storage space of all memory bars connected to the CXL controller, the problem of memory capacity and bandwidth being limited by CPU pins is solved to a certain extent.

[0088] For example, please refer to the attached Figure 1 (c), attached Figure 1(c) shows a scenario where multiple CPUs and storage pools are interconnected based on CXL switching chips. FM can also be run on CXL switching chips to manage and allocate storage space in the storage pool. In addition, CXL switching chips can provide more interfaces than CXL controllers. CXL switching chips can connect to multiple nodes and storage pools, allowing more nodes to share the storage space in the storage pool.

[0089] The storage pool implemented based on CXL (hereinafter referred to as CXL storage pool) is composed of memory bars, which is only exemplary. The CXL storage pool can also be composed of other types of storage devices. For example, the CXL storage pool can also include hard disks such as SSD or HDD. For example, FM allocates the storage space in the SSD as storage space to the node. In addition, the storage capacity of each storage device in the CXL storage pool can be the same; the storage capacity of each storage device in the CXL storage pool can also be different; the type of each storage device in the CXL storage pool can be the same, for example, the type of each storage device in the CXL storage pool is a DIMM memory bar. Alternatively, the type of each storage device in the CXL storage pool can also be different. For example, the type of some storage devices in the CXL storage pool is a DIMM memory bar, and the type of other storage devices is a hard disk.

[0090] In addition, allocating the storage space in the CXL storage pool to the CPU is only exemplary, and the storage space in the CXL storage pool may also be allocated to other hardware entities, for example, allocating the storage space in the CXL storage pool to an accelerator or a server.

[0091] In summary, please refer to the attached Figure 2 , attached Figure 2 1 is a schematic diagram of the hardware architecture of a computing system 10 provided in an embodiment of the present application. Figure 2 The computing system 10 shown may be a Figure 1 The system shown in (b) or the attached Figure 1 The system shown in (c).

[0092] The computing system 10 includes n nodes, a FM management unit 200 , and a CXL storage pool. The CXL storage pool includes m storage devices, where n is a positive integer greater than or equal to 1, and m is a positive integer greater than or equal to 1.

[0093] Nodes 1-n can be used to process business data. Nodes 1-n can use the storage space provided by the CXL storage pool to store business data. For further explanation of nodes, please refer to (3) in the above terminology concept section. Figure 2 Node 1 in the Figure 1 (b) or attached Figure 1 Node 1 in (c) is attached Figure 2 Node 2 in the Figure 1 (b) or attached Figure 1 Node 2 in (c).

[0094] Nodes 1-n can be n servers, or multiple nodes can be deployed in one server, for example, nodes 1-4 are deployed in one server, and nodes 5-n are deployed in other servers. The corresponding quantity relationship between nodes and servers is not specifically limited here. The n nodes can be separated from each other. For example, the n nodes are n servers. The n nodes can also be integrated in the same hardware device. For example, the n nodes are deployed in the same server.

[0095] In some implementations, the n nodes, Node 1 to Node n, are deployed on a server, and the CXL storage pool is a storage system independent of the server.

[0096] The FM management unit 200 is a hardware entity that runs the FM 221. The FM management unit 200 is, for example, an attached Figure 1 The CXL controller shown in (b) of FIG. 1 is also shown in FIG. Figure 1 The CXL switch chip shown in (c) of FIG. FM management unit 200 is also a CXL storage expansion card, such as a CXL memory expansion card.

[0097] The FM management unit 200 includes a processor 210, a memory 220, an interface 230, an interface 240, and a bus 250. The processor 210, the memory 220, the interface 230, and the interface 240 are communicatively connected via the bus 250.

[0098] The bus 250 may be a peripheral component interconnect (PCI) bus, a PCIe bus, or an extended industry standard architecture (EISA) bus. The bus may be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Figure 2 The bus 250 is represented by only one line, but it does not mean that there is only one bus or one type of bus. The bus 250 may include a path for transmitting information between various components of the FM management unit 200 (eg, the processor 210, the memory 220, the interface 230, and the interface 240).

[0099] The interface 230 uses a transceiver module such as, but not limited to, a network interface card, a transceiver, an optical module, etc. to realize communication between the FM management unit 200 and the n nodes. The interface 230 is, for example, one interface, or the interface 230 includes a combination of multiple interfaces. The present embodiment does not limit the number of interfaces 230.

[0100] The interface 240 uses a transceiver module such as, but not limited to, a network interface card, a transceiver, or an optical module to implement communication between the FM management unit 200 and the m storage devices in the CXL storage pool. In a possible implementation, the interface 240 is a PCIe interface, each of the m storage devices in the CXL storage pool includes a PCIe interface, and the PCIe interface of the FM management unit 200 is connected to the m storage devices in the CXL storage pool via a PCIe bus. The interface 240 is, for example, a single interface, or a combination of multiple interfaces. The present embodiment does not limit the number of interfaces 240.

[0101] The CXL storage pool is a storage device independent of the nodes 1 - n; the FM management unit may be independent of the server deployed by the nodes 1 - n and the CXL storage pool, for example, the FM management unit may be another computing device or a terminal device.

[0102] The FM management unit 200 may also be integrated with each storage device in the CXL storage pool in the same device. For example, the FM management unit 200 may also be integrated with each storage device in the CXL storage pool in a storage server. The FM management unit 200 may be a CXL controller, a CXL switch chip, or other control chips inside a node, or may be an independent hardware device, such as an independent server or other terminal device.

[0103] Currently, there is a lack of solutions for how to allocate storage space in the CXL storage pool. Based on this, an embodiment of the present application provides a method for cyclically allocating storage space provided by each storage device in the CXL storage pool. For example, FM cyclically allocates blocks from each storage device according to the configuration capacity until the allocated blocks meet the configuration capacity (for example, the number of allocated blocks is greater than or equal to the number of configuration blocks corresponding to the configuration capacity), so that the storage space required by the node is relatively evenly distributed on multiple storage channels in the entire computing system 10, supporting nodes to concurrently access multiple storage devices to read and write data, thereby improving the performance of reading and writing data. Taking the CXL storage pool as a memory pool as an example, the storage channel is, for example, a memory channel. For example, please refer to the attached Figure 2 , Figure 2 In the figure, rectangles represent blocks. Each storage device from storage device 1, storage device 2, ... to storage device m has a total of 5 blocks (the total number of blocks is 5). FM allocates 2 blocks from each storage device from storage device 1, storage device 2, ... to storage device m to the node in turn. Figure 2 Two blocks are represented by two rectangles filled with patterns.

[0104] For example, in a possible implementation, FM determines the total number of blocks (configured number of blocks) required to be allocated based on the configured capacity according to the set block capacity, and forms a circular allocation chain with all storage devices in the computing system 10 that participate in the storage space allocation, and allocates the set number of blocks from each storage device that participates in the storage space allocation in turn according to the circular allocation chain, until the total number of blocks provided by each storage device that participates in the storage space allocation meets the configured number of blocks (such as the total number of blocks provided by each storage device is greater than or equal to the configured number of blocks), and the allocation is terminated, so that as many storage devices as possible in the CXL storage pool participate in the storage space allocation. In particular, when the number of configured blocks is greater than or equal to the number of storage devices that need to participate in the storage space allocation and one block is allocated from each storage device each time, all storage devices that need to participate in the storage space allocation can provide storage space for the same node, support nodes to concurrently access all storage devices that need to participate in the storage space allocation, and nodes can use the storage channel between the node and all storage devices that need to participate in the storage space allocation to read and write data, thereby improving the bandwidth utilization of the storage channel.

[0105] A circular allocation chain is a circular linked list for indicating the allocation order of storage devices participating in storage space allocation. The circular allocation chain may include information of all storage devices participating in storage space allocation. The circular allocation chain includes a plurality of linked list items, each of which corresponds to a storage device that needs to participate in memory allocation. Each linked list item is used to store information of a corresponding storage device (such as an identifier of the corresponding storage device and a block parameter of the corresponding storage device, wherein the block parameter includes the total number of blocks, the number of used blocks, and the number of remaining blocks.

[0106] For example, please refer to the attached Figure 3 , attached Figure 3 This is a schematic diagram of a circular allocation chain provided in an embodiment of the present application. When there are m storage devices participating in memory allocation in the CXL storage pool, FM establishes a circular allocation chain including m linked list items. The m linked list items from linked list item 1 to linked list item m in the circular allocation chain are respectively used to store the identifiers of the m storage devices from storage device 1 to storage device m and the block parameters of the storage devices, where m is a positive integer greater than or equal to 2. Figure 3 In the circular allocation chain shown, the head pointer points to linked list item 1, which stores the total number of blocks of storage device 1, the number of used blocks of storage device 1, and the number of remaining blocks of storage device 1. Linked list item 2 stores the total number of blocks of storage device 2, the number of used blocks of storage device 2, and the number of remaining blocks of storage device 2. Similarly, linked list item m stores the total number of blocks of storage device m, the number of used blocks of storage device m, and the number of remaining blocks of storage device m. Figure 3 The ... in the figure represents the linked list items that exist in the circular allocation chain but are not shown in the figure.

[0107] The linked list item pointed to by the head pointer is the head of the circular allocation chain, and the head pointer is used to locate the starting position of the circular allocation. The linked list item pointed to by the head pointer is used to save the identification of the storage device to be provided with the block and the block parameters of the storage device. During each memory allocation, FM can access the linked list item pointed to by the head pointer, and FM reads the identification of the storage device and the block parameters of the storage device saved in the linked list item. FM can determine whether the number of remaining blocks in the block parameters of the storage device is greater than or equal to the set number of blocks. If the number of remaining blocks in the block parameters of the storage device is greater than or equal to the set number of blocks, FM determines the storage device based on the identification of the storage device. After FM allocates the set number of blocks from the storage device to the node, FM updates the position of the head pointer to point to the next linked list item in the circular allocation chain, so that the head pointer jumps to the next linked list item, which is equivalent to the head pointer pointing to the next storage device.

[0108] In some embodiments, the set number of blocks is determined based on the number of configured blocks and the number of storage devices in the CXL storage pool. For example, the set number of blocks is the ratio between the number of configured blocks and the number of storage devices in the CXL storage pool. For example, if the number of configured blocks is 100 and the CXL storage pool contains 10 storage devices, if the set number of blocks for each storage device is the same, then the set number of blocks is 100 / 10=10. Alternatively, different storage devices correspond to different set numbers of blocks.

[0109] In other embodiments, the number of setting blocks is determined based on the configuration instruction. For example, the user inputs the configuration instruction in the FM, and the FM obtains the number of setting blocks carried in the configuration instruction in response to receiving the configuration instruction.

[0110] For the sake of simplicity, the storage device corresponding to the identifier of the storage device stored in the linked list entry pointed to by the head pointer in the circular allocation chain is referred to as the storage device pointed to by the head pointer. Figure 3 In the circular allocation chain shown, the head pointer points to storage device 1.

[0111] Since FM updates the position of the head pointer every time it allocates a block from a storage device, the position of the head pointer changes dynamically, and the head pointer always points to the next storage device that needs to provide a block. For example, please refer to the attached Figure 3 , the head pointer first points to storage device 1, so FM allocates blocks from storage device 1 to the node. After FM allocates the blocks provided by storage device 1 to the node, FM updates the head pointer to point to storage device 2. After FM allocates blocks from storage device 2 to the node, FM updates the head pointer to point to storage device 3, and so on.

[0112] Since blocks are allocated using a circular allocation chain, the probability of performance degradation caused by the imbalance of the number of blocks provided by different storage devices due to the allocation of only blocks provided by fixed storage devices to nodes is reduced. For example, if FM only allocates blocks from fixed storage devices each time, the load on the storage device will be too large and the resource utilization of other storage devices will decrease, resulting in uneven resource utilization of different storage devices in the CXL storage pool. In addition, allocating blocks from fixed storage devices to nodes also results in a limited number of storage channels that the node can use, which limits the performance of the node in reading and writing data.

[0113] Instead, a circular allocation chain is used to allocate blocks. Each time, a block is allocated to a node from the storage device pointed to by the head pointer, and after the allocation, the head pointer is updated to point to the next storage device. This allows the storage device responsible for providing blocks to change dynamically, and allows as many blocks provided by storage devices as possible to be allocated to nodes.

[0114] In addition, when the head pointer points to the last linked list item (the last storage device) in the circular allocation chain, FM allocates the block of the last storage device to the node, ending a round of circular allocation block process, and then the head pointer will jump to the first linked list item (the first storage device) in the circular allocation chain. If the total number of blocks allocated to the node by all storage devices is still less than the configured number of blocks, then the next round of circular allocation block process will be triggered. FM will allocate the block of the first storage device to the node next time, so that the last linked list item in the circular allocation chain is connected to the first linked list item in the circular allocation chain to form a loop, forming a closed loop. For example, please refer to the attached Figure 3 , attached Figure 3 The line between linked list item m and linked list item 1 in the figure represents the allocation order of blocks allocated from storage device 1 after the blocks are allocated from storage device m.

[0115] In addition, when the head pointer jumps from a storage device that has allocated blocks to the next storage device, if the number of remaining blocks of the next storage device is insufficient, for example, the number of remaining blocks of the next storage device is less than the set number of blocks or the number of remaining blocks of the next storage device is 0, the head pointer can continue to jump from the next storage device to the next storage device, so that FM cancels the allocation of blocks from the next storage device, and FM allocates blocks from the next storage device. For example, in a round of cyclic allocation of blocks, FM allocates k blocks from a storage device to the node each time, and the head pointer points to storage device i (i is the identifier of the storage device, which is a positive integer greater than or equal to 1 in the embodiment of the present application). After FM allocates k blocks from storage device i to the node, if the number of remaining blocks of storage device (i+1) is less than k, the head pointer jumps to point to storage device (i+2), so that FM cancels the allocation of blocks from storage device (i+1) and allocates blocks from storage device (i+2). If the number of remaining blocks of storage device (i+1) is greater than or equal to k, FM allocates k blocks from storage device (i+1) to the node. In addition, if the number of remaining blocks of storage device (i+2) is less than k, the head pointer jumps from storage device (i+2) to storage device (i+3) until the number of remaining blocks of the storage device pointed to by the head pointer is greater than or equal to k, where k is a positive integer greater than or equal to 1.

[0116] The circular allocation chain may be stored in a persistent memory in the hardware entity running the FM. The circular allocation chain may also be stored in a persistent memory of a node.

[0117] The circular allocation chain can be created by FM. In a possible implementation, FM creates an initial circular linked list; FM obtains information about each storage device in the CXL storage pool that is connected to FM and has a non-zero remaining capacity, and FM writes the information of each storage device obtained into each linked list item in the initial circular linked list in sequence, thereby obtaining a circular allocation chain. Alternatively, FM determines multiple target storage devices whose remaining capacity is not zero and matches the setting parameters from the CXL storage pool according to the setting parameters pre-configured by the user, and FM writes the information of each target storage device into each linked list item in the initial circular linked list in sequence, thereby obtaining a circular allocation chain. The setting parameters configured by the user are, for example, the type of storage device. The type of storage device is, for example, a hard disk or a memory. The matching of the parameters of the target storage device with the setting parameters is, for example, that the type of the storage device is the same as the type of the pre-set storage device. For example, the user sets the type of storage device participating in the storage space allocation to be a memory, and FM determines a storage device whose remaining capacity is not zero and whose type is a memory from the CXL storage pool as the target storage device.

[0118] Regarding the arrangement order of information of different storage devices in the circular allocation chain, in a possible implementation, the information of different storage devices in the circular allocation chain is arranged in the arrangement order of the identifiers of the corresponding storage devices. Take the storage device identifier as the storage device number as an example, for example, the storage devices that need to participate in memory allocation in the CXL storage pool are storage device 1, storage device 2...storage device 10, then FM writes the information of storage device 1 to the first linked list item, FM writes the information of storage device 2 to the second linked list item, and so on, so that the information of each storage device in the circular allocation chain is arranged in the order of the corresponding storage device number from small to large, so that FM allocates blocks from each storage device to the node in the order of the storage device number from small to large in the process of executing memory allocation.

[0119] For the number of blocks allocated from each storage device in each cycle of FM, in a possible implementation, the user pre-configures the set number of blocks on FM. The set number of blocks is used to indicate the number of blocks that FM allocates from a storage device at one time in one cycle. For example, if the set number of blocks is k, FM allocates k blocks from a storage device to a node at a time during the process of allocating blocks in one cycle, and the storage device provides k blocks to the node at a time, where k is a positive integer greater than or equal to 1.

[0120] In one implementation, after a storage device allocates storage space to a first node once, FM updates the number of configuration blocks. For example, when the number of blocks is set to 1, the head pointer points to storage device 1, a total of 10 storage devices in the CXL storage pool participate in storage space allocation, and the number of configured blocks is 12, FM can first allocate 1 block from storage device 1 to the node, and FM updates the number of configured blocks from 12 to 11; then FM allocates 1 block from storage device 2 to the node, and FM updates the number of configured blocks from 11 to 10; then FM allocates 1 block from storage device 3 to the node, and FM updates the number of configured blocks from 10 to 9, and so on. After FM allocates 1 block from storage device 10 to the node, FM updates the number of configured blocks to 2; FM completes the first round of cyclic block allocation process, and then FM allocates 1 block from storage device 1 to the node again, FM updates the number of configured blocks from 2 to 1, and then FM allocates 1 block from storage device 2 to the node again, and FM updates the number of configured blocks from 1 to 0, thereby allocating 12 blocks to the node.

[0121] For example, when the number of blocks is set to 2, the head pointer points to storage device 1, a total of 10 storage devices in the CXL storage pool participate in storage space allocation, and the number of configured blocks is 24, FM can first allocate 2 blocks from storage device 1 to the node, and FM updates the number of configured blocks from 24 to 22; then FM allocates 2 blocks from storage device 2 to the node, FM updates the number of configured blocks from 22 to 20, and then FM allocates 2 blocks from storage device 3 to the node, FM updates the number of configured blocks from 20 to 18, and so on. After FM allocates 2 blocks from storage device 10 to the node, FM completes the first round of cyclic block allocation process. The current number of configured blocks is still greater than zero, indicating that the storage space provided by the CXL storage pool to the node still does not meet the node's needs and needs to be further allocated. FM allocates 2 blocks from storage device 1 to the node again, FM updates the number of configured blocks from 4 to 2, and then FM allocates 2 blocks from storage device 2 to the node again, FM updates the number of configured blocks from 2 to 0, thereby allocating 24 blocks to the node.

[0122] In another implementation, FM updates the number of configuration blocks after completing a round of storage space allocation.

[0123] In a possible implementation, FM allocates memory to each storage device in the circular allocation chain based on the same set number of blocks. In other words, FM allocates the same number of blocks from each storage device in a round of cyclic allocation of blocks. In other words, each storage device provides the same number of blocks each time. For example, FM allocates k blocks from storage device 1 at a time, and FM allocates k blocks from storage device 2 at a time. Since each storage device provides the same number of blocks each time, the blocks required by the node are distributed as evenly as possible in each storage device in the CXL storage pool, so that the utilization of the storage space of different storage devices is as balanced as possible, reducing the probability of uneven load on different storage devices.

[0124] The specific value of the set block number can be determined by the user according to needs, and this embodiment does not limit the specific value of the set block number.

[0125] The storage devices that need to participate in memory allocation in the CXL storage pool are, for example, all storage devices connected to FM, or storage devices that are connected to FM and match the setting parameters configured by the user. For example, the user divides the CXL storage pool into multiple storage device groups, each storage device group includes one or more storage devices. The user assigns a corresponding group identifier to each storage device group. The storage space application request sent by the node includes the group identifier, thereby specifying that storage space is allocated from the storage devices in the corresponding storage device group. FM can use all storage devices in the storage device group corresponding to the group identifier as storage devices that need to participate in memory allocation in the CXL storage pool.

[0126] Attached Figure 4 FIG. 1 is a flow chart of a storage space allocation method provided by this embodiment. Figure 4 The method shown includes the following steps S401 to S412.

[0127] Attached Figure 4 The method shown can be applied to the Figure 1 For example, the system architecture shown in (b) is Figure 4 In the method shown, FM is the Figure 1 (b) CXL controller, attached Figure 4 The node in the method shown is attached Figure 1 (b) Node 1 or Node 2.

[0128] Attached Figure 4 The method shown can also be applied to the Figure 1 The system architecture is shown in (c). Figure 4 In the method shown, FM is the Figure 1 (c) CXL switch chip, attached Figure 4 The node in the method shown is attached Figure 1 (c) Node 1 or Node 2.

[0129] Attached Figure 4 The method shown can also be applied to the Figure 2 For example, the attached Figure 4 In the method shown, FM is the Figure 2 The software running in the FM management unit 200 is attached Figure 4 The node in the method shown is attached Figure 2 Any node among the n nodes, attached Figure 4 In the method shown, the CXL storage pool is attached Figure 2 CXL storage pool.

[0130] Step S401: The node sends a storage space application request to the FM.

[0131] The storage space application request is used to request FM to allocate storage space for the node. The storage space includes the storage space and the storage space provided by the hard disk. The node sends a storage space application request to FM to inform FM that the node needs to obtain storage space, thereby triggering FM to perform the storage space allocation process. The storage space application request can be a message with the encapsulation format specified by the CXL protocol.

[0132] In one possible implementation, the storage space application request is used to indicate the configuration capacity that the first node requests to be allocated. The configuration capacity indicates the capacity of the storage space that the node needs to obtain, and the configuration capacity can be understood as how much storage space the node needs. For example, if the node needs to obtain a storage space with a capacity of 60G, the storage space application request sent by the node to the FM can carry a data indication of "60G", where 60G is a specific example of the configuration capacity. Since the storage space application request includes the configuration capacity, the FM can accurately determine the capacity of the storage space that needs to be allocated to the node based on the configuration capacity.

[0133] Optionally, the storage space application request further includes a group identifier, which is used to identify a corresponding storage device group in the CXL storage pool. Since the storage space application request includes the group identifier, the FM is notified to allocate storage space to the node from the specified storage device group.

[0134] In one possible implementation, the storage space application request includes the number of configured blocks. The number of configured blocks indicates the number of blocks that the node needs to obtain. For example, if the node needs to obtain 100 blocks, the storage space application request sent by the node to the FM may carry a data indication of "100", where 100 is a specific example of the initial number of configured blocks.

[0135] Step S402, FM receives a storage space allocation request. FM compares the total number of remaining blocks of multiple storage devices participating in the storage space allocation in the CXL storage pool with the initial configuration number of blocks. If the total number of remaining blocks is greater than or equal to the initial configuration number of blocks, FM further executes step S403. If the total number of remaining blocks is less than the initial configuration number of blocks, FM further executes step S412.

[0136] Regarding the method of obtaining the initial number of configuration blocks, when the storage space application request includes the configuration capacity, FM obtains the configuration capacity carried in the storage space application request, and FM obtains the initial number of configuration blocks based on the configuration capacity and the set block capacity. The initial number of configuration blocks is positively correlated with the configuration capacity, and the initial number of configuration blocks is negatively correlated with the set block capacity. For example, FM obtains the ratio between the configuration capacity and the set block capacity as the initial number of configuration blocks. When the storage space application request includes the initial number of configuration blocks, FM obtains the initial number of configuration blocks carried in the storage space application request.

[0137] In a possible implementation of determining the total number of remaining blocks, FM searches the storage space capacity table based on the identifier of each storage device that needs to participate in the storage space allocation in the CXL storage pool to obtain the number of remaining blocks of each storage device that needs to participate in the storage space allocation; FM accumulates the number of remaining blocks of each storage device that needs to participate in the storage space allocation to obtain the total number of remaining blocks. In another possible implementation of determining the total number of remaining blocks, the storage space capacity table itself records the total number of remaining blocks of all storage devices that participate in the storage space allocation in the CXL storage pool, and FM searches the storage space capacity table to obtain the total number of remaining blocks. In another possible implementation of determining the total number of remaining blocks, FM searches the storage space capacity table based on the group identifier to obtain the number of remaining blocks of each storage device belonging to the storage device group corresponding to the group identifier in the CXL storage pool, and FM accumulates the number of remaining blocks of each storage device in the storage device group to obtain the total number of remaining blocks of the storage device group. Alternatively, FM can also search for the number of remaining blocks of the storage device stored in each linked list item in the circular allocation chain, and FM accumulates the number of remaining blocks of the storage device stored in each linked list item to obtain the total number of remaining blocks.

[0138] Step S403, FM determines the first storage device pointed to by the head pointer of the circular allocation chain.

[0139] This embodiment is described by taking the case where the head pointer points to the first storage device in the CXL storage pool as an example. The first storage device can be any storage device in the CXL storage pool. The storage space allocation process when the head pointer points to other storage devices is the same as the storage space allocation process when the head pointer points to the first storage device.

[0140] Step S404, FM determines whether the number of remaining blocks in the first storage device is greater than or equal to the set number of blocks.

[0141] In some embodiments, the set number of blocks is determined based on the number of configured blocks and the number of storage devices in the CXL storage pool. For example, the set number of blocks is the ratio between the number of configured blocks and the number of storage devices in the CXL storage pool. For example, if the number of configured blocks is 100 and the CXL storage pool contains 10 storage devices, if the set number of blocks for each storage device is the same, then the set number of blocks is 100 / 10=10. Alternatively, different storage devices correspond to different set numbers of blocks.

[0142] In other embodiments, the number of setting blocks is determined based on the configuration instruction. For example, the user inputs the configuration instruction in the FM, and the FM obtains the number of setting blocks carried in the configuration instruction in response to receiving the configuration instruction.

[0143] FM can use the set number of blocks as a condition to measure whether the number of remaining blocks of the storage device is sufficient. If the number of remaining blocks of the first storage device is greater than or equal to the set number of blocks, FM further executes step S405. If the number of remaining blocks of the first storage device is less than the set number of blocks, FM further executes step S409 or steps S410 to S411.

[0144] In another possible implementation, when the number of blocks is set to 1, step S404 is replaced by the following step S414.

[0145] In step S414, the FM determines whether the number of remaining blocks of the first storage device is greater than 0. If the number of remaining blocks of the first storage device is greater than 0, the FM further executes step S405. If the number of remaining blocks of the first storage device is 0, it means that the first storage device has no remaining blocks available for allocation, and the FM further executes step S409.

[0146] Step S405 , FM allocates storage space of a set number of blocks from the first storage device to the node.

[0147] If the number of remaining blocks of the first storage device is greater than or equal to the set number of blocks, in this case, the number of remaining blocks of the first storage device is sufficient, and the first storage device can provide storage space according to the set number of blocks. For example, the set number of blocks is 2, which means that FM allocates 2 blocks from a storage device to the node at a time during a round of block allocation. The number of remaining blocks of the first storage device is 3. Since the number of remaining blocks of the first storage device (3) is greater than the set number of blocks (2), FM allocates 2 blocks from the first storage device to the node.

[0148] Step S406: FM updates the number of remaining blocks and the number of configured blocks of the first storage device.

[0149] Regarding the process of updating the number of remaining blocks of the first storage device, since FM allocates a set number of blocks from the first storage device, FM can update the number of remaining blocks of the first storage device based on the set number of blocks. For example, FM subtracts the set number of blocks from the number of remaining blocks of the first storage device, thereby updating the number of remaining blocks of the first storage device. The updated number of remaining blocks of the first storage device is the difference between the remaining blocks of the first storage device before the update and the set number of blocks. Exemplarily, FM searches the storage space capacity table based on the identifier of the first storage device, and updates the number of remaining blocks of the first storage device corresponding to the identifier of the first storage device recorded in the storage space capacity table. For example, the number of remaining blocks of the first storage device recorded in the storage space capacity table is 3. After FM allocates 2 blocks to the node from the first storage device, FM subtracts 2 from the number of remaining blocks of the first storage device recorded in the storage space capacity table, so that the number of remaining blocks of the first storage device recorded in the storage space capacity table is updated from 3 to 1. Exemplarily, FM accesses the linked list item corresponding to the first storage device in the circular allocation chain, and updates the current number of remaining blocks of the first storage device stored in the linked list item to the difference between the number of remaining blocks before the first storage device performs storage space allocation and the set number of blocks.

[0150] Regarding the process of updating the initial number of configuration blocks, since FM allocates storage space of the set number of blocks to the node from the first storage device, FM can update the number of configuration blocks based on the set number of blocks to obtain the current number of configuration blocks, and the current number of configuration blocks is the updated number of configuration blocks. For example, FM subtracts the set number of blocks from the initial number of configuration blocks to obtain the current number of configuration blocks. The current number of configuration blocks is the difference between the initial number of configuration blocks and the set number of blocks. Exemplarily, the initial number of configuration blocks is 60. After FM allocates 2 blocks to the node from the first storage device, FM subtracts the set number of blocks (2) from the initial number of configuration blocks (60) to obtain the current number of configuration blocks as 58, indicating that FM still needs to continue to allocate 58 blocks to the node.

[0151] FM updates the number of configuration blocks after allocating blocks, so that it can determine whether the required total storage space has been provided for the node based on the updated number of configuration blocks. In other words, FM can determine whether the cyclic allocation process can be ended or the storage space allocation process needs to be further executed based on the updated number of configuration blocks.

[0152] Step S407, FM updates the position of the head pointer of the circular allocation chain to point to the next storage device of the first storage device in the circular allocation chain.

[0153] For example, the next storage device of the first storage device in the circular allocation chain is the second storage device. FM updates the head pointer to point to the second storage device, thereby facilitating the use of a storage space allocation method similar to steps S404 to S406 to allocate a set number of blocks provided by the second storage device to the node, thereby realizing circular allocation of blocks from each storage device.

[0154] Step S407 may be performed after step S406, or before step S406, or simultaneously with step S406. This embodiment does not limit the time sequence between step S407 and step S406.

[0155] Step S408, FM determines whether the number of current configuration blocks is less than or equal to zero.

[0156] FM can use whether the number of configuration blocks is less than or equal to zero as a trigger condition to determine whether the storage space allocation process can be terminated. For example, if the current number of configuration blocks is less than or equal to zero, FM ends the storage space allocation process. Specifically, if the current number of configuration blocks is zero, it means that the number of blocks FM has allocated to the node is equal to the initial number of configuration blocks, which is equivalent to that the allocated storage space has met the needs of the node. Therefore, FM does not need to allocate storage space for the node, and FM can end the storage space allocation process. If the current number of configuration blocks is less than zero, it means that the number of blocks FM has allocated to the node is greater than the initial number of configuration blocks, which is equivalent to that the allocated storage space not only meets the needs of the node but also gives the node more blocks. Therefore, FM does not need to allocate storage space for the node, and FM can end the storage space allocation process.

[0157] For example, the initial number of configuration blocks is 20, the number of blocks is set to 3, the circular allocation chain includes 7 storage devices, and the number of remaining blocks of each storage device in the circular allocation chain is greater than 3. Then FM allocates 3 blocks to the node from each of the 7 storage devices in turn. When FM traverses to the 7th storage device, FM allocates 3 blocks to the node from the 7th storage device. After FM updates the number of configuration blocks, the updated number of configuration blocks is = 20-21 = -1. Based on the fact that the updated number of configuration blocks is less than 0, FM ends the storage space allocation process.

[0158] If the current number of configuration blocks is greater than zero, it indicates that the number of blocks that FM has allocated to the node is less than the initial number of configuration blocks, which means that the storage space allocated by FM has not yet met the needs of the node, so FM can return to execute step S403 based on the current number of configuration blocks. Since the head pointer has been updated to point to the next storage device of the first storage device, after FM returns to execute step S403, FM will execute the storage space allocation process for the next storage device, thereby continuing to allocate blocks to the node until the number of configuration blocks is zero, and FM ends the storage space allocation process.

[0159] Step S409: If the number of remaining blocks in the first storage device is less than the set number of blocks, FM skips the first storage device.

[0160] If the number of remaining blocks of the first storage device is less than the set number of blocks, it indicates that the number of remaining blocks of the first storage device is insufficient. In this case, FM can cancel the step of allocating blocks from the first storage device once, which is equivalent to FM skipping the first storage device in this cycle. For example, if the set number of blocks is 3 and the number of remaining blocks of the first storage device is 2, FM skips the first storage device.

[0161] FM can update the head pointer of the circular allocation chain to point to the second storage device, and the second storage device is the next storage device of the first storage device in the circular allocation chain. FM returns to execute step S403 for the second storage device, so as to allocate the storage space of the set number of blocks from the second storage device to the node. For example, the circular allocation chain includes N storage devices, then the next storage device of storage device i is storage device (i+1), and the next storage device of storage device N is the first storage device 1, and i is a positive integer less than N. Since FM skips the storage device with insufficient number of remaining blocks, it is convenient for the next storage device of the storage device to continue to allocate blocks.

[0162] Step S412: If the total number of remaining blocks of the multiple storage devices in the circular allocation chain is less than the initial number of configured blocks, the FM sends a configuration error message to the node.

[0163] A configuration error message indicates that the FM cannot configure storage space for the node. For example, a configuration error message indicates that an error occurred in the storage space allocation process.

[0164] If the total number of remaining blocks of multiple storage devices is less than the number of initially configured blocks, it indicates that the node has requested too much storage space, and the storage space requested by the node exceeds the total amount of storage space that FM can allocate (the total number of remaining blocks of all storage devices in the CXL storage pool). Even if FM allocates all the remaining blocks of all storage devices to the node, the allocated blocks still cannot meet the node's needs. In this case, FM does not need to execute the storage space allocation process, and FM directly notifies the node of a configuration error.

[0165] If the number of initial configuration blocks is less than or equal to zero, it indicates that the node does not need storage space. Therefore, when the number of initial configuration blocks is less than or equal to zero, FM does not need to execute the storage space allocation process and can send a configuration error message to the node.

[0166] This embodiment provides an effective CXL shared storage space allocation management method, which can realize the shared allocation of a CXL storage pool by multiple nodes. In addition, the storage space required by each node is relatively evenly distributed on multiple storage channels of the CXL pooling pool, so that multiple nodes can concurrently access the storage space of the storage device, which is conducive to fully utilizing the storage space bandwidth.

[0167] In addition, since the storage space is allocated in blocks, the capacity of the storage space allocated each time in each cycle is fixed (the capacity of the storage space allocated each time is the capacity of a set number of blocks), thereby reducing the complexity of FM storage space management and facilitating the development of new features such as expansion and contraction management in the future.

[0168] In the attached Figure 4 In the illustrated embodiment, if the number of remaining blocks of the first storage device is less than the set number of blocks, FM skips the first storage device, so that the first storage device does not need to participate in the storage space allocation process. In another possible implementation, if the number of remaining blocks of the first storage device is less than the set number of blocks, the first storage device still participates in the storage space allocation process, and the number of blocks provided by the first storage device is less than the number of blocks provided by the storage device with a remaining capacity greater than or equal to the set number of blocks, the number of blocks provided by the first storage device is the number of remaining blocks of the first storage device, and the following is through Figure 5 Description of embodiments.

[0169] Attached Figure 5 FIG. 1 is a flow chart of another storage space allocation method provided by this embodiment. Figure 5 The method shown in the attached Figure 4 The difference between the methods shown is that Figure 4 Step S409 in the method shown is replaced by Figure 5 Steps S510 to S511 in the method shown. Figure 5 For other steps in the method shown, please refer to the attached Figure 4 Description of the method.

[0170] Step S510: If the number of remaining blocks in the first storage device is less than the set number of blocks, FM allocates storage space of the remaining number of blocks from the first storage device to the node.

[0171] For example, the number of blocks is set to 3, and the number of remaining blocks of the first storage device is 2. FM allocates all 2 blocks of the first storage device to the node, and the 1 block that the first storage device fails to provide is compensated by allocating from other storage devices.

[0172] Step S511, FM updates the number of remaining blocks of the first storage device to zero.

[0173] Since all remaining blocks of the first storage device have been allocated in step S510, FM can update the number of remaining blocks of the first storage device to zero, so that when storage space allocation is performed again subsequently, FM can determine that there is no need to allocate blocks from the first storage device based on the updated number of remaining blocks of the first storage device.

[0174] Exemplarily, the FM searches the storage space capacity table based on the identifier of the first storage device, and updates the number of remaining blocks of the first storage device corresponding to the identifier of the first storage device recorded in the storage space capacity table to zero. Exemplarily, the FM accesses the linked list item corresponding to the first storage device in the circular allocation chain, and updates the number of remaining blocks stored in the linked list item corresponding to the first storage device to zero.

[0175] Attached Figure 4 The method shown or attached Figure 5 The method shown can be executed after the node loads the storage space. Exemplarily, the process of the node loading the storage space includes the following steps 1 to 4.

[0176] Step 1: The basic input / output system (BIOS) of the node detects the CXL device.

[0177] CXL devices include FM and CXL-enabled storage devices.

[0178] Step 2: The BIOS of the node reports the information of the detected CXL device to the operating system (OS) of the node.

[0179] Step 3: The node OS loads the CXL device as a direct access (DAX) device.

[0180] Step 4: The node sends a storage space request to FM, thus triggering the attached Figure 4 The method shown or attached Figure 5 The method shown.

[0181] In addition, FM performs additional Figure 4 The method shown or attached Figure 5 After the storage space is allocated by the method shown, FM can send the address of the storage space allocated to the node to the node. The node uses the mmap (MemoryMap) function to map the / dev / dax0.x file to the address space of the user-mode program in the node according to the address of the storage space, and manages the storage space through the user-mode program in the node.

[0182] Figure 6 This is a flowchart of another storage space allocation method provided in an embodiment of the present application. Figure 6The method is applied to the FM management unit of the CXL storage pool, and the FM management unit is used to allocate storage space in the CXL storage pool. Figure 6 The method shown includes S601 to S603.

[0183] S601, the FM management unit receives a storage space allocation request from a node, the storage space allocation request includes an initial configuration capacity, the initial configuration capacity is used to indicate the capacity corresponding to the storage space allocated to the node by the FM management unit from a CXL storage pool, the CXL storage pool includes multiple storage devices.

[0184] S602: In response to a storage space allocation request, the FM management unit determines the number of configuration blocks based on the initial configuration capacity, where the number of configuration blocks is used to represent the size of the configuration capacity.

[0185] S603, the FM management unit executes at least one round of block allocation process until the number of blocks allocated to the node is greater than or equal to the number of configured blocks. Each round of block allocation process includes allocating a set number of blocks provided by multiple storage devices to the node in sequence. A block is a unit storage space of a storage device.

[0186] The method provided in this embodiment determines the number of configuration blocks according to the initial configuration capacity included in the storage space allocation request of the first node, and performs at least one round of block allocation process until the number of blocks allocated to the node is greater than or equal to the number of configuration blocks, which helps to share the storage space provided by the CXL storage pool among multiple nodes. In addition, the storage space required by each node is relatively evenly distributed on multiple storage channels of the CXL pooling pool, so that multiple nodes can concurrently access the storage space of the storage device, which is conducive to giving full play to the storage space bandwidth.

[0187] In addition, since the storage space is allocated in blocks, the capacity of the storage space allocated each time in each cycle is fixed (the capacity of the storage space allocated each time is the capacity of a set number of blocks), thereby reducing the complexity of FM storage space management and facilitating the development of new features such as expansion and contraction management in the future.

[0188] In some implementations, the process of allocating blocks in each round includes:

[0189] An allocation order of the plurality of storage devices is determined based on a circular allocation chain, and a set number of blocks are allocated from the plurality of storage devices in sequence according to the allocation order. The circular allocation chain is a circular linked list indicating the allocation order.

[0190] In some implementations, allocating a set number of blocks from a plurality of storage devices in sequence according to an allocation order includes:

[0191] When the head pointer of the circular allocation chain points to the first storage device among multiple storage devices, a set number of blocks are allocated from the first storage device to the node; the position of the head pointer is updated to point to the second storage device, and the second storage device is the next storage device of the first storage device in the circular allocation chain.

[0192] In some embodiments, the method further comprises:

[0193] The remaining block quantity of the first storage device is updated, and the updated remaining block quantity is the difference between the remaining block quantity of the first storage device before the update and the set quantity.

[0194] In some embodiments, the process of allocating blocks in each round includes allocating all remaining blocks of the first storage device to the node when it is determined that the current number of remaining blocks of the first storage device among the multiple storage devices is less than the set number of blocks.

[0195] In some embodiments, the method further comprises:

[0196] The number of remaining blocks of the first storage device is updated to zero.

[0197] In some implementations, the process of allocating blocks in each round includes:

[0198] When it is determined that the number of remaining blocks of the first storage device among multiple storage devices is less than the set number of blocks, the first storage device is skipped when allocating blocks in this round, so that the first storage device does not participate in the storage space allocation of the set number of blocks to the node in this round.

[0199] In some embodiments, the method further comprises:

[0200] If the total number of remaining blocks of the multiple storage devices is less than the number of configured blocks or the number of configured blocks is less than or equal to zero, a configuration error message is sent to the node. The total number of remaining blocks refers to the sum of the number of remaining blocks of each storage device in the multiple storage devices.

[0201] In some embodiments, the method further comprises:

[0202] The set number is determined based on the number of configuration blocks and the number of storage devices in the CXL storage pool, and the set number is a ratio between the number of configuration blocks and the number of storage devices in the CXL storage pool.

[0203] The various embodiments in this specification are described in a progressive manner, and the same or similar parts between the various embodiments can be referenced to each other, and each embodiment focuses on the differences from other embodiments.

[0204] A refers to B, which means that A is the same as B or A is a simple variant of B.

[0205] The terms "first" and "second" in the description and claims of the embodiments of the present application are used to distinguish different objects, rather than to describe a specific order of objects, and cannot be understood as indicating or implying relative importance. For example, the first storage device and the second storage device are used to distinguish different storage devices, rather than to describe a specific order of storage devices, and cannot be understood as the first storage device being more important than the second storage device.

[0206] In the embodiments of the present application, unless otherwise specified, "at least one" means one or more, and "a plurality" means two or more. For example, a plurality of storage devices means two or more storage devices.

[0207] The above embodiments can be implemented in whole or in part by software, hardware, firmware or any combination thereof. When implemented using software, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When loading and executing computer program instructions on a computer, the process or function described in accordance with the embodiment of the present application is generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network or other programmable device. The computer instructions can be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions can be transmitted from a website site, a computer, a server or a data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) mode to another website site, computer, server or data center. The computer-readable storage medium can be any available medium that a computer can access or a data storage device such as a server or a data center that includes one or more available media integrations. Available media can be magnetic media, (e.g., floppy disk, hard disk, tape), optical media (e.g., DVD), or semiconductor media (e.g., solid-state hard disk Solid State Disk (SSD)), etc.

[0208] The above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the aforementioned embodiments, a person skilled in the art should understand that the technical solutions described in the aforementioned embodiments may still be modified, or some of the technical features may be replaced by equivalents. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the scope of the technical solutions of the embodiments of the present application.

Claims

1. A storage space allocation method, characterized in that: The method is applied to a FM management unit of a CXL storage pool, the FM management unit being used to allocate storage space in the CXL storage pool, and includes: receiving a storage space allocation request from a node, the storage space allocation request including an initial configuration capacity, the initial configuration capacity being used to indicate a capacity corresponding to a storage space allocated by the FM management unit to the node from a CXL storage pool, the CXL storage pool including a plurality of storage devices; In response to the storage space allocation request, the number of configuration blocks is determined based on the initial configuration capacity, the number of configuration blocks is used to characterize the size of the initial configuration capacity, and at least one round of block allocation process is performed until the number of blocks allocated to the node is greater than or equal to the number of configuration blocks. Each round of the block allocation process includes allocating a set number of blocks provided by the multiple storage devices to the node in turn, and the block is a unit storage space of the storage device.

2. The method according to claim 1, characterized in that The process of allocating blocks in each round includes: An allocation order of the plurality of storage devices is determined based on a circular allocation chain, and the set number of blocks are allocated from the plurality of storage devices in sequence according to the allocation order, wherein the circular allocation chain is a circular linked list indicating the allocation order.

3. The method according to claim 2, characterized in that Allocating the set number of blocks from the plurality of storage devices in sequence according to the allocation order includes: When the head pointer of the circular allocation chain points to the first storage device among the multiple storage devices, the set number of blocks are allocated to the node from the first storage device; the position of the head pointer is updated to point to the second storage device, and the second storage device is the next storage device of the first storage device in the circular allocation chain.

4. The method according to claim 3, characterized in that The method further comprises: The remaining block quantity of the first storage device is updated, and the updated remaining block quantity is the difference between the remaining block quantity of the first storage device before the update and the set quantity.

5. The method according to claim 1, characterized in that The process of allocating blocks in each round includes allocating all remaining blocks of a first storage device among the multiple storage devices to the node when it is determined that the current number of remaining blocks of the first storage device is less than the set number of blocks.

6. The method according to claim 5, characterized in that The method further comprises: The number of remaining blocks of the first storage device is updated to zero.

7. The method according to claim 1, characterized in that The process of allocating blocks in each round includes: When it is determined that the number of remaining blocks of the first storage device among the multiple storage devices is less than the set number of blocks, the first storage device is skipped when allocating blocks in this round, so that the first storage device does not participate in the storage space allocation of the set number of blocks to the node in this round.

8. The method according to claim 1, characterized in that The method further comprises: If the total number of remaining blocks of the multiple storage devices is less than the number of configuration blocks or the number of configuration blocks is less than or equal to zero, a configuration error message is sent to the node, and the total number of remaining blocks refers to the sum of the number of remaining blocks of each storage device in the multiple storage devices.

9. The method according to claim 1, characterized in that: The method further comprises: The set number is determined based on the number of configuration blocks and the number of storage devices in the CXL storage pool, and the set number is a ratio between the number of configuration blocks and the number of storage devices in the CXL storage pool.

10. A FM management unit, characterized in that: The FM management unit comprises: a processor, the processor is coupled to a memory, the memory stores at least one computer program instruction, and the at least one computer program instruction is loaded and executed by the processor so that the FM management unit implements the method according to any one of claims 1 to 9.

11. A computing system, characterized in that: The computing system comprises: a node, a FM management unit and a CXL storage pool, the CXL storage pool comprises a plurality of storage devices, the node is connected to the FM management unit, the FM management unit is used to allocate and manage storage space in the CXL storage pool; the FM management unit is used to implement the method as claimed in any one of claims 1 to 9.