Data access method, CXL switching device and computing system
After receiving a data write request, the CXL switching device obtains the redundant storage strategy and determines multiple memory spaces in the CXL memory pool for redundant storage, solving the CPU resource consumption problem in the existing technology and improving system performance and data reliability.
Patent Information
- Application Number
- CN202510542549.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-27
- Publication Date
- 2025-09-16
AI Technical Summary
The data redundancy technology in the prior art consumes CPU resources of computing devices and affects system performance.
The CXL switching device receives data write requests, obtains redundant storage policies, and determines multiple memory spaces from the CXL memory pool for redundant storage, freeing up CPU resources.
It realizes data redundant storage, releases CPU resources, improves system performance, and ensures data reliability and system stability.
Smart Images

Figure CN120653423A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of computing technology, and in particular to a data access method, a CXL switching device, and a computing system. Background Art
[0002] As computing demands continue to grow, memory capacity also continues to increase, significantly increasing the probability of memory anomalies. When memory anomalies occur, memory failures can cause applications running on computing devices to behave abnormally, or even cause the computing device to crash.
[0003] To address this issue, data redundancy technology is used in related technologies to address this issue, providing a solution when memory anomalies occur and ensuring the stable operation of computing devices (such as servers). However, current data redundancy technology consumes the central processing unit (CPU) resources of computing devices, affecting system performance. Summary of the Invention
[0004] The embodiments of the present application provide a data access method, a CXL switching device, and a computing system, which can release CPU resources and improve system performance.
[0005] In a first aspect, an embodiment of the present application provides a data access method, comprising: receiving a data write request from a first computing device; the data write request is used to request writing first data to a CXL memory pool; in response to the data write request, obtaining a redundant storage policy for the first data; determining multiple first memory spaces from the CXL memory pool based on the redundant storage policy; and writing the first data into the multiple first memory spaces.
[0006] In the data access method provided by an embodiment of the present application, upon receiving a data write request from a computing device, a CXL switch device obtains a redundant storage policy for the data to be written. Based on the redundant storage policy, multiple first memory spaces are determined from the CXL memory pool and used to redundantly store the first data to be written. This data writing method implements data redundancy technology within the CXL switch device, thereby freeing up CPU resources in the computing device and improving system performance.
[0007] In one possible implementation, the redundant storage strategy includes the number of redundant data stores; and determining a plurality of first memory spaces from the CXL memory pool according to the redundant storage strategy includes: determining a plurality of first memory spaces from the CXL memory pool according to the number of redundant data stores; wherein the number of the first memory spaces is equal to the number of redundant data stores.
[0008] In one possible implementation, the redundant storage strategy includes redundantly storing data in different CXL memory devices. This way, the first redundant data is not stored on the same device, effectively preventing data loss due to damage to a single device.
[0009] In one possible implementation, the redundant storage strategy includes: dividing the first data into M data blocks; encoding the M data blocks to obtain N check blocks; and storing the M data blocks and the N check blocks in different memory spaces. This method of encoding and storing the first data in blocks allows for the loss of some information blocks (data blocks or check blocks), while still allowing the first data to be accurately recovered from at least the remaining M information blocks, thereby ensuring the reliability of the first data storage.
[0010] In one possible implementation, the method further includes: when the first data in any first memory space is modified, modifying the first data stored in a target first memory space based on the first metadata and the second data; wherein the first metadata indicates the storage location of the first data; the second data is the modified first data; and the target first memory space is a first memory space other than the first memory space where the modified first data is located. It is understood that the CXL switching device in the embodiments of the present application may also implement a data synchronization function to ensure data consistency between the data and its replicas.
[0011] In one possible implementation, the method also includes: receiving a data read request from a second computing device; the data read request is used to request to obtain first data; obtaining the first data from a first target memory space; the first target memory space is one or more of multiple first memory spaces; and sending the first data to the second computing device.
[0012] In a possible implementation, before obtaining the first data from the first target memory space, the method further includes: determining a plurality of first memory spaces based on the first metadata; and determining a first target memory space from the plurality of first memory spaces.
[0013] In a possible implementation, the first target memory space is the first memory space to which the first data was last modified and to which the second computing device has access permission and to which the shortest access path is provided.
[0014] In one possible implementation, obtaining first data from a first target memory space includes: obtaining the first data from the first target memory space when access to the first target address is normal; the first target address is the address of the first target memory space; and obtaining the first data from a second target space when access to the first target address is abnormal; wherein the second target memory space is one or more first memory spaces other than the first target memory space among the multiple first memory spaces. It is understood that if data acquisition from any first memory space fails, data is acquired from other first memory spaces. Through the above-mentioned data reading method, services can be continued using duplicate data when data is lost, thereby ensuring the stability of the entire system.
[0015] In one possible implementation, when address access to the first target memory space is abnormal, obtaining the first data from the second target space includes: when access to the first target address is abnormal and access to the second target address is normal, obtaining the first data from the second target space; the second target address is the memory address of the second target memory space.
[0016] In one possible implementation, before obtaining the first data from the first target memory space, the method includes: determining, from the plurality of first memory spaces, an idle memory space as the first target memory space; the idle state indicates that the memory space is not accessed. It will be appreciated that the CXL switching device in the embodiment of the present application can also implement load balancing, thereby alleviating the load pressure on the CXL memory device.
[0017] In a second aspect, an embodiment of the present application provides a data access device, which is used to execute any one of the data access methods provided in the first aspect above.
[0018] In a third aspect, an embodiment of the present application provides a CXL switching device, comprising a processor and a memory, wherein the processor is coupled to the memory; the memory is used to store computer instructions, which are loaded and executed by the processor to enable the computing device to implement the method described in the above aspects.
[0019] In a fourth aspect, an embodiment of the present application provides a computing system, comprising a CXL switch device according to the third aspect, multiple CXL memory devices, and a computing device; wherein the CXL switch device is connected to the multiple CXL memory devices and computing devices based on the CXL protocol; wherein there are one or more computing devices.
[0020] In a fifth aspect, an embodiment of the present application provides a computer-readable storage medium, which stores at least one computer program instruction, and the computer program instruction is loaded and executed by a processor to implement the method described in the above aspects.
[0021] In a sixth aspect, embodiments of the present application provide a computer program product, comprising computer instructions stored in a computer-readable storage medium. A processor of a computing device reads the computer instructions from the computer-readable storage medium and executes the computer instructions, causing the computing device to perform the methods provided in various optional implementations of the aforementioned aspects.
[0022] The beneficial effects of the second to sixth aspects and their various implementations in the embodiments of the present application can be analyzed with reference to the beneficial effects of the first aspect and its various implementations, and will not be repeated here.
[0023] These and other aspects of the embodiments of the present application will be more clearly understood in the following description. BRIEF DESCRIPTION OF THE DRAWINGS
[0024] Figure 1 A schematic diagram of the system architecture involved in a data access method provided in an embodiment of the present application;
[0025] Figure 2 A schematic diagram of a programmable functional architecture design for a CXL switching device provided in an embodiment of the present application;
[0026] Figure 3 A schematic diagram of the software composition of a CXL switching device provided in an embodiment of the present application;
[0027] Figure 4 A flowchart of a data access method provided in an embodiment of the present application;
[0028] Figure 5 A flowchart of another data access method provided in an embodiment of the present application;
[0029] Figure 6 A schematic diagram of a data writing process provided in an embodiment of the present application;
[0030] Figure 7 A flowchart of another data access method provided in an embodiment of the present application;
[0031] Figure 8 A flowchart of another data access method provided in an embodiment of the present application;
[0032] Figure 9 A schematic diagram of a fault handling mechanism provided in an embodiment of the present application;
[0033] Figure 10 A schematic diagram of a load balancing mechanism provided in an embodiment of the present application;
[0034] Figure 11 A schematic diagram of a data reading process provided in an embodiment of the present application;
[0035] Figure 12 A schematic diagram of the structure of a data access device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0036] In order to make the objectives, technical solutions and advantages of this application clearer, the implementation methods of this application will be further described in detail below with reference to the accompanying drawings.
[0037] In this document, "plurality" refers to two or more. "And / or" describes a relationship between associated objects, indicating that three possible relationships exist. For example, "A and / or B" can mean: A exists alone, A and B exist simultaneously, or B exists alone. The character " / " generally indicates an "or" relationship between the associated objects.
[0038] Furthermore, in the description of this application, unless otherwise specified, "plurality" means two or more than two. "At least one of the following" or similar expressions refers to any combination of these items, including any combination of single or plural items. For example, at least one of a, b, or c can mean: a, b, c, ab, ac, bc, or abc, where a, b, and c can be single or plural.
[0039] In addition, in order to facilitate the clear description of the technical solutions of the embodiments of the present application, in the embodiments of the present application, words such as "first" and "second" are used to distinguish between identical or similar items with substantially the same functions and effects. Those skilled in the art will understand that words such as "first" and "second" do not limit the quantity and execution order, and words such as "first" and "second" do not necessarily limit differences. At the same time, in the embodiments of the present application, words such as "exemplary" or "for example" are used to indicate examples, illustrations or explanations. Any embodiment or design described as "exemplary" or "for example" in the embodiments of the present application should not be interpreted as being more preferred or more advantageous than other embodiments or design schemes. Specifically, the use of words such as "exemplary" or "for example" is intended to present related concepts in a concrete way for easy understanding.
[0040] First, the technical terms involved in the embodiments of the present application are exemplarily introduced.
[0041] 1. CXL: Compute Express Link is a new high-speed central processing unit (CPU) interconnection standard, mainly used in high-performance computing and artificial intelligence applications. It can achieve fast data transmission between the CPU and accelerators such as graphics processing units (GPUs) and field programmable gate arrays (FPGAs), as well as between the CPU and high-speed network interface cards.
[0042] 2. CXL switch: A CXL protocol-based interconnect device used to provide high-speed, low-latency data transmission between computing nodes (such as CPUs), memory, accelerators (such as GPUs and FPGAs), and other storage devices.
[0043] The embodiment of the present application provides a data access method, in which a CXL switching device replaces the CPU in a computing device to determine and execute a redundant storage strategy, thereby releasing resource consumption of the CPU in the computing device and improving system performance.
[0044] In one implementation, after receiving a data write request from a computing device, the CXL switch obtains a redundant storage policy for the data to be written. Based on the redundant storage policy, the switch determines multiple first memory spaces from the CXL memory pool and uses these spaces to redundantly store the first data to be written. This data writing method allows the CXL switch to replace the CPU in the computing device to implement data redundancy, thereby freeing up CPU resources and improving system performance.
[0045] The implementation of the embodiments of the present application will be described in detail below with reference to the accompanying drawings.
[0046] Please refer to Figure 1 , which shows a schematic diagram of a system architecture involved in the data access method provided in the embodiment of the present application. Figure 1 As shown, the system architecture may include: a computing device 101, a memory pool 102, and a CXL switch device 103. The computing device 101 is in communication with the memory pool 102 via the CXL switch device 103 to use the memory space provided by the CXL memory pool 102. The memory pool may be referred to as a CXL memory pool.
[0047] A computing device is a device that performs data processing, logical operations, and storage. For example, a computing device may include a server. A server may be a rack server, blade server, tower server, or other server. A server may include one or more computing nodes, each of which includes at least one central processing unit (CPU). When a server includes multiple computing nodes, the CPUs in the multiple computing nodes share a common operating system.
[0048] The CXL memory pool 102 is composed of one or more memory devices. The memory devices mentioned here can be independent memory devices (such as CXL memory devices) or server memory (for example, in a server cluster, the local memory of each server can be pooled to facilitate unified memory management). Of course, the memory pool 102 can also include both of the aforementioned memory devices, which is not specifically limited in this embodiment of the application.
[0049] The following describes independent memory devices, namely CXL memory devices. CXL memory devices, also known as CXL memory modules, can include a CXL control chip (also known as a CXL controller) and memory. The memory can include dynamic random access memory (DRAM), synchronous dynamic random access memory (SDRAM), or persistent memory (PMEM). Memory is the actual physical carrier that provides memory space for computing devices.
[0050] The CXL controller chip is used to write data to or read data from the memory in the CXL memory device based on read / write data requests sent by the computing device. The CXL controller chip is also called the CXL memory expander chip, CXL memory controller, or CXL memory pooling chip.
[0051] In an embodiment of the present application, the number of memories in the above-mentioned CXL memory device can be one or more. When there is one memory, the memory can also be other types of memory such as DRAM, SDRAM, or PMEM. When there are multiple memories, the multiple memories can all be other types of memory such as DRAM, SDRAM, or PMEM, or the multiple memories can include at least two of SDRAM, PMEM, or DRAM. The above-mentioned flexible implementation and deployment methods can make the CXL memory device compatible with memories of more media types. The embodiments of the present application do not limit the media type, number, and deployment method of the memories.
[0052] CXL switch 103 (Switch) includes a CXL switch chip that provides an expansion interface, enabling multiple computing devices to connect to the CXL memory devices in memory pool 102. In addition to expansion capabilities, CXL switch 103 also includes a processor with processing capabilities, such as the ability to run FM modules.
[0053] In some implementations, the FM module may also be used to abstract the memory space in the memory pool 102 into multiple virtual logical devices (VLDs), and the identifier of each VLD may be called a VID.
[0054] For example, the FM module can manage the storage space of multiple CXL memory devices as a unified memory pool. Specifically, the FM module can divide the memory pool into multiple sub-storage spaces, which can be called VLDs.
[0055] Optionally, the capacities of multiple VLDs can be the same or different. Generally, for ease of management, the FM module is divided into multiple VLD logical units of equal capacity. The storage capacity of each VLD can be flexibly configured based on demand. Optionally, the FM module can maintain a VID list to record the identity of each VLD it manages.
[0056] In some embodiments, the FM module uses the aforementioned VLD as the minimum allocation granularity to allocate one or more VLDs to one or more computing devices 101, or reclaim one or more VLDs allocated to computing devices 101. Optionally, the FM records the usage of each logical unit, for example, by maintaining a VID used list to record which VLDs have been allocated to computing devices for use, and a VID free list to record which VLDs are idle and can be allocated to computing devices for use.
[0057] For example, assuming the memory pool has 128GB of memory space and each VLD has a capacity of 16GB, the FM divides the memory space into eight VLDs and assigns identifiers to each VLD, such as VLD-0, VLD-1, ..., VLD-7. The FM module can assign one or more logical units in VLD-0, VLD-1, ..., VLD-7 to a computing device, allowing computing device 101 to read and write data using the memory space corresponding to one or more VLDs.
[0058] It should be noted that the system architecture and application scenarios described in the embodiments of the present application are intended to more clearly illustrate the technical solutions of the embodiments of the present application, and do not constitute a limitation on the technical solutions provided in the embodiments of the present application. Ordinary technicians in this field can know that with the evolution of the system architecture and the emergence of new business scenarios, the technical solutions provided in the embodiments of the present application are also applicable to similar technical problems.
[0059] Figure 2 This is a schematic diagram of a programmable functional architecture design of a CXL switching device provided in an embodiment of the present application. Figure 2 As shown in the figure, from top to bottom they are the operating system and protocol layer, the chip interface layer, the basic software platform layer and the hardware forwarding layer.
[0060] Among them, the hardware forwarding layer is responsible for forwarding and processing data, which is implemented by specialized hardware, such as processors, network cards, memories, CXL switching chips, and peripheral chips.
[0061] The basic software platform resides in kernel mode and provides an interface between hardware and upper-layer applications to simplify the management and use of hardware resources. Examples include ONIE and ONL (a lightweight operating system in the open network ecosystem, dedicated to network switches), as well as various drivers.
[0062] The chip interface layer, located in user mode, is used to encapsulate the functions of the CXL switch chip into a unified interface, such as the switch abstraction interface (SAI), decoupling the upper layer from the underlying hardware, allowing upper-layer applications to call the SAI interface to use the functions of the CXL switch chip.
[0063] The operating system and protocol layer, located in user mode, manages hardware resources and provides an operating environment for applications, implementing plane control and management functions. Specifically, the operating system and protocol layer provides a network operating system, which includes multiple applications (1-N). Applications can schedule the SAI interface to use the CXL switch chip's functions (writing or reading data).
[0064] Figure 3A schematic diagram of the software composition of a CXL switching device provided in an embodiment of the present application. Figure 3 As shown, it includes a request interface module, a redundancy management module, a metadata service module and a request distribution module.
[0065] The request interface module is used to provide an interface for obtaining CXL memory data and storing data in CXL memory. Figure 3 The request interface module is connected to computing device 1 and computing device 2 respectively to obtain read and write requests from the computing devices.
[0066] Redundancy management module: implements data redundancy to ensure data consistency and reliability, and is used to provide data backup or load balancing when main memory fails.
[0067] The metadata service module is responsible for managing the storage location (address space information) of each data and its copies, and providing an add, delete, modify and query interface for modifying the source data.
[0068] The request dispatch module provides an interface for accessing a specified CXL memory device.
[0069] For ease of understanding, the method provided in the embodiments of the present application is exemplarily introduced below with reference to the accompanying drawings.
[0070] Figure 4 A flow chart of a data access method provided by an exemplary embodiment of the present application is shown. The data access method can be applied to Figure 1 In the CXL switching device, the specific steps include:
[0071] S401: Receive a data write request from a first computing device.
[0072] The data write request is used to request writing first data into the CXL memory pool.
[0073] As previously described, a computing device is connected to a CXL memory pool via a CXL switch. While using the memory space provided by the memory pool, the computing device may need to write data to the memory space within the memory pool. Therefore, the computing device may send a data write request to the CXL switch, including the first data to be written.
[0074] S402: In response to a data write request, obtain a redundant storage policy corresponding to the first data.
[0075] The redundant storage strategy is used to indicate the allocation method of the storage location of the data and / or the storage method of the data.
[0076] In an embodiment of the present application, a redundant storage policy can be preconfigured by a user into a CXL switch. The redundant storage policy can be stored in local storage on the CXL switch, in the cloud, or on another device. Upon receiving a data write request from a computing device, the CXL switch can retrieve the redundant storage policy based on the configuration and determine, based on the redundant storage policy, how to allocate the storage location for the first data and / or how to store the data.
[0077] The specific redundant storage strategy is described below and will not be described in detail here.
[0078] S403: Determine a plurality of first memory spaces from the CXL memory pool according to the redundant storage policy.
[0079] In the embodiment of the present application, the CXL switching device may determine the quantity, location, and whether the memory space is free according to a redundant storage policy, and then determine a plurality of first memory spaces from the memory pool for storing the first data.
[0080] Optionally, in the process of determining the first memory space, the CXL switching device may further select a memory space in normal operation as the first memory space according to the fault information.
[0081] S404: Write the first data into a plurality of first memory spaces.
[0082] In the embodiment of the present application, the CXL switch device may send a storage instruction to each memory device to which the first memory space belongs, to request storage of the first data.
[0083] Optionally, after the first data is written, the CXL switch device may return a response message of the data write request to the first computing device to inform the first computing device that the first data storage is completed.
[0084] It should be noted that, since the first memory space is allocated from the memory pool, the first memory space is the memory space of the CXL memory device, and may also be the local memory of the computing device (server). This embodiment of the application is mainly described using the case of the CXL memory device.
[0085] For example, the CXL switch device sends a store instruction to the first CXL memory device in the first memory space, requesting that the first data be stored. After the storage is complete, the CXL memory device returns a storage completion message to the CXL switch device. The CXL switch device then sends a store instruction to the second CXL memory device in the first memory space, and so on, until the CXL switch device completes the storage for all first memory spaces. Alternatively, the CXL switch device can simultaneously send a store instruction to each CXL memory device in the first memory space, wait for each CXL memory device to return a storage completion message, and then determine that the first data storage is complete. It can then return a response message to the first computing device indicating that the data write request is complete.
[0086] It should be understood that the first memory space here may include one or more VLDs, and the specific number of VLDs included may be determined according to the size of the first data, and the embodiment of the present application does not specifically limit this.
[0087] The following describes the specific redundant storage strategy:
[0088] 1. When the redundant storage strategy includes the number of redundant data stores, S402 may be specifically implemented as follows: determining multiple first memory spaces from the CXL memory pool according to the number of redundant data stores; wherein the number of first memory spaces is equal to the number of redundant data stores.
[0089] It can be understood that this strategy can also be called a multi-copy strategy, which can determine multiple first memory spaces, one of which is used to store the original first data, and the other first memory spaces are used to store copy data of the first data, thereby achieving redundant storage of the first data.
[0090] For example, three first memory spaces are allocated for redundant storage of first data. If an exception occurs in first memory space 1 or second memory space 2, resulting in loss of the first data, the first data can be retrieved from first memory space 3. This redundant storage strategy effectively improves data reliability.
[0091] 2. The redundant storage strategy includes redundantly storing data in different CXL memory devices.
[0092] In an embodiment of the present application, the memory pool includes multiple CXL memory devices. When the second strategy is adopted, when the CXL switch device allocates multiple first memory spaces, it is necessary to ensure that each first memory space is located in a different CXL memory device (or computing device). In this way, if one CXL memory device is damaged, it will not affect other CXL memory devices. In other words, the first data can be recovered from other normal CXL memory devices, thereby effectively improving data reliability. This strategy can also be called a redundant array of independent disks (RAID).
[0093] For example, a memory pool connected to a CXL switch includes three CXL memory devices and a server's local memory. If the CXL switch allocates four primary memory spaces, three of the primary memory spaces belong to different CXL memory devices, while the remaining primary memory space belongs to the server's local memory. This way, redundant primary data is stored on separate devices, effectively preventing data loss due to device failure.
[0094] 3. If Figure 5 As shown, the redundant storage strategy includes:
[0095] S501. Divide first data into M data blocks.
[0096] S502: Encode M data blocks to obtain N check blocks.
[0097] The encoding method may adopt a low-density parity-check (LDPC) code or a Turbo code, which is not specifically limited in the embodiment of the present application.
[0098] S503: Store the M data blocks and the N check blocks in different memory spaces respectively.
[0099] For example, to ensure data reliability, each information block is stored in a different memory space. For another example, a first memory space can store a data block and a check block at the same time to save storage costs.
[0100] It should be noted that when adopting the above-mentioned strategies 1 and 2, all the first data is stored in each first memory space, that is, the data stored in each first memory space is the same. When adopting strategy 3, part of the first data is stored in each first memory space, that is, the data stored in each first memory space is different. This method of encoding and storing the first data in blocks allows the loss of a part of the information blocks (data blocks or check blocks), and at least M remaining information blocks can still accurately restore the first data, thereby ensuring the reliability of the first data storage. In addition, since each first memory space stores a part of the first data, the storage efficiency can be improved, which is suitable for large-scale distributed storage scenarios. The strategy here can be erasure coding (EC) technology.
[0101] It should be understood that the above embodiments illustrate the use of each redundant storage strategy independently. In some scenarios, the three redundant storage strategies described above can be used in combination. For example, Strategy 1 and Strategy 2 can be used in combination. When a CXL switch is connected to three or more CXL switches, the number of redundant storage instructions indicates the allocation of three or more first memory spaces, each of which belongs to a different CXL memory device. For another example, Strategy 2 and Strategy 3 can be used in combination, meaning that different data blocks and / or parity blocks are stored in different CXL memory devices.
[0102] In a possible implementation, the data access method further includes: S404, storing the correspondence between the first data and each first memory space in first metadata.
[0103] In this embodiment of the present application, the CXL switch device can record multiple storage locations of the first data using first metadata. For example, the first metadata can be stored in its own storage space in the form of a table. If a computing device subsequently needs the first data, the CXL switch device can query the storage location of the first data based on the first metadata, retrieve the first data, and return it to the computing device.
[0104] Exemplarily, a metadata service module (MDS) in a CXL switch device can be used to maintain the first metadata. After the redundancy management module in the CXL switch device allocates multiple first memory spaces for first data, it can send identification information of the first data and address information of the multiple first memory spaces to the metadata service module, which then records and stores the correspondence between the first data and the multiple first memory spaces.
[0105] In one possible implementation, the data access method provided in an embodiment of the present application further includes: when the first data in any first memory space is modified, modifying the first data stored in a target first memory space based on the first metadata and the second data. The first metadata indicates the storage location of the first data, the second data is the modified first data, and the target first memory space is a first memory space other than the first memory space where the modified first data is located.
[0106] That is, the CXL switching device in the embodiment of the present application can also implement a data synchronization function, thereby ensuring the data consistency of the data and its copies.
[0107] The above data access method is explained by taking the PUT process of object data storage as an example. In object data storage, the PUT operation is usually used to upload objects. Figure 6 As shown, the data access method provided in the embodiment of the present application can generate copy data in a PUT operation.
[0108] 1. An application in a computing device sends a PUT request to request storage of first data.
[0109] 2. The redundancy management module in the CXL switching device allocates a plurality of first memory spaces according to the redundant storage policy, and stores the corresponding relationship in the metadata service module.
[0110] 3. The metadata service module completes the storage of the corresponding relationship and returns a success message.
[0111] 4. The redundancy management module sends PUT requests to the multiple first memory spaces in sequence to request to store the first data (data) and its copies (data1, data2).
[0112] 5. The redundancy management module obtains a response message indicating that the storage is complete.
[0113] 6. Count the completion status of each PUT request. When all requests are completed, the redundancy management module notifies the application that the PUT request is completed.
[0114] The above embodiment describes the process of writing data. The following describes the process of reading data in conjunction with specific embodiments and the accompanying drawings. Figure 7 As shown, the data access method provided in the embodiment of the present application also includes:
[0115] S701: Receive a data read request from a second computing device.
[0116] The data read request is used to request to obtain the first data.
[0117] When the computing device uses the memory space of the CXL memory device, the first data can be obtained from the CXL memory device. Therefore, the computing device can send a data read request to the CXL switch device, where the request includes an identifier of the required first data.
[0118] S702: Acquire first data from a first target memory space.
[0119] The first target memory space is one or more of the multiple first memory spaces.
[0120] In the embodiment of the present application, the CXL switch device may send a request to the device to which the first target memory space belongs, requesting to obtain the first data.
[0121] In some implementations, before S702, the method further includes:
[0122] Step a: Determine a plurality of first memory spaces based on the first metadata.
[0123] Step b: determining a first target memory space from a plurality of first memory spaces.
[0124] Exemplarily, the redundancy management module in a CXL switch device initiates a request to the metadata service module to obtain the storage location of the first data. In response, the metadata service module determines the address information of multiple first memory spaces and returns the information to the redundancy management module, enabling the redundancy management module to determine the multiple first memory spaces storing the first data and determine the first target memory space from the multiple first memory spaces.
[0125] In some embodiments, the first target memory space is the first memory space to which the first data was last modified and to which the second computing device has access permission and to which the shortest access path is provided.
[0126] Exemplarily, if the multiple first memory spaces include the local memory of the second computing device, the local memory is determined to be the first target memory space. It should be understood that for the second computing device, the local memory has the shortest access path, which can effectively improve data access performance. In the case of storage in a CXL memory device, a CXL memory device directly connected to the second computing device or a CXL memory device with the shortest connection link (which can be determined by measuring the delay of data transmission, the shorter the delay, the shorter the access path) can be selected, and the memory in the CXL memory device is determined as the first target memory space.
[0127] S703: Send the first data to the second computing device.
[0128] After reading and obtaining the first data, the CXL switching device may return the first data to the second computing device, completing the data reading process.
[0129] In some embodiments, as Figure 8 As shown, the above S703 can be specifically implemented as follows:
[0130] S7031. When access to the first target address is normal, obtain first data from the first target memory space.
[0131] The first target address is the address of the first target memory space.
[0132] S7032. When access to the first target address is abnormal, obtain the first data from the second target memory space.
[0133] The second target memory space is one or more first memory spaces among the multiple first memory spaces except the first target memory space.
[0134] Specifically, when access to the first target address is abnormal and access to the second target address is normal, the first data is obtained from the second target space; the second target address is a memory address of the second target memory space.
[0135] In other words, regarding steps S7031-S7032 above, the CXL switch device may first retrieve the first data from the default first memory space (e.g., the memory space with the smallest label). If data retrieval fails, the first data may be retrieved from the next first memory space in a predetermined order. After the first data is retrieved, the first data may be returned to the computing device.
[0136] For example, Figure 9 As shown, first data is stored in memory space 1 and memory space 2, respectively. The first data in memory space 1 is represented as data0, and the first data in memory space 2 is represented as data1. Initially, both virtual machines 1 and 2 obtain the first data from memory space 1. If an exception in memory space 1 causes the first data to be lost, virtual machines 1 and 2 use the replica data (data1) from memory space 2 to ensure normal operation.
[0137] In another possible implementation, if data retrieval from any first memory space fails, the CXL switch can return an exception message (user_app exception) to the computing device. The computing device, upon receiving the exception message, can then send a data read request, and the CXL switch can then retrieve the first data from the next first memory space. This process repeats until the first data retrieval is complete, and the first data is then returned to the computing device.
[0138] It is understood that if data acquisition from any first memory space fails, data is acquired from other first memory spaces. By using the above data reading method, services can be continued using duplicate data when data is lost, thereby ensuring the stability of the entire system.
[0139] In a possible implementation, before obtaining the first data from the first target memory space in S702, the method further includes: determining an idle memory space from the plurality of first memory spaces as the first target memory space.
[0140] The idle state is used to indicate that the memory space is not accessed, or is used to indicate that the load of the memory space is less than a threshold.
[0141] For example, Figure 10 As shown, data 1 is stored in location 1, location 2, and location 3, respectively. When requester 1 accesses location 1 to obtain data 1, if there is a requester 2, data 1 is also obtained. At this time, the CXL switching device detects that location 1 is being accessed by requester 1 and is in a non-idle state. The CXL switching device can then allow requester 2 to obtain data 1 from location 2, thereby achieving load balancing and alleviating the load pressure when the same memory space is accessed by multiple parties. When data fails to be obtained from any first memory space, data is obtained from other first memory spaces. It can be understood that the CXL switching device in the embodiment of the present application can also achieve load balancing, thereby alleviating the load pressure on the CXL memory device.
[0142] The above data access method is explained by taking the GET process of object data storage as an example. In object data storage, the GET operation is usually used to retrieve objects. Figure 11 As shown, the data access method provided in the embodiment of the present application can request data through a GET operation.
[0143] 1. An application in a computing device sends a GET request to request to obtain first data (data0).
[0144] 2. The redundancy management module in the CXL switching device sends a message to the metadata server module to request to query the storage location of the first data.
[0145] 3. The metadata service module determines multiple first memory spaces storing the first data and returns information about the multiple first memory spaces.
[0146] 4. The redundancy management module sends a GET request to the first first memory space to request the first data (data0).
[0147] 5.1. If the access is normal, obtain the first data and return it to the application.
[0148] 5.2. If the access is abnormal, the redundancy management module returns an abnormal message to the application. The application sends a GET request for the second time, and the redundancy management module sends a GET request to the second first memory space to request to obtain the first data (data1).
[0149] 6. The second request is normal, and the redundancy management module returns the first data (data1) to the user program.
[0150] In the data access method provided by an embodiment of the present application, upon receiving a data write request from a computing device, a CXL switch device obtains a redundant storage policy for the data to be written. Based on the redundant storage policy, multiple first memory spaces are determined from the CXL memory pool and used to redundantly store the first data to be written. This data writing method enables the CXL switch device to replace the CPU in the computing device to implement data redundancy, thereby freeing up CPU resources in the computing device and improving system performance.
[0151] In summary, the CXL switching device provided in the embodiments of the present application can support the following functions:
[0152] Supports multiple redundant storage strategies; CXL switches combine hardware and software to support data redundancy technology, resulting in higher read and write times per second, higher bandwidth, and lower latency.
[0153] Address space management (logical space management, physical space management);
[0154] · Allocation of replica storage addresses;
[0155] Metadata services (addition, deletion, modification, and query of metadata information such as address space information and replica information);
[0156] ·Distribute data access requests to replicas;
[0157] Implement replica fault recovery; when a single channel or memory bank fails, redundant data can be used to continue providing services, enhancing data availability and allowing applications to run normally.
[0158] Implement data synchronization mechanism;
[0159] Implement load balancing by replicating data, solving the performance bottleneck problem when large-scale hosts share memory.
[0160] The above mainly introduces the scheme of the embodiment of the present application from the perspective of method. It is understandable that, in order to realize the above functions, the data writing device or the data reading device includes at least one of the hardware structure and software modules corresponding to the execution of each function. Those skilled in the art should easily appreciate that, in combination with the units and algorithm steps of each example described in the embodiments disclosed herein, the embodiments of the present application can be implemented in the form of hardware or a combination of hardware and computer software. Whether a function is executed in the form of hardware or computer software driving hardware depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to exceed the scope of the embodiments of the present application.
[0161] In the embodiment of the present application, the data access device can be divided into functional units according to the above method example. For example, each functional unit can be divided according to each function, or two or more functions can be integrated into one processing unit. The above integrated unit can be implemented in the form of hardware or software functional units. It should be noted that the division of units in the embodiment of the present application is schematic and is only a logical functional division. In actual implementation, other division methods may be used.
[0162] For example, Figure 12 The data access device according to an exemplary embodiment of the present application is shown in FIG. The data access device is applied to a CXL switching device and includes a receiving module 1201 , an acquiring module 1202 , a determining module 1203 , and a writing module 1204 .
[0163] The receiving module 1201 is used to receive a data write request from a computing device; the data write request is used to request to write first data to the CXL memory pool;
[0164] The acquisition module 1202 is configured to acquire a redundant storage strategy for the first data in response to a data write request;
[0165] The determining module 1203 is configured to determine a plurality of first memory spaces from the CXL memory pool according to a redundant storage policy.
[0166] The writing module 1204 writes the first data into the plurality of first memory spaces.
[0167] For the detailed description of the above optional methods, please refer to the above method embodiments, which will not be repeated here. In addition, the explanation of any data access device provided above and the description of its beneficial effects can refer to the above corresponding method embodiments, which will not be repeated here.
[0168] In an exemplary embodiment, the present application further provides a CXL switch device, wherein the computing device includes a processor and a memory; the processor is coupled to the memory; the memory is used to store computer instructions; and the processor is used to execute the computer instructions so that the CXL switch device performs the data access method described in the above embodiment.
[0169] In an exemplary embodiment, the present application also provides a computing system, comprising the aforementioned CXL switch device, multiple CXL memory devices, and a computing device; wherein the CXL switch device is connected to the multiple CXL memory devices and computing devices based on the CXL protocol; wherein there are one or more computing devices.
[0170] In an exemplary embodiment, a computer-readable storage medium is further provided, configured to store at least one instruction, at least one program, a code set, or an instruction set, wherein the at least one instruction, at least one program, code set, or instruction set is loaded and executed by a processor to implement all or part of the steps in the above-mentioned memory fault prediction method. For example, the computer-readable storage medium may be a read-only memory (ROM), a random access memory (RAM), a compact disc read-only memory (CD-ROM), a magnetic tape, a floppy disk, an optical data storage device, or the like.
[0171] In an exemplary embodiment, a computer program product or computer program is also provided. The computer program product or computer program includes computer instructions stored in a computer-readable storage medium. A processor of a computing device reads the computer instructions from the computer-readable storage medium and executes the computer instructions, causing the computing device to perform all or part of the steps of the method described in any of the above embodiments.
[0172] In some embodiments, the methods shown in the embodiments of the present application may be implemented as computer program instructions encoded in a machine-readable format on a computer-readable storage medium or encoded on other non-transitory media or products.
[0173] Through the description of the above implementation methods, technical personnel in the relevant field can clearly understand that for the convenience and simplicity of description, only the division of the above-mentioned functional modules is used as an example. In actual applications, the above-mentioned functions can be assigned to different functional modules as needed, such as dividing the internal structure of the device into different functional modules to complete all or part of the functions described above.
[0174] In the several embodiments provided in the embodiments of the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are merely schematic. For example, the division of the modules or units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another device, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.
[0175] The units described as separate components may or may not be physically separate, and the components shown as units may be one physical unit or multiple physical units, such as being located in one place or distributed across multiple locations. Some or all of the units may be selected to achieve the purpose of the present embodiment as needed.
[0176] In addition, the functional units in the various embodiments of the present application may be integrated into a single processing unit, or each unit may exist physically separately, or two or more units may be integrated into a single unit. The aforementioned integrated units may be implemented in the form of hardware or software functional units.
[0177] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a readable storage medium. Based on this understanding, the technical solution of the embodiment of the present application is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for enabling a device (which can be a single-chip microcomputer, chip, etc.) or a processor (processor) to execute all or part of the steps of the method described in each embodiment of the embodiment of the present application. The aforementioned storage medium includes: various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.
[0178] The above description is only an optional embodiment of the embodiment of the present application and is not intended to limit the embodiment of the present application. Any modifications, equivalent replacements, improvements, etc. made within the spirit and principles of the embodiment of the present application should be included in the scope of protection of the embodiment of the present application.
Claims
1. A data access method, characterized in that: Applied to computing fast link CXL switching equipment; the method includes: receiving a data write request from a first computing device; the data write request is used to request writing first data into a CXL memory pool; In response to the data write request, obtaining a redundant storage policy for the first data; determining a plurality of first memory spaces from the CXL memory pool according to the redundant storage strategy; The first data is written into the plurality of first memory spaces.
2. The method according to claim 1, characterized in that The redundant storage strategy includes the amount of redundant storage of data; Determining a plurality of first memory spaces from the CXL memory pool according to the redundant storage strategy includes: According to the number of the redundant data stores, a plurality of first memory spaces are determined from the CXL memory pool; wherein the number of the first memory spaces is equal to the number of the redundant data stores.
3. The method according to claim 1 or 2, characterized in that The redundant storage strategy includes redundantly storing the data in different CXL memory devices.
4. The method according to any one of claims 1 to 3, characterized in that The redundant storage strategy includes: Dividing the first data into M data blocks; Encoding the M data blocks to obtain N check blocks; The M data blocks and N check blocks are stored in different memory spaces respectively.
5. The method according to any one of claims 1 to 4, characterized in that The method further comprises: In the case where the first data in any first memory space is modified, the first data stored in the target first memory space is modified according to the first metadata and the second data; wherein the first metadata is used to indicate the storage location of the first data; the second data is the modified first data; and the target first memory space is the first memory space other than the first memory space where the modified first data is located.
6. The method according to any one of claims 1 to 5, characterized in that The method further comprises: receiving a data read request from a second computing device; the data read request is used to request acquisition of first data; Acquire the first data from a first target memory space; the first target memory space is one or more of the multiple first memory spaces; The first data is sent to the second computing device.
7. The method according to claim 6, characterized in that Before acquiring the first data from the first target memory space, the method further includes: Determining the plurality of first memory spaces based on the first metadata; The first target memory space is determined from the multiple first memory spaces.
8. The method according to claim 6 or 7, characterized in that The first target memory space is the first memory space where the first data was last modified, to which the second computing device has access permission and to which the shortest access path is.
9. The method according to any one of claims 6 to 8, characterized in that: The acquiring the first data from the first target memory space includes: When access to the first target address is normal, obtaining the first data from the first target memory space; the first target address is the address of the first target memory space; In the event of an access exception to the first target address, the first data is obtained from a second target memory space; wherein the second target memory space is one or more first memory spaces among the multiple first memory spaces except the first target memory space.
10. The method according to any one of claims 6 to 9, characterized in that: Before acquiring the first data from the first target memory space, the method includes: A memory space in an idle state is determined from a plurality of first memory spaces as the first target memory space; the idle state is used to represent that the memory space has not been accessed.
11. A computing express link (CXL) switching device, characterized in that: The CXL switching device includes a processor and a memory; the processor is coupled to the memory; The memory is used to store computer instructions; The processor is configured to execute the computer instructions to enable the CXL switch device to perform the data access method according to any one of claims 1 to 10.
12. A computing system, characterized in that: The computing system comprises the CXL switch device according to claim 11, a plurality of CXL memory devices, and a computing device; wherein the CXL switch device is connected to the plurality of CXL memory devices and the computing device based on a CXL protocol; wherein the computing device is one or more.
Citation Information
Cited By
Memory scheduling method and device, electronic equipment and storage medium
CN121680722A