Method for managing memory space
By recording error information of virtual logic devices when computing device abnormality and reallocating memory space directly from these information after restarting, the problem of time-consuming and resource consumption of recovery process in the prior art is solved, and more efficient memory space recovery is achieved.
Patent Information
- Application Number
- CN202311508941.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-11-13
- Publication Date
- 2025-05-13
AI Technical Summary
In the case of abnormal computing devices, the prior art requires time and resources to be consumed to recover virtual logic devices, and the memory space is reallocated after restart, resulting in high time and resource costs during the recovery process, and the memory space used before restart cannot be restored.
When the computing device is abnormal, the allocation information of its corresponding virtual logic device is recorded as error information, rather than immediately recycled. After restarting, the identification of the virtual logic device is directly obtained from the error message and reassigned to the computing device to reduce the time and resource consumption during the recovery process.
Reduces the time and resource cost of recovering memory space after computing device abnormalities, allowing computing devices to reuse the memory space used before restarting.
Smart Images

Figure CN119988244A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of computing devices, and in particular to a method for managing memory space. Background Art
[0002] In order to increase the memory capacity of a computing device cluster (including multiple computing devices), physical memory devices can be connected to the computing device cluster based on the compute express link (CXL) technology. The CXL memory space of the physical memory devices connected to the computing device cluster is uniformly managed by a computing device running a fabric manager, which divides the CXL memory space into one or more memory blocks and allocates a free memory block to other computing devices when receiving a request for a free memory block from other computing devices.
[0003] In the related art, when an abnormality occurs in a computing device, the virtual logical device bound to the abnormal computing device will be recycled. After the abnormal computing device is restarted, it takes time and resources to re-apply for idle virtual logical devices from the computing device running the structure manager according to computing needs. The computing device running the structure manager needs to spend time and resources to find idle virtual logical devices based on the structure manager mapping table that describes the relevant information of all virtual logical devices, and allocate the idle virtual logical devices to the restarted computing device.
[0004] That is to say, the method for managing memory space in the related art has the problems of high time and resource costs in the process of restoring the memory space and inability to restore the memory space used before the restart. Summary of the invention
[0005] The embodiment of the present application provides a method for managing memory space, which can reduce the time cost and resource cost required for restoring the memory space while allowing the computing device to use the memory space used before restarting.
[0006] In a first aspect, an embodiment of the present application provides a method for managing memory space, which is applied to a first computing device, and the method includes:
[0007] After identifying that the second computing device is abnormal, the allocation information of the virtual logical device corresponding to the second computing device is recorded as the allocation information of the erroneous virtual logical device; wherein the virtual logical device is part or all of the CXL memory space of the physical memory device; the allocation information of the virtual logical device corresponding to the second computing device includes an identifier of the virtual logical device and an identifier of the second computing device corresponding to the virtual logical device;
[0008] After identifying that the second computing device is restarted, in response to receiving a recovery request sent by the second computing device, obtaining an identifier of a virtual logical device corresponding to the identifier of the second computing device in the allocation information of the erroneous virtual logical device;
[0009] The virtual logical device corresponding to the identifier of the virtual logical device is allocated to the second computing device.
[0010] Beneficial effects of this embodiment: After the first computing device recognizes that the second computing device is abnormal, it does not need to waste resources to recover the virtual logical device bound to the second computing device, but records the allocation information of the virtual logical device corresponding to the second computing device as the allocation information of the erroneous virtual logical device. After the second computing device is restarted, the second computing device does not need to spend time and resources to send an allocation application to the first computing device based on computing needs, but instead sends a recovery request to the first computing device. In response to the recovery request, the first computing device obtains the identifier of the virtual logical device corresponding to the identifier of the second computing device in the allocation information of the erroneous virtual logical device, and allocates the virtual logical device corresponding to the identifier of the virtual logical device to the second computing device, thereby reducing the time cost and resource cost of obtaining the identifier of the virtual logical device, and further reducing the time cost and resource cost of restoring the CXL memory space. In addition, the embodiment of the present application can enable the second computing device to reuse the CXL memory space used before the restart after the restart.
[0011] In one implementation, recording the allocation information of the virtual logical device corresponding to the second computing device as the allocation information of the erroneous virtual logical device includes:
[0012] Transferring allocation information of the virtual logical device corresponding to the second computing device from the use linked list to the error linked list;
[0013] Then, obtaining the identifier of the virtual logical device corresponding to the identifier of the second computing device in the allocation information of the erroneous virtual logical device includes:
[0014] The identifier of the virtual logical device corresponding to the identifier of the second computing device in the error linked list is obtained.
[0015] Beneficial effects of this implementation: The embodiment of the present application provides an error list and a use list. After the first computing device recognizes that the second computing device is abnormal, it does not need to consume resources to recover the virtual logical device bound to the second computing device, but transfers the allocation information of the virtual logical device corresponding to the second computing device from the use list to the error list. After the second computing device is restarted, the second computing device does not need to spend time and resources to send an allocation application to the first computing device based on computing needs, but instead sends a recovery request to the first computing device. In response to the recovery request, the first computing device directly obtains the identifier of the virtual logical device corresponding to the identifier of the second computing device in the error list (small amount of information), and allocates the virtual logical device corresponding to the identifier of the virtual logical device to the second computing device, thereby reducing the time cost and resource cost of obtaining the identifier of the virtual logical device, thereby reducing the time cost and resource cost of restoring the CXL memory space. In addition, the embodiment of the present application can enable the second computing device to reuse the CXL memory space used before the restart after the restart.
[0016] In one implementation, allocating the virtual logical device corresponding to the identifier of the virtual logical device to the second computing device includes:
[0017] Generate a virtual logical device detail list according to the virtual logical device identifier, the virtual logical device detail list includes a relative offset address of the virtual logical device, a capacity of the virtual logical device, and an identifier of a CXL device corresponding to the virtual logical device;
[0018] The virtual logical device list is sent to the second computing device.
[0019] Beneficial effect of this implementation: the first computing device can generate a virtual logical device list according to the identifier of the virtual logical device, and send the virtual logical device list to the second computing device, so that the second computing device can bind the virtual logical device bound before restart according to the virtual logical device list.
[0020] In one implementation, the method further includes:
[0021] In response to receiving the binding failure information sent by the second computing device, determining the identifier of the idle virtual logical device allocated to the second computing device according to the idle linked list; wherein the idle linked list includes the identifier of at least one idle virtual logical device;
[0022] The virtual logical device corresponding to the identifier of the idle virtual logical device is allocated to the second computing device.
[0023] The beneficial effect of this implementation method is that when the first computing device receives the binding failure information sent by the second computing device, the first computing device can determine the identifier of the idle virtual logical device allocated to the second computing device according to the idle linked list, and allocate the virtual logical device corresponding to the identifier of the idle virtual logical device to the second computing device, so that the second computing device can bind to the idle virtual logical device.
[0024] In one implementation, the method further includes:
[0025] In response to receiving the binding success information sent by the second computing device, the allocation information of the virtual logical device corresponding to the second computing device is transferred from the error linked list to the use linked list.
[0026] The beneficial effect of this implementation method is that after receiving the binding success information sent by the second computing device, the first computing device can transfer the allocation information of the virtual logical device corresponding to the identifier of the second computing device from the error link list to the use link list, so that the error link list and the use link list can reflect the specific situation of the current virtual logical device.
[0027] In one implementation, obtaining the identifier of the virtual logical device corresponding to the identifier of the second computing device in the error linked list includes:
[0028] By searching the error chain list, the identifier of the virtual logical device corresponding to the identifier of the second computing device in the error chain list is determined.
[0029] The beneficial effect of this implementation is that the first computing device can directly search for the virtual logical device bound before the abnormality occurs. The credibility of the bound virtual logical device is guaranteed by the above-mentioned "direct search" method by the first computing device responsible for managing all virtual logical devices.
[0030] In one implementation, obtaining the identifier of the virtual logical device corresponding to the identifier of the second computing device in the error linked list includes:
[0031] The error chain list is sent to the second computing device; the error chain list is used for the second computing device to determine the identifier of the virtual logical device corresponding to the identifier of the second computing device in the error chain list by searching the error chain list;
[0032] An identifier of a virtual logical device corresponding to the identifier of the second computing device and sent by the second computing device is obtained.
[0033] Beneficial effects of this implementation: The first computing device can send the error chain list to the second computing device, so that the second computing device can autonomously search for the virtual logical device bound before the exception occurs based on the error chain list. The second computing device can obtain the identifier of the virtual logical device corresponding to the identifier of the second computing device sent by the second computing device to assign the virtual logical device to the second computing device. Through the above-mentioned "who uses, who searches" method, the autonomy and credibility of binding virtual logical devices are guaranteed.
[0034] In one implementation, sending the error linked list to the second computing device includes:
[0035] Determining whether a restart of the second computing device is recognized within a first preset time period;
[0036] When it is determined that the second computing device is restarted within the first preset time period, in response to receiving a recovery request sent by the second computing device, an error list is sent to the second computing device.
[0037] The beneficial effect of this implementation method is: by setting a first preset time range, a buffer period is set for the process of recovering virtual logical devices. Within the first preset time range (buffer period), after recognizing that the second computing device is restarted, the virtual logical device bound to the second computing device before the abnormality occurs can be directly allocated to the second computing device, avoiding the second computing device from applying for idle virtual logical devices based on computing needs, and avoiding the first computing device from reallocating idle virtual logical devices, thereby reducing the time cost and resource cost of recovering memory space.
[0038] In one implementation, the method further includes:
[0039] When it is determined that the restart of the second computing device is not identified within the first preset time period, the virtual logical device corresponding to the second computing device is recycled.
[0040] The beneficial effect of this implementation is that a buffer period is set for recycling virtual logical devices by setting a first preset time range. When the buffer period (first preset time range) is exceeded, the virtual logical device corresponding to the second computing device is recycled to avoid the second computing device occupying the virtual logical device for a long time, resulting in low CXL memory space utilization.
[0041] In one implementation, the method further includes:
[0042] In response to receiving the allocation request sent by the second computing device, determining, according to the free linked list, an identifier of an idle virtual logical device allocated to the second computing device; wherein the free linked list includes an identifier of at least one idle virtual logical device;
[0043] The virtual logical device corresponding to the identifier of the idle virtual logical device is allocated to the second computing device.
[0044] Beneficial effect of this implementation: when the first computing device receives an allocation request sent by the second computing device, it allocates an idle virtual logical device to the second computing device, so that the second computing device regains the usable CXL memory space.
[0045] In one implementation, recording the allocation information of the virtual logical device corresponding to the second computing device as the allocation information of the erroneous virtual logical device includes:
[0046] After identifying that the second computing device is abnormal, marking the state of the allocation information of the virtual logical device corresponding to the second computing device in the structure manager mapping table from the use state to the error state;
[0047] Then, the identification of the virtual logical device corresponding to the identification of the second computing device in the allocation information of all the erroneous virtual logical devices is obtained, including:
[0048] The identifier of the virtual logical device corresponding to the identifier of the second computing device in the allocation information of the virtual logical device in the error state in the fabric manager mapping table is obtained.
[0049] The beneficial effect of this implementation is that after the first computing device recognizes that the second computing device is abnormal, it does not need to consume resources to recover the virtual logical device bound to the second computing device, but instead marks the state in the allocation information of the virtual logical device corresponding to the second computing device in the structure manager mapping table from the use state to the error state. After the second computing device is restarted, the second computing device does not need to spend time and resources to send an allocation application to the first computing device based on computing needs, but instead sends a recovery request to the first computing device. In response to the recovery request, the first computing device obtains the identifier of the virtual logical device in the structure manager mapping table that corresponds to the identifier of the second computing device and is in an error state, and allocates the virtual logical device corresponding to the identifier of the virtual logical device to the second computing device, so as to restore the CXL memory space used before the abnormal restart of the second computing device, thereby reducing the time cost and resource cost of obtaining the identifier of the virtual logical device, and thereby reducing the time cost and resource cost of restoring the CXL memory space. In addition, the embodiment of the present application can enable the second computing device to reuse the CXL memory space used before the restart after the restart.
[0050] In a second aspect, an embodiment of the present application provides a method for managing memory space, which is applied to a second computing device, and the method includes:
[0051] After the second computing device is restarted, sending a recovery request to the first computing device, the recovery request being used to obtain an identifier of a virtual logical device corresponding to the identifier of the second computing device in the allocation information of the erroneous virtual logical device;
[0052] The virtual logical device corresponding to the identifier of the virtual logical device allocated by the first computing device is bound to restore the CXL memory space of the second computing device.
[0053] The beneficial effect of this embodiment is that after the second computing device is restarted, the second computing device can send a recovery request to the first computing device without wasting time and resources to send an allocation application to the first computing device based on computing needs. The second computing device can restore the CXL memory space of the second computing device by binding the virtual logical device allocated by the first computing device. In this way, the time cost and resource cost of obtaining the identity of the virtual logical device can be reduced.
[0054] In one implementation, binding the virtual logical device corresponding to the identifier of the virtual logical device allocated by the first computing device to restore the CXL memory space of the second computing device includes:
[0055] In response to receiving the virtual logical device list sent by the first computing device, obtaining physical address information of a physical memory device corresponding to the virtual logical device according to an identifier of a CXL device corresponding to the virtual logical device in the virtual logical device list; wherein the virtual logical device list is generated by the first computing device according to the identifier of the virtual logical device;
[0056] Determine the physical address information of the virtual logical device according to the relative offset address of the virtual logical device in the virtual logical device list, the capacity of the virtual logical device in the virtual logical device list, and the physical address information of the physical memory device corresponding to the virtual logical device;
[0057] A local memory pool is created according to the physical address information of the virtual logical device to restore the CXL memory space of the second computing device.
[0058] Beneficial effect of this implementation: The second computing device can create a local memory pool based on the relevant information in the virtual logical device list and the physical address information of the physical memory device obtained based on the identification of the CXL device to restore the CXL memory space used by the second computing device before the abnormal restart.
[0059] In one implementation, obtaining physical address information of a physical memory device corresponding to a virtual logical device according to an identifier of a CXL device corresponding to a virtual logical device in a virtual logical device list includes:
[0060] sending a call request to a CXL controller of at least one CXL device;
[0061] Acquire memory device information sent by a CXL controller of at least one CXL device based on a call request; the memory device information includes an identifier of the CXL device and physical address information of a physical memory device;
[0062] Determine whether, in at least one piece of memory device information, there is an identifier of a CXL device included in the memory device information that is consistent with an identifier of a CXL device corresponding to the virtual logical device;
[0063] If so, it is determined that the identifier of the CXL device corresponding to the virtual logical device has been verified, and the physical address information of the physical memory device corresponding to the identifier of the CXL device corresponding to the virtual logical device in the at least one memory device information is determined as the physical address information of the physical memory device corresponding to the virtual logical device.
[0064] Beneficial effects of this implementation: When the second computing device determines that there is a piece of memory device information in at least one piece of memory device information, and the identifier of the CXL device included therein is consistent with the identifier of the CXL device in the virtual logical device list, it can determine that there is a CXL device, and its currently available CXL memory space includes the virtual logical device (CXL memory space) bound before the second computing device becomes abnormal. In other words, the second computing device determines that the identifier verification of the CXL device in the virtual logical device list is passed. The second computing device can determine the physical address information of the physical memory device corresponding to the identifier of the CXL device corresponding to the virtual logical device in at least one piece of memory device information as the physical address information of the physical memory device corresponding to the virtual logical device, so as to create a local memory pool according to the physical address information of the physical memory device corresponding to the virtual logical device.
[0065] In one implementation, the method further includes:
[0066] If not, determining that the identity check of the CXL device corresponding to the virtual logical device fails, and sending a binding failure message to the first computing device;
[0067] The virtual logical device corresponding to the identifier of the idle virtual logical device allocated by the first computing device is bound.
[0068] Beneficial effects of this implementation: When the second computing device determines that there is no memory device information in at least one memory device information, and the identifier of the CXL device included therein is consistent with the CXL device identifier in the virtual logical device list, it can determine that there is no CXL device, and its currently available CXL memory space includes the virtual logical device bound before the second computing device is abnormal. The second computing device can send a binding failure message to the first computing device to bind the virtual logical device corresponding to the identifier of the idle virtual logical device allocated by the first computing device.
[0069] In one implementation, the method further includes:
[0070] After the local memory pool is created, a binding success message is sent to the first computing device.
[0071] Beneficial effect of this implementation: After creating the local memory pool, the second computing device can send binding success information to the first computing device.
[0072] In one implementation, the method further includes:
[0073] Obtaining an error chain list sent by the first computing device;
[0074] By searching the error chain list, determining the identifier of the virtual logical device corresponding to the identifier of the second computing device in the error chain list;
[0075] An identification of a virtual logical device corresponding to the identification of the second computing device is sent to the first computing device.
[0076] The beneficial effect of this implementation is that the second computing device can autonomously search for the virtual logical device bound before the exception occurs based on the error chain list sent by the first computing device, and then send the identifier of the virtual logical device to the first computing device. Through the above-mentioned "who uses, who searches" method, the autonomy and credibility of binding virtual logical devices are guaranteed.
[0077] In one implementation, the method further includes:
[0078] By searching the error linked list, determining that the identifier of the virtual logical device corresponding to the identifier of the second computing device does not exist in the error linked list, and sending an allocation request to the first computing device;
[0079] The virtual logical device corresponding to the identifier of the idle virtual logical device allocated by the first computing device is bound.
[0080] The beneficial effect of this implementation is that when the second computing device searches the error list and determines that there is no identifier of a virtual logical device corresponding to the identifier of the second computing device in the error list, the second computing device can send an allocation request to the first computing device to apply to the first computing device for allocation of an idle virtual logical device, so that the second computing device can regain usable CXL memory space.
[0081] In a third aspect, an embodiment of the present application provides a first computing device, including:
[0082] A processing module, configured to record, after identifying that an abnormality occurs in the second computing device, allocation information of a virtual logical device corresponding to the second computing device as allocation information of an erroneous virtual logical device; wherein the virtual logical device is part or all of the CXL memory space of the physical memory device; and the allocation information of the virtual logical device corresponding to the second computing device includes an identifier of the virtual logical device and an identifier of the second computing device corresponding to the virtual logical device;
[0083] The processing module is further configured to, after recognizing that the second computing device is restarted, obtain, in response to receiving a recovery request sent by the second computing device, an identifier of the virtual logical device corresponding to the identifier of the second computing device in the allocation information of the erroneous virtual logical device;
[0084] The sending module is used to allocate the virtual logical device corresponding to the identifier of the virtual logical device to the second computing device.
[0085] The first computing device provided in the embodiment of the present application can execute the technical solution shown in the above method embodiment, and its implementation principle and beneficial effects are similar, which will not be repeated here.
[0086] In one implementation, the processing module is specifically configured to:
[0087] Transferring allocation information of the virtual logical device corresponding to the second computing device from the use linked list to the error linked list;
[0088] The identifier of the virtual logical device corresponding to the identifier of the second computing device in the error linked list is obtained.
[0089] The first computing device provided in this implementation can execute the technical solution shown in the above method embodiment, and its implementation principle and beneficial effects are similar, which will not be repeated here.
[0090] In one implementation, the sending module is specifically configured to:
[0091] Generate a virtual logical device detail list according to the virtual logical device identifier, the virtual logical device detail list includes a relative offset address of the virtual logical device, a capacity of the virtual logical device, and an identifier of a CXL device corresponding to the virtual logical device;
[0092] The virtual logical device list is sent to the second computing device.
[0093] The first computing device provided in this implementation can execute the technical solution shown in the above method embodiment, and its implementation principle and beneficial effects are similar, which will not be repeated here.
[0094] In one implementation,
[0095] The processing module is further used to determine, in response to receiving the binding failure information sent by the second computing device, an identifier of an idle virtual logical device allocated to the second computing device according to the idle linked list; wherein the idle linked list includes an identifier of at least one idle virtual logical device;
[0096] The sending module is further used to allocate the virtual logical device corresponding to the identifier of the idle virtual logical device to the second computing device.
[0097] The first computing device provided in this implementation can execute the technical solution shown in the above method embodiment, and its implementation principle and beneficial effects are similar, which will not be repeated here.
[0098] In one implementation, the processing module is further configured to:
[0099] In response to receiving the binding success information sent by the second computing device, the allocation information of the virtual logical device corresponding to the second computing device is transferred from the error linked list to the use linked list.
[0100] The first computing device provided in this implementation can execute the technical solution shown in the above method embodiment, and its implementation principle and beneficial effects are similar, which will not be repeated here.
[0101] In one implementation, the processing module is specifically configured to:
[0102] By searching the error chain list, the identifier of the virtual logical device corresponding to the identifier of the second computing device in the error chain list is determined.
[0103] The first computing device provided in this implementation can execute the technical solution shown in the above method embodiment, and its implementation principle and beneficial effects are similar, which will not be repeated here.
[0104] In one implementation, the processing module is specifically configured to:
[0105] The error chain list is sent to the second computing device; the error chain list is used for the second computing device to determine the identifier of the virtual logical device corresponding to the identifier of the second computing device in the error chain list by searching the error chain list;
[0106] An identifier of a virtual logical device corresponding to the identifier of the second computing device and sent by the second computing device is obtained.
[0107] The first computing device provided in this implementation can execute the technical solution shown in the above method embodiment, and its implementation principle and beneficial effects are similar, which will not be repeated here.
[0108] In one implementation, the processing module is specifically configured to:
[0109] Determining whether a restart of the second computing device is recognized within a first preset time period;
[0110] When it is determined that the second computing device is restarted within the first preset time period, in response to receiving a recovery request sent by the second computing device, an error list is sent to the second computing device.
[0111] The first computing device provided in this implementation can execute the technical solution shown in the above method embodiment, and its implementation principle and beneficial effects are similar, which will not be repeated here.
[0112] In one implementation, the processing module is further configured to:
[0113] When it is determined that the restart of the second computing device is not identified within the first preset time period, the virtual logical device corresponding to the second computing device is recycled.
[0114] The first computing device provided in this implementation can execute the technical solution shown in the above method embodiment, and its implementation principle and beneficial effects are similar, which will not be repeated here.
[0115] In one implementation,
[0116] The processing module is further configured to determine, in response to receiving an allocation request sent by the second computing device, an identifier of an idle virtual logical device allocated to the second computing device according to the idle linked list; wherein the idle linked list includes an identifier of at least one idle virtual logical device;
[0117] The sending module is further used to allocate the virtual logical device corresponding to the identifier of the idle virtual logical device to the second computing device.
[0118] The first computing device provided in this implementation can execute the technical solution shown in the above method embodiment, and its implementation principle and beneficial effects are similar, which will not be repeated here.
[0119] In one implementation, the processing module is specifically configured to:
[0120] After identifying that the second computing device is abnormal, marking the state of the allocation information of the virtual logical device corresponding to the second computing device in the structure manager mapping table from the use state to the error state;
[0121] The identifier of the virtual logical device corresponding to the identifier of the second computing device in the allocation information of the virtual logical device in the error state in the fabric manager mapping table is obtained.
[0122] The first computing device provided in this implementation can execute the technical solution shown in the above method embodiment, and its implementation principle and beneficial effects are similar, which will not be repeated here.
[0123] In a fourth aspect, an embodiment of the present application provides a second computing device, including:
[0124] a sending module, configured to send a recovery request to the first computing device after the second computing device is restarted, wherein the recovery request is used to obtain an identifier of a virtual logical device corresponding to the identifier of the second computing device in the allocation information of the erroneous virtual logical device;
[0125] The processing module is configured to bind the virtual logical device corresponding to the identifier of the virtual logical device allocated by the first computing device to restore the CXL memory space of the second computing device.
[0126] The first computing device provided in the embodiment of the present application can execute the technical solution shown in the above method embodiment, and its implementation principle and beneficial effects are similar, which will not be repeated here.
[0127] In one implementation, the processing module is specifically configured to:
[0128] In response to receiving the virtual logical device list sent by the first computing device, obtaining physical address information of a physical memory device corresponding to the virtual logical device according to an identifier of a CXL device corresponding to the virtual logical device in the virtual logical device list; wherein the virtual logical device list is generated by the first computing device according to the identifier of the virtual logical device;
[0129] Determine the physical address information of the virtual logical device according to the relative offset address of the virtual logical device in the virtual logical device list, the capacity of the virtual logical device in the virtual logical device list, and the physical address information of the physical memory device corresponding to the virtual logical device;
[0130] A local memory pool is created according to the physical address information of the virtual logical device to restore the CXL memory space of the second computing device.
[0131] The first computing device provided in this implementation can execute the technical solution shown in the above method embodiment, and its implementation principle and beneficial effects are similar, which will not be repeated here.
[0132] In one implementation, the processing module is specifically configured to:
[0133] sending a call request to a CXL controller of at least one CXL device;
[0134] Acquire memory device information sent by a CXL controller of at least one CXL device based on a call request; the memory device information includes an identifier of the CXL device and physical address information of a physical memory device;
[0135] Determine whether, in at least one piece of memory device information, there is an identifier of a CXL device included in the memory device information that is consistent with an identifier of a CXL device corresponding to the virtual logical device;
[0136] If so, it is determined that the identifier of the CXL device corresponding to the virtual logical device has been verified, and the physical address information of the physical memory device corresponding to the identifier of the CXL device corresponding to the virtual logical device in the at least one memory device information is determined as the physical address information of the physical memory device corresponding to the virtual logical device.
[0137] The first computing device provided in this implementation can execute the technical solution shown in the above method embodiment, and its implementation principle and beneficial effects are similar, which will not be repeated here.
[0138] In one implementation, the processing module is further configured to:
[0139] If not, determining that the identity check of the CXL device corresponding to the virtual logical device fails, and sending a binding failure message to the first computing device;
[0140] The virtual logical device corresponding to the identifier of the idle virtual logical device allocated by the first computing device is bound.
[0141] The first computing device provided in this implementation can execute the technical solution shown in the above method embodiment, and its implementation principle and beneficial effects are similar, which will not be repeated here.
[0142] In one implementation, the sending module is further configured to:
[0143] After the local memory pool is created, a binding success message is sent to the first computing device.
[0144] The first computing device provided in this implementation can execute the technical solution shown in the above method embodiment, and its implementation principle and beneficial effects are similar, which will not be repeated here.
[0145] In one implementation,
[0146] The processing module is further used to obtain the error chain list sent by the first computing device;
[0147] The processing module is further used to determine the identifier of the virtual logical device corresponding to the identifier of the second computing device in the error chain list by searching the error chain list;
[0148] The sending module is further used to send the identifier of the virtual logical device corresponding to the identifier of the second computing device to the first computing device.
[0149] The first computing device provided in this implementation can execute the technical solution shown in the above method embodiment, and its implementation principle and beneficial effects are similar, which will not be repeated here.
[0150] In one implementation, the processing module is further configured to:
[0151] By searching the error linked list, determining that the identifier of the virtual logical device corresponding to the identifier of the second computing device does not exist in the error linked list, and sending an allocation request to the first computing device;
[0152] The virtual logical device corresponding to the identifier of the idle virtual logical device allocated by the first computing device is bound.
[0153] The first computing device provided in this implementation can execute the technical solution shown in the above method embodiment, and its implementation principle and beneficial effects are similar, which will not be repeated here.
[0154] In a fifth aspect, an embodiment of the present application further provides a computing system, including:
[0155] a first computing device and at least one second computing device;
[0156] The first computing device is used to execute the method for managing memory space of the first aspect;
[0157] The second computing device is used to execute the method for managing memory space in the second aspect.
[0158] The first computing device and the second computing device in the computing system provided by this implementation can execute the technical solution shown in the above method embodiment, and the implementation principles and beneficial effects are similar, which will not be repeated here.
[0159] In a sixth aspect, the present application provides a computing device, including:
[0160] A processor, and a memory communicatively connected to the processor;
[0161] Memory is used to store computer executable instructions;
[0162] The processor is used to execute the computer-executable instructions stored in the memory to implement the method for managing memory space of the first aspect or the second aspect.
[0163] The computing device provided by this implementation can execute the technical solution shown in the above method embodiment, and its implementation principle and beneficial effects are similar, which will not be repeated here.
[0164] In a seventh aspect, an embodiment of the present application provides a computer-readable storage medium, in which computer execution instructions are stored. When the computer execution instructions are executed by a processor, they are used to implement the method for managing memory space of the first aspect or the second aspect.
[0165] When the computer-executable instructions in the computer-readable storage medium provided by this implementation are executed by the processor, the technical solution shown in the above method embodiment can be implemented. Its implementation principle and beneficial effects are similar and will not be repeated here.
[0166] In an eighth aspect, an embodiment of the present application provides a computer program product, including a computer program, which, when executed by a processor, is used to implement the method for managing memory space in the first aspect or the second aspect.
[0167] When the computer program in the computer program product provided by this implementation is executed by a processor, the technical solution shown in the above method embodiment can be implemented. Its implementation principle and beneficial effects are similar and will not be repeated here. BRIEF DESCRIPTION OF THE DRAWINGS
[0168] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the related technologies, the following is a brief introduction to the drawings required for use in the embodiments or the related technical descriptions. Obviously, the drawings described below are some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative labor.
[0169] Figure 1a A schematic diagram of the architecture of a computing system provided in an embodiment of the present application;
[0170] Figure 1b A schematic diagram of the architecture of another computing system provided in an embodiment of the present application;
[0171] Figure 2 A schematic diagram of allocating memory space provided in an embodiment of the present application;
[0172] Figure 3a A flowchart of a method for managing memory space provided in an embodiment of the present application;
[0173] Figure 3b A schematic diagram of a table involved in managing memory space provided in an embodiment of the present application;
[0174] Figure 3c A schematic diagram of another method of allocating memory space provided in an embodiment of the present application;
[0175] Figure 4a A flowchart of a second embodiment of a method for managing memory space provided in an embodiment of the present application;
[0176] Figure 4b A schematic diagram of another table involved in managing memory space provided in an embodiment of the present application;
[0177] Figure 5 A flowchart of a third embodiment of a method for managing memory space provided in an embodiment of the present application;
[0178] Figure 6 A flowchart of a fourth embodiment of a method for managing memory space provided in an embodiment of the present application;
[0179] Figure 7 A flowchart of a fifth embodiment of a method for managing memory space provided in an embodiment of the present application;
[0180] Figure 8 A flowchart of a sixth embodiment of a method for managing memory space provided in an embodiment of the present application;
[0181] Fig. 9 A schematic diagram of the structure of a first computing device provided in an embodiment of the present application;
[0182] Fig.10 A schematic diagram of the structure of a second computing device provided in an embodiment of the present application;
[0183] Fig.11 A schematic diagram of the structure of a computing device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0184] In order to make the purpose, technical solution and advantages of the embodiments of the present application clearer, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments made by ordinary technicians in this field under the enlightenment of the embodiments belong to the scope of protection of the present application.
[0185] The terms "first", "second", "third", "fourth", etc. (if any) in the specification and claims of the present application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the present application described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units that are clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0186] Glossary:
[0187] CXL protocol: also known as the Computing Express Link protocol, is a high-speed serial protocol that enables fast and reliable data transmission between different components within a computing device, such as the central processing unit (CPU) and accelerator, memory buffer, and smart network interface card (Smart NIC). CXL protocols include CXL.io protocol, CXL.cache protocol, CXL.memory protocol, etc.
[0188] To facilitate understanding, first combine Figure 1a An architecture of a computing system involved in an embodiment of the present application is described.
[0189] Figure 1a A schematic diagram of the architecture of a computing system provided in an embodiment of the present application.
[0190] like Figure 1a As shown, the computing system 10 includes a first computing device 20, at least one second computing device, and at least one CXL device. The first computing device 20 and the at least one second computing device are both directly electrically connected to the at least one CXL device.
[0191] For example, Figure 1a Two second computing devices are shown, namely a second computing device 30 and a second computing device 40 . Figure 1a Two CXL devices are shown, CXL device 50 and CXL device 60 .
[0192] The CXL device 50 may include a CXL controller 501 and at least one physical memory device. Figure 1aTwo physical memory devices are shown, namely physical memory device 502 and physical memory device 503 .
[0193] The CXL device 60 may include a CXL controller 601 and at least one physical memory device. Figure 1a Two physical memory devices are shown, namely physical memory device 602 and physical memory device 603 .
[0194] It should be noted that the CXL controller, also known as the CXL chip, as a CXL expansion board of the computing system, can connect physical memory devices to multiple computing devices based on the physical memory device expansion technology of compute express link (CXL) to increase the memory capacity of the computing devices.
[0195] It should also be noted that the physical memory device may be a volatile memory device or a non-volatile memory device.
[0196] When the physical memory device is a volatile memory device, the physical memory device may be a dynamic random access memory (DRAM), a static random access memory (SRAM), or other physical memory devices that require power to store data.
[0197] When the physical memory device is a non-volatile memory device, the physical memory device may be a PMEM, or may be other physical memory devices that can store data without power supply.
[0198] It should also be noted that the first computing device and the second computing device may be terminals (mobile phones, computers, etc.) or servers.
[0199] Combine the following Figure 1b Another architecture of the computing system involved in the embodiments of the present application is described.
[0200] Figure 1b A schematic diagram of the architecture of another computing system provided in an embodiment of the present application.
[0201] like Figure 1b As shown, the computing system 10 includes a first computing device 20, at least one second computing device, and at least one CXL device. In addition, the computing system 10 also includes a switch 70. The first computing device 20 and the at least one second computing device are both electrically connected to the at least one CXL device through the switch 70.
[0202] For example, Figure 1bTwo second computing devices are shown, namely a second computing device 30 and a second computing device 40 . Figure 1b Two CXL devices are shown, CXL device 50 and CXL device 60 .
[0203] The CXL device 50 may include a CXL controller 501 and at least one physical memory device. Figure 1b Two physical memory devices are shown, namely physical memory device 502 and physical memory device 503 .
[0204] The CXL device 60 may include a CXL controller 601 and at least one physical memory device. Figure 1b Two physical memory devices are shown, namely physical memory device 602 and physical memory device 603 .
[0205] The switch 70 is a switch that complies with the CXL protocol. The first computing device or the second computing device can be connected to the corresponding CXL device through the switch.
[0206] For ease of understanding, the following Figure 1a and Figure 1b , the memory space allocation process is explained in detail.
[0207] A fabric manager (Fabric Manager, FM for short) (software) runs on the first computing device 20 .
[0208] The CXL memory spaces of the CXL devices 50 and 60 constitute a memory pool. The CXL memory spaces of the memory pool are uniformly managed by the first computing device 20. The first computing device 20 can abstract a continuous CXL memory space (including CXL memory spaces of one or more physical memory devices) in the memory pool into a physical logical device (PhysicalLogical Device, PLD for short).
[0209] The first computing device 20 may divide a physical logical device into multiple virtual logical devices (VLDs), or use a physical logical device as a virtual logical device. Upon receiving an allocation request sent by the second computing device 30 or the second computing device 40, the first computing device 20 allocates at least one virtual logical device to the computing device 30 or the computing device 40.
[0210] It should be noted that the Fabric Manager (FM) is used to uniformly manage the CXL memory space of all CXL devices (including at least one physical memory device) in the memory pool, and is responsible for treating the CXL memory space in the memory pool as a virtual logical device, or slicing it into multiple virtual logical devices. When a computing device applies for CXL memory space, the Fabric Manager allocates one or more virtual logical devices to each computing device, and records the mapping information between the computing device identifier and the virtual logical device identifier (VID). FM can be deployed on any computing device in the computing system, and only one computing device can run FM at the same time.
[0211] It should also be noted that the FM can be deployed on a central processing unit, baseboard management controller, or other device with processing capabilities of a computing device. The present application embodiment does not limit the specific deployment location of the FM. Figure 1b For computing systems, FM can also be deployed on switches.
[0212] Local CXL Space Management Daemon (LMD): runs on each computing device and is used to apply for CXL memory space from FM. LMD can locally manage the applied CXL memory space. Applications running on the computing device can apply for CXL memory space from LMD.
[0213] The following describes the process of allocating memory space from the perspective of FM, LMD0 and LMD1.
[0214] Figure 2 A schematic diagram of allocating memory space provided in an embodiment of the present application.
[0215] like Figure 2 As shown, the FM running on the first computing device 20 can regard the CXL memory space of the physical memory device 502 as the physical logical device PLD0. The FM running on the first computing device 20 can divide PLD0 into two virtual logical devices, and the identifiers of the two virtual logical devices are VID0 and VID1 respectively. The FM running on the first computing device 20 can regard the CXL memory space of the physical memory device 503 as the physical logical device PLD1. The FM running on the first computing device 20 can divide PLD1 into two virtual logical devices, and the identifiers of the two virtual logical devices are VIDN-1 and VIDN respectively. Of course, in other embodiments, the FM running on the first computing device 20 can divide PLD1 into one virtual logical device, and the identifier of the one virtual logical device is VIDN-1.
[0216] When LMD0 running on the second computing device 30 applies for CXL memory space from FM, FM can select an idle VLD and allocate it to the second computing device 30, so that LMD0 running on the second computing device 30 binds the idle VLD. For example, LMD0 running on the second computing device 30 binds the VLD corresponding to VID0. LMD0 can manage the VLD bound to the second computing device 30. Applications (applications, APP for short) running on the second computing device 30, such as APP0 and APP1, can apply for CXL memory space from LMD0. In other words, LMD0 can further divide the CXL memory space of the VLD corresponding to VID0 to determine the CXL memory space allocated to APP0 and the CXL memory space allocated to APP1.
[0217] When LMD1 running on the second computing device 40 applies for CXL memory space from FM, FM can select an idle VLD and allocate it to the second computing device 40, so that LMD1 running on the second computing device 40 binds the idle VLD. For example, LMD1 running on the second computing device 30 binds the VLD corresponding to VIDN. LMD1 can manage the VLD bound to the second computing device 40. Applications running on the second computing device 40, such as APP2 and APP3, can apply for CXL memory space from LMD1. In other words, LMD1 can further divide the CXL memory space of the VLD corresponding to VIDN to determine the CXL memory space allocated to APP2 and the CXL memory space allocated to APP3.
[0218] Take the case where an abnormality occurs in the second computing device 30 as an example.
[0219] In the related art, when an abnormality occurs in the second computing device 30, the FM running on the second computing device 20 needs to spend time and resources to recycle the virtual logical device bound to the second computing device 30. After the second computing device 30 is restarted, the LMD0 running on the second computing device 30 needs to spend time and resources to request the first computing device 20 running the FM to allocate an idle virtual logical device again according to computing requirements. The FM running on the first computing device 20 needs to spend time and resources to determine an idle virtual logical device based on the structure manager mapping table that describes the relevant information of all virtual logical devices, so that the LMD0 running on the second computing device 30 binds the idle virtual logical device to re-provide CXL memory space for the second computing device 30. In other words, the method of managing memory space in the related art has the problems of high time cost and resource cost and inability to restore the memory space used before the restart in the process of re-providing memory space for the second computing device.
[0220] Based on the above technical problems, an embodiment of the present application proposes a method for managing memory space. After the first computing device recognizes that an abnormality has occurred in the second computing device, the first computing device can record the allocation information of the virtual logical device corresponding to the second computing device (including the identifier of the virtual logical device and the identifier of the second computing device corresponding to the virtual logical device) as the allocation information of the erroneous virtual logical device; after the second computing device is restarted, the identifier of the virtual logical device corresponding to the identifier of the second computing device in the allocation information of the erroneous virtual logical device is directly obtained, and the virtual logical device corresponding to the identifier of the virtual logical device is allocated to the second computing device, so that the second computing device can bind the virtual logical device corresponding to the identifier of the virtual logical device, so as to restore the CXL memory space used by the second computing device before the abnormal restart of the second computing device.
[0221] The following is a detailed description of the solution for managing memory space in the embodiment of the present application. It should be noted that the following specific embodiments can be combined with each other, and the same or similar concepts or processes may not be described in detail in some embodiments.
[0222] Figure 3a A flowchart of a method for managing memory space provided in an embodiment of the present application. Figure 3a , the method specifically comprises the following steps:
[0223] S301: After identifying that an abnormality occurs in a second computing device, the first computing device records allocation information of a virtual logical device corresponding to the second computing device as allocation information of an erroneous virtual logical device.
[0224] In this embodiment, after the first computing device recognizes that the second computing device is abnormal, the first computing device can record the allocation information of the virtual logical device corresponding to the second computing device as the allocation information of the erroneous virtual logical device. The allocation information of the virtual logical device corresponding to the second computing device includes the identifier of the virtual logical device and the identifier of the second computing device corresponding to the virtual logical device.
[0225] In one implementation, recording the allocation information of the virtual logical device corresponding to the second computing device as the allocation information of the erroneous virtual logical device includes: transferring the allocation information of the virtual logical device corresponding to the second computing device from a use linked list to an error linked list.
[0226] Specifically, the first computing device stores a usage linked list and an error linked list. Figure 3b A schematic diagram of a table involved in managing memory space provided in an embodiment of the present application.
[0227] like Figure 3b As shown, the tables involved in managing memory space include an error linked list and a usage linked list.
[0228] Usage linked list: includes allocation information of virtual logical devices that have been applied for binding by computing devices. The allocation information includes the identifier of the virtual logical device and the identifier of the computing device corresponding to the virtual logical device. The virtual logical device is part or all of the CXL memory space of the physical memory device in the CXL device. The identifier of the computing device is information indicating the identity of the computing device. For example, the identifier of the computing device can be an Internet Protocol Address (IP address for short). In addition, the allocation information also includes the capacity, number of uses, state (idle state, use state or error state), error type and number of errors corresponding to the virtual logical device used.
[0229] Error chain list: includes allocation information of the virtual logical device with an error. The allocation information includes the identifier of the virtual logical device with an error and the identifier of the computing device corresponding to the virtual logical device with an error. In addition, the allocation information may also include the error type (including but not limited to the connection timeout error type, error correction code error type, etc.), the number of errors, the state, the capacity (referring to the capacity of the virtual logical device, used to determine the physical address information of the virtual logical device), and the number of uses.
[0230] It should be noted that for each linked list, Figure 3b Only the identification of the virtual logical devices is shown.
[0231] In addition, the tables involved in managing memory space may also include a free list, which may include an identifier of at least one free virtual logical device, the capacity, usage times, status, error times and error type of each free virtual logical device.
[0232] After recognizing that the second computing device is abnormal, the first computing device may transfer the allocation information of the virtual logical device corresponding to the second computing device from the use list to the error list. The allocation information includes the identifier of the second computing device and the identifier of the virtual logical device corresponding to the second computing device. In one implementation, when the error list includes the error type corresponding to the erroneous virtual logical device, the first computing device may also modify the error type corresponding to the virtual logical device to a connection timeout error type.
[0233] In another implementation, recording the allocation information of the virtual logical device corresponding to the second computing device as the allocation information of the erroneous virtual logical device includes: marking the state in the allocation information of the virtual logical device corresponding to the second computing device in the structure manager mapping table from the usage state to the error state. The structure manager mapping table includes the allocation information of all virtual logical devices. The allocation information of each virtual logical device includes the identification of each virtual logical device and the status of each virtual logical device. In addition, the allocation information of each virtual logical device may also include the capacity, the number of times used, the number of errors, the error type, etc. In addition, when the virtual logical device is in the usage state or the error state, the allocation information of each virtual logical device may also include the identification of the computing device corresponding to the virtual logical device.
[0234] S302: After the second computing device is restarted, the second computing device sends a recovery request to the first computing device.
[0235] In this embodiment, after the second computing device is restarted, the second computing device may establish a communication connection with the first computing device through a communication mechanism (including but not limited to a heartbeat mechanism). After successfully establishing a communication connection with the first computing device, the second computing device may send a recovery request (a request to recover the CXL memory space) to the first computing device. The recovery request is used to obtain the identifier of the virtual logical device corresponding to the identifier of the second computing device in the allocation information of the erroneous virtual logical device.
[0236] S303: After recognizing that the second computing device is restarted, the first computing device obtains an identifier of a virtual logical device corresponding to the identifier of the second computing device in the allocation information of the erroneous virtual logical device in response to receiving a recovery request sent by the second computing device.
[0237] In this embodiment, after recognizing that the second computing device has been restarted, the first computing device may establish a communication connection with the second computing device through a communication mechanism (including but not limited to a heartbeat mechanism).
[0238] The first computing device may obtain a recovery request sent by the second computing device after successfully establishing a communication connection with the second computing device.
[0239] The first computing device, in response to a recovery request from the second computing device, obtains an identifier of a virtual logical device corresponding to the identifier of the second computing device in the allocation information of the erroneous virtual logical device.
[0240] In one implementation, the first computing device may obtain, in response to a recovery request from the second computing device, an identifier of a virtual logical device corresponding to the identifier of the second computing device in allocation information of a virtual logical device in an error state in a fabric manager mapping table.
[0241] In another implementation, the first computing device may, in response to the recovery request, obtain allocation information of the virtual logical device corresponding to the identifier of the second computing device in the error linked list, thereby determining the identifier of the virtual logical device corresponding to the identifier of the second computing device. By dividing multiple linked lists based on the states of the virtual logical devices, the speed of finding the identifier of the virtual logical device corresponding to the identifier of the second computing device can be increased.
[0242] In one implementation, based on the error type corresponding to each erroneous virtual logical device recorded in the error linked list, the first computing device can obtain the identifier of the virtual logical device in the error linked list that corresponds to the identifier of the second computing device and whose error type is a connection timeout error type.
[0243] Specifically, in the process of the first computing device acquiring the allocation information of the virtual logical device corresponding to the identifier of the second computing device in the error linked list:
[0244] In one implementation, the first computing device may determine the allocation information of the virtual logical device corresponding to the identifier of the second computing device in the error linked list by searching the error linked list in response to the recovery request sent by the second computing device. In other words, the identifier of the virtual logical device corresponding to the identifier of the second computing device in the error linked list is determined.
[0245] In one implementation, the first computing device may send an error chain list to the second computing device in response to a recovery request sent by the second computing device. After obtaining the error chain list, the second computing device may search the error chain list to determine the allocation information of the virtual logical device corresponding to the identifier of the second computing device in the error chain list. The virtual logical device is a virtual logical device bound before the second computing device is abnormal. The second computing device may send the identifier of the virtual logical device as a binding target to the first computing device, so that the first computing device obtains the identifier of the virtual logical device corresponding to the identifier of the second computing device in the error chain list.
[0246] S304: The first computing device allocates the virtual logical device corresponding to the identifier of the virtual logical device to the second computing device.
[0247] In this embodiment, the first computing device allocates the virtual logical device corresponding to the identifier of the virtual logical device to the second computing device.
[0248] Specifically, the first computing device may generate a virtual logical device list according to the identifier of the virtual logical device, and send the virtual logical device list to the second computing device; wherein the virtual logical device list includes the relative offset address of the virtual logical device, the capacity of the virtual logical device, and the identifier of the CXL device corresponding to the virtual logical device. In addition, the virtual logical device list may also include the identifier of the virtual logical device, the state of the virtual logical device, the identifier of the second computing device (such as an IP address), etc.
[0249] S305: The second computing device binds the virtual logical device corresponding to the identifier of the virtual logical device allocated by the first computing device to restore the CXL memory space of the second computing device.
[0250] In this embodiment, the second computing device may bind the virtual logical device corresponding to the identifier of the virtual logical device to restore the CXL memory space used by the second computing device before the abnormal restart.
[0251] Specifically, after obtaining the virtual logical device list sent by the first computing device, the second computing device may obtain the physical address information of the physical memory device corresponding to the virtual logical device according to the identifier of the CXL device corresponding to the virtual logical device in the virtual logical device list.
[0252] The second computing device determines the physical address information of the virtual logical device according to the relative offset address of the virtual logical device, the capacity corresponding to the virtual logical device, and the physical address information of the physical memory device corresponding to the virtual logical device.
[0253] The second computing device creates a local memory pool according to the physical address information of the virtual logical device to restore the CXL memory space used by the second computing device before the abnormal restart. It should be noted that the local memory pool is the CXL memory space managed by the LMD of the second computing device, the CXL memory space applied for by the LMD of the second computing device from the FM, the CXL memory space corresponding to the physical address information of the virtual logical device, and the CXL memory space that the application running on the second computing device can apply for from the LMD.
[0254] For ease of understanding, the following is based on Figure 1a and Figure 1b The computing system 10 in the embodiment of the present invention describes the memory space allocation process in detail from the perspectives of FM, LMD0 and LMD1.
[0255] Figure 3c A schematic diagram of another method of allocating memory space provided in an embodiment of the present application.
[0256] like Figure 3cAs shown, before the second computing device 30 is abnormal, the FM running on the first computing device 20 can regard the CXL memory space of the physical memory device 502 as the physical logical device PLD0. The FM running on the first computing device 20 can divide PLD0 into two virtual logical devices, and the identifiers of the two virtual logical devices are VID1 and VID2 respectively. The FM running on the first computing device 20 can regard the CXL memory space of the physical memory device 503 as the physical logical device PLD1. The FM running on the first computing device 20 can divide PLD1 into two virtual logical devices, and the identifiers of the two virtual logical devices are VIDN-1 and VIDN respectively. When LMD0 running on the second computing device 30 applies for CXL memory space from FM, FM can select an idle VLD and assign the selected idle VLD to LMD0 running on the second computing device 30. LMD0 running on the second computing device 30 binds the selected idle VLD. For example, FM can assign VID0 to LMD0 running on the second computing device 30, and LMD0 running on the second computing device 30 can bind VID0. FM can assign VID1 to LMD0 running on the second computing device 30, and LMD0 running on the second computing device 30 can bind VID1. LMD0 running on the second computing device can manage VLD bound to the second computing device 30. APP0 and APP1 running on the second computing device 30 can apply for CXL memory space from LMD0.
[0257] After the second computing device 30 is abnormal, LMD0 running on the second computing device 30 cannot manage VID0 and VID1. FM running on the first computing device 20 can transfer the identifiers of the virtual logical devices corresponding to the second computing device 30, VID0 and VID1, from the use list to the error list.
[0258] After the second computing device 30 is restarted, the FM running on the first computing device 20 can, upon recognizing the restart of the second computing device 30, respond to the recovery request sent by the LMD0 running on the second computing device 30 and obtain the identifiers of the virtual logical devices corresponding to the second computing device 30 in the error linked list, namely, VID0 and VID1. The FM running on the first computing device 20 assigns VID0 and VID1 to the LMD0 running on the second computing device 30, and the LMD0 running on the second computing device 30 can bind VID0 and VID1 to restore the memory space of the second computing device 30. The LMD0 running on the second computing device can re-manage the VLD bound to the second computing device 30. APP0 and APP1 running on the second computing device 30 can apply to LMD0 for CXL memory space.
[0259] The beneficial effects of this embodiment are as follows: after the first computing device recognizes that the second computing device is abnormal, it does not need to consume resources to recover the virtual logical device bound to the second computing device, but records the allocation information of the virtual logical device corresponding to the second computing device as the allocation information of the erroneous virtual logical device, thereby reducing resource consumption. After the second computing device is restarted, the second computing device does not need to spend time and resources to send an allocation request to the first computing device based on computing requirements, but instead sends a recovery request (a request to restore the CXL memory space bound before the abnormality) to the first computing device, thereby reducing the resource consumption of restoring the CXL memory space and improving the speed of restoring the CXL memory space. In response to the recovery request, the first computing device does not need to select an idle virtual logical device from the virtual logical devices, but obtains the identifier of the virtual logical device corresponding to the identifier of the second computing device in the allocation information of the erroneous virtual logical device, and allocates the virtual logical device corresponding to the identifier of the virtual logical device to the second computing device. The second computing device can bind the virtual logical device corresponding to the identifier of the virtual logical device allocated by the first computing device to restore the CXL memory space used by the second computing device before the abnormal restart, thereby reducing the time cost and resource cost of obtaining the identifier of the virtual logical device, thereby reducing the time cost and resource cost of restoring the CXL memory space. In addition, through the above method, the restarted second computing device can be bound to the CXL memory space bound before the exception occurs.
[0260] Figure 4a This is a flow chart of a second embodiment of a method for managing memory space provided in an embodiment of the present application. Figure 4a , the method specifically comprises the following steps:
[0261] S401: After the first computing device recognizes that an abnormality occurs in the second computing device, the first computing device transfers allocation information of the virtual logical device corresponding to the second computing device from the use linked list to the error linked list.
[0262] In this embodiment, after the first computing device recognizes that the second computing device is abnormal, the allocation information of the virtual logical device corresponding to the second computing device can be transferred from the use linked list to the error linked list. The allocation information of the virtual logical device corresponding to the second computing device includes the identifier of the virtual logical device and the identifier of the second computing device corresponding to the virtual logical device.
[0263] S402: After the second computing device is restarted, the second computing device sends a recovery request to the first computing device.
[0264] In this embodiment, after the second computing device is restarted, the second computing device may establish a communication connection with the first computing device through a communication mechanism. After successfully establishing a communication connection with the first computing device, the second computing device may send a recovery request to the first computing device. The recovery request is used to obtain the identifier of the virtual logical device corresponding to the identifier of the second computing device in the allocation information of the erroneous virtual logical device.
[0265] S403: After recognizing that the second computing device is restarted, the first computing device obtains the identifier of the virtual logical device corresponding to the identifier of the second computing device in the error linked list in response to receiving the recovery request sent by the second computing device.
[0266] In this embodiment, after recognizing that the second computing device is restarted, the first computing device may obtain the identifier of the virtual logical device corresponding to the identifier of the second computing device in the error linked list in response to a recovery request of the second computing device.
[0267] S404: The first computing device generates a virtual logical device list according to the identifier of the virtual logical device.
[0268] In this embodiment, after obtaining the identifier of the virtual logical device corresponding to the identifier of the second computing device, the first computing device may generate a virtual logical device detail table (VLD Detail Table). The virtual logical device detail table may include the relative offset address of the virtual logical device, the capacity of the virtual logical device, and the identifier of the CXL device corresponding to the virtual logical device. It should be noted that the relative offset address of the virtual logical device is the offset address of the virtual logical device relative to the start address or end address of the physical memory device. The identifier of the CXL device is information indicating the identity of the CXL device. Exemplarily, the identifier of the CXL device may be a product serial number (Serial Number, SN for short).
[0269] In one implementation, the virtual logical device list may also include the virtual logical device identifier, the virtual logical device status (error status, idle status, or usage status), and the identifier of the computing device corresponding to the virtual logical device (such as an IP address).
[0270] The following describes a process in which the first computing device generates a virtual logical device list.
[0271] Specifically, the first computing device may store a virtual logical device list (VLD Table List) and a physical logical device list (PLD Table List). Figure 4b A schematic diagram of another table involved in managing memory space provided in an embodiment of the present application, such as Figure 4bAs shown, the fabric manager mapping table (FM mapping table) stored in the first computing device includes two parts, one part is a virtual logical device list, and the other part is a physical logical device list.
[0272] Virtual logical device list: includes the virtual logical device ID, the computing device ID (such as IP address) corresponding to the virtual logical device, the relative offset address of the virtual logical device (the offset address of the virtual logical device relative to the start address or end address of the physical memory device), the capacity of the virtual logical device, the number of times the virtual logical device is allocated, the number of reads and writes of the virtual logical device, and the number and type of errors of the virtual logical device.
[0273] Physical logical device list: includes the identifier of the CXL device corresponding to each continuous CXL memory space (PLD) (such as the number of the CXL device), the identifiers of all virtual logical devices corresponding to each continuous CXL memory space, the number of continuous CXL memory spaces included in each CXL device, and the capacity of each continuous CXL memory space.
[0274] The first computing device may generate a virtual logical device list according to the virtual logical device identifier (VID), the virtual logical device list, and the physical logical device list. Figure 4b As shown, the first computing device may generate a virtual logical device detail list corresponding to the identifier of the virtual logical device based on the virtual logical device list and the physical logical device list.
[0275] It should be noted that, in the error linked list, there may be an identifier of a virtual logical device corresponding to the second computing device, or there may be multiple identifiers of virtual logical devices corresponding to the second computing device. Accordingly, the first computing device may obtain an identifier of a virtual logical device sent by the second computing device, or may obtain multiple identifiers of virtual logical devices sent by the second computing device. For each identifier of a virtual logical device, the first computing device may generate a virtual logical device mapping table corresponding to the identifier of the virtual logical device.
[0276] The following describes a process in which the first computing device obtains a list of physical and logical devices.
[0277] The first computing device may send a call request to a CXL controller of at least one CXL device in advance. In response to receiving the call request, each CXL controller may send memory device information related to all physical memory devices in the CXL device to the first computing device. The first computing device generates a physical logical device list according to the memory device information sent by the at least one CXL controller.
[0278] S405: The first computing device sends a virtual logical device list to the second computing device.
[0279] In this embodiment, after generating a virtual logical device list corresponding to the identifier of the virtual logical device, the first computing device may send a virtual logical device mapping table to the second computing device.
[0280] S406: In response to receiving the virtual logical device list sent by the first computing device, the second computing device obtains physical address information of the physical memory device corresponding to the virtual logical device according to the identifier of the CXL device corresponding to the virtual logical device in the virtual logical device list.
[0281] In this embodiment, in response to receiving the virtual logical device list sent by the first computing device, the second computing device can obtain the physical address information of the physical memory device corresponding to the virtual logical device according to the identifier of the CXL device corresponding to the virtual logical device in the virtual logical device list.
[0282] In one implementation, after obtaining the virtual logical device list, the second computing device may call a local program to obtain memory device information of at least one CXL device, wherein the memory device information includes physical address information (physical start address and capacity, or physical end address and capacity) corresponding to the identifier of the CXL device.
[0283] Specifically, based on the fact that the computing device can be connected to a CXL controller in at least one CXL device, the second computing device can send a call request to at least one CXL controller connected to the second computing device in response to receiving the virtual logical device list. Each CXL controller can send memory device information related to all physical memory devices in the CXL device (the CXL device connected to the second computing device) to the second computing device in response to receiving the call request.
[0284] It should be noted that, in the process of the operating system of the second computing device obtaining the memory device information, the CXL command line interface (CLI) module can obtain the memory device information by directly communicating with the CXL driver or indirectly communicating with the CXL driver through the SDK.
[0285] After obtaining at least one memory device information, the second computing device may determine whether there is a memory device information in the at least one memory device information, the identifier of the CXL device included in the memory device information being consistent with the identifier of the CXL device corresponding to the virtual logical device in the virtual logical device list.
[0286] If it exists, the second computing device determines that the identification verification of the CXL device corresponding to the virtual logical device has passed, and determines the physical address information of the physical memory device corresponding to the identification of the CXL device corresponding to the virtual logical device in at least one memory device information as the physical address information of the physical memory device corresponding to the virtual logical device. Through the above verification process, the second computing device can find the CXL device corresponding to the virtual logical device in the computing system, avoiding the situation where the second computing device cannot find the CXL device due to an error in the CXL device (failure or removal from the computing system, etc.), and thus cannot restore the CXL memory space normally, thereby ensuring that the second computing device can restore the CXL memory space normally.
[0287] If it does not exist, the second computing device determines that the identity check of the CXL device corresponding to the virtual logical device has failed, and the second computing device may send a binding failure message to the first computing device. In response to receiving the binding failure message, the first computing device may determine the identity of the idle virtual logical device allocated to the second computing device according to the idle linked list; wherein the idle linked list includes the identity of at least one idle virtual logical device. The first computing device may trigger the second computing device to bind the virtual logical device corresponding to the identity of the idle virtual logical device, so that the second computing device regains the CXL memory space.
[0288] In addition, when the first computing device recognizes that there are no idle virtual logical devices in the free list, it can recycle the virtual logical device corresponding to the second computing device, and transfer the allocation information of the virtual logical device corresponding to the second computing device recorded in the error list from the error list to the idle list. After the first computing device successfully recycles, it determines the identifier of the idle virtual logical device allocated to the second computing device according to the free list, and triggers the second computing device to bind the virtual logical device corresponding to the identifier of the idle virtual logical device. After the first computing device fails to recycle, it can return an allocation failure mark to the second computing device. In the above manner, the first computing device can provide idle virtual logical devices for the second computing device, avoiding the situation where the second computing device cannot bind the virtual logical device and thus cannot recover the CXL memory space.
[0289] S407: The second computing device determines the physical address information of the virtual logical device according to the relative offset address of the virtual logical device in the virtual logical device list, the capacity of the virtual logical device in the virtual logical device list, and the physical address information of the physical memory device corresponding to the virtual logical device.
[0290] In this embodiment, the second computing device can determine the physical address information of the virtual logical device based on the relative offset address of the virtual logical device in the virtual logical device detail table, the capacity of the virtual logical device in the virtual logical device detail table, and the physical address information of the physical memory device corresponding to the virtual logical device.
[0291] S408: The second computing device creates a local memory pool according to the physical address information of the virtual logical device to restore the CXL memory space of the second computing device.
[0292] In this embodiment, the second computing device may create a local memory pool after acquiring the physical address information of the virtual logical device.
[0293] It should be noted that, when the second computing device corresponds to one virtual logical device, the second computing device can create a local memory pool according to the physical address information of the virtual logical device. When the second computing device corresponds to multiple virtual logical devices, the second computing device can create a local memory pool according to the physical address information corresponding to the multiple virtual logical devices.
[0294] In one implementation, after creating the local memory pool, the second computing device may send binding success information to the first computing device. After receiving the binding success information sent by the second computing device, the first computing device may transfer the allocation information of the virtual logical device corresponding to the second computing device from the error linked list to the use linked list, so that the error linked list and the use linked list can reflect the actual situation of the current virtual logical device.
[0295] Beneficial effects of this embodiment: The first computing device can generate a virtual logical device detail list according to the identifier of the virtual logical device, and send the virtual logical device detail list to the second computing device. The second computing device can create a local memory pool according to the relevant information in the virtual logical device detail list and the physical address information of the physical memory device obtained by the second computing device according to the identifier of the CXL device. In the above manner, the bound CXL memory space used by the second computing device before the abnormal restart can be quickly restored, so as to quickly restore the business of the second computing device.
[0296] Figure 5 This is a flow chart of a third embodiment of a method for managing memory space provided in an embodiment of the present application. Figure 5 , the method specifically comprises the following steps:
[0297] S501: After the first computing device recognizes that an abnormality occurs in the second computing device, the first computing device transfers allocation information of the virtual logical device corresponding to the second computing device from the use linked list to the error linked list.
[0298] In this embodiment, after the first computing device recognizes that the second computing device is abnormal, the first computing device can transfer the allocation information of the virtual logical device corresponding to the second computing device from the use linked list to the error linked list. The allocation information of the virtual logical device corresponding to the second computing device includes the identifier of the virtual logical device and the identifier of the second computing device corresponding to the virtual logical device.
[0299] S502: After the second computing device is restarted, the second computing device sends a recovery request to the first computing device.
[0300] In this embodiment, after the second computing device is restarted, the second computing device may establish a communication connection with the first computing device through a communication mechanism. After successfully establishing a communication connection with the first computing device, the second computing device may send a recovery request to the first computing device.
[0301] S503: After recognizing that the second computing device is restarted, the first computing device sends an error linked list to the second computing device in response to receiving a recovery request sent by the second computing device.
[0302] In this embodiment, after recognizing that the second computing device is restarted, the first computing device may send the error list to the second computing device in response to a recovery request sent by the second computing device, so that the second computing device can search the error list.
[0303] S504: The second computing device determines the identifier of the virtual logical device corresponding to the identifier of the second computing device in the error linked list by searching the error linked list.
[0304] In this embodiment, after receiving the error chain list sent by the first computing device, the second computing device can determine the identifier of the virtual logical device corresponding to the identifier of the second computing device in the error chain list by searching the error chain list.
[0305] Specifically, after receiving the error chain list, the second computing device may search the error chain list.
[0306] The second computing device may determine whether the identifier of the virtual logical device corresponding to the identifier of the second computing device exists in the error chain list by searching the error chain list.
[0307] If so, the second computing device may send the identifier of the virtual logical device to the first computing device as a binding target.
[0308] If not, the second computing device may send an allocation request to the first computing device to apply to the first computing device for allocation of an idle virtual logical device. The first computing device may determine the identifier of the idle virtual logical device allocated to the second computing device according to the idle linked list in response to receiving the allocation request sent by the second computing device. The idle linked list includes the identifier of the idle virtual logical device. The first computing device triggers the second computing device to bind the virtual logical device corresponding to the identifier of the idle virtual logical device.
[0309] S505: The first computing device obtains an identifier of a virtual logical device corresponding to the second computing device, which is sent by the second computing device.
[0310] In this embodiment, the first computing device may obtain the identifier of the virtual logical device sent by the second computing device, wherein the identifier of the virtual logical device is the identifier of the virtual logical device corresponding to the second computing device.
[0311] S506: The first computing device allocates the virtual logical device corresponding to the identifier of the virtual logical device to the second computing device.
[0312] In this embodiment, the first computing device may allocate the virtual logical device corresponding to the identifier of the virtual logical device to the second computing device. The specific implementation process is the same as S304 and will not be repeated here.
[0313] S507: The second computing device binds the virtual logical device corresponding to the identifier of the virtual logical device allocated by the first computing device to restore the CXL memory space of the second computing device.
[0314] In this embodiment, the second computing device can bind the virtual logical device corresponding to the identifier of the virtual logical device allocated by the first computing device to restore the CXL memory space used by the second computing device before the abnormal restart. The specific implementation process is the same as S305 and will not be repeated here.
[0315] In this embodiment, the second computing device can autonomously search for the virtual logical device bound before the exception occurs based on the error chain list sent by the first computing device, and then send the identifier of the virtual logical device to the first computing device, so that the first computing device binds the virtual logical device to the second computing device. Through the above-mentioned "who uses who searches" method, the autonomy and credibility of binding virtual logical devices are guaranteed.
[0316] Figure 6 This is a flowchart of a fourth embodiment of a method for managing memory space provided in an embodiment of the present application. Figure 6 , the method specifically comprises the following steps:
[0317] S601: After the first computing device recognizes that an abnormality occurs in the second computing device, the first computing device transfers allocation information of the virtual logical device corresponding to the second computing device from the use linked list to the error linked list.
[0318] In this embodiment, after the first computing device recognizes that the second computing device is abnormal, the first computing device can transfer the allocation information of the virtual logical device corresponding to the second computing device from the use linked list to the error linked list. The allocation information of the virtual logical device corresponding to the second computing device includes the identifier of the virtual logical device and the identifier of the second computing device corresponding to the identifier of the virtual logical device.
[0319] S602: The first computing device determines whether the restart of the second computing device is recognized within a first preset time range.
[0320] In this embodiment, after the first computing device recognizes that the second computing device is abnormal, it can determine whether it recognizes that the second computing device is restarted within a first preset time range.
[0321] When the first computing device determines that the second computing device is restarted within the first preset time period, S603 is executed; when the first computing device determines that the second computing device is not restarted within the first preset time period, S609 can be executed.
[0322] S603: After the second computing device is restarted, the second computing device sends a recovery request to the first computing device.
[0323] In this embodiment, after the second computing device is restarted, the second computing device may establish a communication connection with the first computing device through a communication mechanism. After successfully establishing a communication connection with the first computing device, the second computing device may send a recovery request to the first computing device. The recovery request is used to obtain the identifier of the virtual logical device corresponding to the identifier of the second computing device in the allocation information of the erroneous virtual logical device.
[0324] S604: In response to receiving the recovery request sent by the second computing device, the first computing device sends the error linked list to the second computing device.
[0325] In this embodiment, when the first computing device determines that the second computing device is restarted within the first preset time period, the first computing device can establish a communication connection with the second computing device.
[0326] After establishing a communication connection with the first computing device, the second computing device may send a recovery request to the first computing device.
[0327] The first computing device may send the error linked list to the second computing device in response to the recovery request.
[0328] S605: The second computing device determines the identifier of the virtual logical device corresponding to the identifier of the second computing device in the error linked list by searching the error linked list.
[0329] In this embodiment, the second computing device can determine the identifier of the virtual logical device corresponding to the identifier of the second computing device in the error chain list by searching the error chain list. The specific implementation process is the same as S504 and will not be repeated here.
[0330] S606: The first computing device obtains the identifier of the virtual logical device sent by the second computing device and corresponding to the identifier of the second computing device.
[0331] In this embodiment, the first computing device may obtain the identifier of the virtual logical device sent by the second computing device, wherein the identifier of the virtual logical device is the identifier of the virtual logical device corresponding to the identifier of the second computing device. The specific implementation process is the same as S505 and will not be repeated here.
[0332] S607: The first computing device allocates the virtual logical device corresponding to the identifier of the virtual logical device to the second computing device.
[0333] In this embodiment, the first computing device may allocate the virtual logical device corresponding to the identifier of the virtual logical device to the second computing device. The specific implementation process is the same as S304 and will not be repeated here.
[0334] S608: The second computing device binds the virtual logical device corresponding to the identifier of the virtual logical device allocated by the first computing device to restore the CXL memory space of the second computing device.
[0335] In this embodiment, the second computing device can bind the virtual logical device corresponding to the identifier of the virtual logical device allocated by the first computing device to restore the CXL memory space used by the second computing device before the abnormal restart. The specific implementation process is the same as S305 and will not be repeated here.
[0336] S609: Recycling the virtual logical device corresponding to the second computing device.
[0337] In this embodiment, when the first computing device determines that the restart of the second computing device is not recognized within the first preset time range, the virtual logical device corresponding to the second computing device is recycled to avoid the second computing device occupying the virtual logical device for a long time, resulting in low utilization of the CXL memory space.
[0338] In one implementation, the first computing device may also invalidate (delete or set a corresponding flag) the allocation information of the virtual logical device in the error linked list to update the error linked list.
[0339] In one implementation, the first computing device may also invalidate (delete or set the corresponding flag) all data corresponding to the identifier of the virtual logical device in the virtual logical device list (VLD Table List) and the physical logical device list (PLD Table List) to update the virtual logical device list and the physical logical device list.
[0340] In this embodiment, after recognizing that the second computing device is abnormal, the first computing device can determine whether the second computing device is restarted within the first preset time range. If not, the virtual logical device corresponding to the second computing device is recycled to avoid the situation where the second computing device occupies the virtual logical device for a long time, thereby improving the utilization rate of the virtual logical device (CXL memory space). If so, in response to the recovery request of the second computing device, the error list is sent to the second computing device, so that the second computing device can search the error list to determine the identifier of the virtual logical device previously bound to the second computing device. After receiving the identifier of the virtual logical device sent by the second computing device, the first computing device assigns the virtual logical device corresponding to the identifier of the virtual logical device to the second computing device. The second computing device binds the virtual logical device corresponding to the identifier of the virtual logical device assigned by the first computing device to restore the CXL memory space used before the abnormal restart of the second computing device.
[0341] The following describes the process of managing memory space in a scenario where the first computing device runs a structure manager and the second computing device runs a local CXL space management process through method embodiment 5.
[0342] Figure 7 This is a flowchart of a fifth embodiment of a method for managing memory space provided in an embodiment of the present application. Figure 7 , the method specifically comprises the following steps:
[0343] S701: After the first computing device recognizes that the communication with the second computing device has timed out, the first computing device transfers the allocation information of the virtual logical device corresponding to the second computing device from the use linked list to the error linked list.
[0344] In this embodiment, the structure manager is running on the first computing device, and the structure manager is not running on the second computing device. A local CXL space management process is running on the second computing device.
[0345] When an abnormality occurs in the second computing device, the first computing device may sense a communication timeout of the second computing device through a communication mechanism (including but not limited to a heartbeat mechanism).
[0346] The first computing device running the fabric manager can transfer the allocation information of the virtual logical device corresponding to the second computing device from the use linked list to the error linked list after identifying that the communication with the second computing device has timed out by using the communication mechanism. The allocation information of the virtual logical device corresponding to the second computing device includes the identifier of the virtual logical device and the identifier of the second computing device corresponding to the virtual logical device.
[0347] S702: The first computing device determines whether the restart of the second computing device is recognized within a first preset time range.
[0348] In this embodiment, after the first computing device recognizes that the second computing device is abnormal, it can determine whether it recognizes that the second computing device is restarted within a first preset time range.
[0349] When the first computing device determines that the second computing device is restarted within the first preset time period, S703 is executed; when the first computing device determines that the second computing device is not restarted within the first preset time period, S707 can be executed.
[0350] S703: After the second computing device is restarted, the second computing device sends a recovery request to the first computing device.
[0351] In this embodiment, after the second computing device is restarted, the second computing device may establish a communication connection with the first computing device through a communication mechanism. After successfully establishing a communication connection with the first computing device, the second computing device may send a recovery request to the first computing device. The recovery request is used to obtain the identifier of the virtual logical device corresponding to the identifier of the second computing device in the allocation information of the erroneous virtual logical device.
[0352] S704: In response to receiving the recovery request sent by the second computing device, the first computing device sends the error linked list to the second computing device.
[0353] In this embodiment, when the first computing device determines that the second computing device is restarted within the first preset time period, the first computing device can establish a communication connection with the second computing device.
[0354] After successfully establishing a communication connection with the first computing device, the second computing device may send a recovery request to the first computing device.
[0355] The first computing device may send the error linked list to the second computing device in response to the recovery request.
[0356] In addition, it should be noted that, when the first computing device determines that the second computing device is not restarted within the first preset time period, it can determine whether the local CXL space management process on the second computing device is restarted within the first preset time period. When the first computing device determines that the local CXL space management process on the second computing device is restarted within the first preset time period, it can also establish a communication connection with the second computing device, and after successfully establishing the communication connection, send the error linked list to the second computing device based on the recovery request sent by the second computing device.
[0357] S705: The second computing device determines the identifier of the virtual logical device corresponding to the identifier of the second computing device in the error linked list by searching the error linked list.
[0358] In this embodiment, the second computing device can determine the identifier of the virtual logical device corresponding to the identifier of the second computing device in the error chain list by searching the error chain list. The specific implementation process is the same as S504 and will not be repeated here.
[0359] S706: The first computing device obtains the identifier of the virtual logical device sent by the second computing device and corresponding to the identifier of the second computing device.
[0360] In this embodiment, the first computing device may obtain the identifier of the virtual logical device sent by the second computing device, wherein the identifier of the virtual logical device is the identifier of the virtual logical device corresponding to the identifier of the second computing device. The specific implementation process is the same as S505 and will not be repeated here.
[0361] S707: The first computing device allocates the virtual logical device corresponding to the identifier of the virtual logical device to the second computing device.
[0362] In this embodiment, the first computing device may allocate the virtual logical device corresponding to the identifier of the virtual logical device to the second computing device. The specific implementation process is the same as S304 and will not be repeated here.
[0363] S708: The second computing device binds the virtual logical device corresponding to the identifier of the virtual logical device allocated by the first computing device to restore the CXL memory space of the second computing device.
[0364] In this embodiment, the second computing device can bind the virtual logical device corresponding to the identifier of the virtual logical device allocated by the first computing device to restore the CXL memory space used by the second computing device before the abnormal restart. The specific implementation process is the same as S305 and will not be repeated here.
[0365] S709: Recycling the virtual logical device corresponding to the second computing device.
[0366] In this embodiment, when the first computing device determines that the restart of the second computing device is not recognized within the first preset time range, the virtual logical device corresponding to the second computing device can be recycled to avoid the second computing device occupying the virtual logical device for a long time, resulting in low utilization of the CXL memory space.
[0367] Beneficial effects of this embodiment: In a scenario where the first computing device runs a structure manager and the second computing device runs a local CXL space management process, the embodiment of the present application can use an error linked list to quickly obtain the identifier of the virtual logical device, and then quickly restore the virtual logical device (CXL memory space) bound to the second computing device before the exception, thereby reducing the time cost and resource cost of obtaining the identifier of the virtual logical device, and thereby reducing the time cost and resource cost of restoring the CXL memory space.
[0368] The following describes the process of managing memory space in a scenario where the second computing device runs a structure manager and the first computing device runs a local CXL space management process through method embodiment 6.
[0369] Figure 8 This is a flowchart of a sixth embodiment of a method for managing memory space provided in an embodiment of the present application. Figure 8 , the method specifically comprises the following steps:
[0370] S801: The first computing device sends an allocation request to the second computing device.
[0371] In this embodiment, the structure manager is running on the second computing device, and the structure manager is not running on the first computing device. A local CXL space management process is running on the second computing device.
[0372] When the first computing device needs to apply for CXL memory space, it may send an allocation request to the second computing device, so that the second computing device triggers the first computing device to bind the virtual logical device corresponding to the identifier of the idle virtual logical device.
[0373] S802: When the first computing device does not receive a response message sent by the second computing device within a second preset time period, it is determined that an abnormality occurs in the second computing device, and a wake-up operation is performed on the backup structure manager in the first computing device.
[0374] In this embodiment, the first computing device may start timing when sending an allocation request to the second computing device, and determine whether a response message sent by the second computing device is received within a second preset time range. For example, the response message may be a virtual logical device mapping table corresponding to an identifier of an idle virtual logical device.
[0375] When the first computing device determines that the response information sent by the second computing device is received within the second preset time range, it determines that there is no abnormality in the second computing device.
[0376] When the first computing device determines that no response information sent by the second computing device is received within the second preset time range, it determines that the second computing device is abnormal. The first computing device can perform a wake-up operation on the backup structure manager in the first computing device.
[0377] S803: The first computing device broadcasts reminder information.
[0378] In this embodiment, after waking up the backup structure manager, the first computing device can broadcast reminder information to remind other computing devices (the second computing device and another second computing device) in the computing system except the first computing device, where the first computing device is a computing device running the structure manager.
[0379] S804: The first computing device transfers the allocation information of the virtual logical device corresponding to the second computing device from the use linked list to the error linked list.
[0380] In this embodiment, the first computing device running the fabric manager may transfer the allocation information of the virtual logical device corresponding to the second computing device from the use linked list to the error linked list.
[0381] S805: The first computing device determines whether the restart of the second computing device is recognized within the first preset time range.
[0382] In this embodiment, after the first computing device recognizes that the second computing device is abnormal, it can determine whether it recognizes that the second computing device is restarted within a first preset time range.
[0383] When the first computing device determines that the second computing device is restarted within the first preset time period, S806 is executed; when the first computing device determines that the second computing device is not restarted within the first preset time period, S810 can be executed.
[0384] S806: After the second computing device is restarted, the second computing device sends a recovery request to the first computing device.
[0385] In this embodiment, after the second computing device is restarted, the second computing device may establish a communication connection with the first computing device through a communication mechanism. After successfully establishing a communication connection with the first computing device, the second computing device may send a recovery request to the first computing device.
[0386] S807: In response to receiving the recovery request sent by the second computing device, the first computing device sends the error linked list to the second computing device.
[0387] In this embodiment, when the first computing device determines that the second computing device is restarted within the first preset time period, the first computing device can establish a communication connection with the second computing device.
[0388] After establishing a communication connection with the first computing device, the second computing device may send a recovery request to the first computing device.
[0389] The first computing device may send the error linked list to the second computing device in response to the recovery request.
[0390] S808: The second computing device determines the identifier of the virtual logical device corresponding to the identifier of the second computing device in the error linked list by searching the error linked list.
[0391] In this embodiment, the second computing device may determine the identifier of the virtual logical device corresponding to the identifier of the second computing device in the error linked list by searching the error linked list.
[0392] S809: The first computing device obtains the identifier of the virtual logical device sent by the second computing device and corresponding to the identifier of the second computing device.
[0393] In this embodiment, the first computing device may obtain the identifier of the virtual logical device sent by the second computing device, wherein the identifier of the virtual logical device is the identifier of the virtual logical device corresponding to the identifier of the second computing device. The specific implementation process is the same as S505 and will not be repeated here.
[0394] S810: The first computing device allocates the virtual logical device corresponding to the identifier of the virtual logical device to the second computing device.
[0395] In this embodiment, the first computing device may allocate the virtual logical device corresponding to the identifier of the virtual logical device to the second computing device. The specific implementation process is the same as S304 and will not be repeated here.
[0396] S811: The second computing device binds the virtual logical device corresponding to the identifier of the virtual logical device allocated by the first computing device to restore the CXL memory space of the second computing device.
[0397] In this embodiment, the second computing device can bind the virtual logical device corresponding to the identifier of the virtual logical device allocated by the first computing device to restore the CXL memory space used by the second computing device before the abnormal restart. The specific implementation process is the same as S305 and will not be repeated here.
[0398] S812: Recycling the virtual logical device corresponding to the second computing device.
[0399] In this embodiment, when the first computing device determines that the restart of the second computing device is not recognized within the first preset time period, the virtual logical device corresponding to the second computing device may be recycled.
[0400] Beneficial effects of this embodiment: In the scenario where the second computing device runs the structure manager and the first computing device runs the local CXL space management process, the first computing device can wake up the backup structure manager after identifying that the second computing device is abnormal, and transfer the identifier of the virtual logical device corresponding to the identifier of the second computing device from the use list to the error list. The first computing device can use the error list to quickly obtain the identifier of the virtual logical device, and then quickly make the second computing device bind the virtual logical device (CXL memory space) bound before the abnormality occurs, reducing the time cost and resource cost of obtaining the identifier of the virtual logical device, and then reducing the time cost and resource cost of restoring the CXL memory space. In addition, by setting a backup structure manager, in the case of a failure of the computing device responsible for managing the CXL memory space, a non-faulty computing device in the other computing devices in the computing system can also undertake the affairs of managing the CXL memory space, so as to ensure that the business can be carried out continuously and stably, avoid the situation where a computing device fails and the entire computing system is paralyzed, and improve the operation stability of the computing system.
[0401] The following is an embodiment of the device of the present application, which can be used to execute the embodiment of the method of the present application. For details not disclosed in the embodiment of the device of the present application, please refer to the embodiment of the method of the present application.
[0402] Fig. 9 This is a schematic diagram of the structure of the first computing device provided in the embodiment of the present application. Fig. 9 As shown, the first computing device 90 includes a processing module 91 and a sending module 92.
[0403] The processing module 91 is used to record the allocation information of the virtual logical device corresponding to the second computing device as the allocation information of the erroneous virtual logical device after identifying that the second computing device is abnormal; wherein the virtual logical device is part or all of the CXL memory space of the physical memory device; the allocation information of the virtual logical device corresponding to the second computing device includes an identifier of the virtual logical device and an identifier of the second computing device corresponding to the virtual logical device;
[0404] The processing module 91 is further configured to, after recognizing that the second computing device is restarted, obtain, in response to receiving a recovery request sent by the second computing device, an identifier of the virtual logical device corresponding to the identifier of the second computing device in the allocation information of the erroneous virtual logical device;
[0405] The sending module 92 is configured to allocate the virtual logical device corresponding to the identifier of the virtual logical device to the second computing device.
[0406] The first computing device provided in the embodiment of the present application can execute the technical solution shown in the above method embodiment, and its implementation principle and beneficial effects are similar, which will not be repeated here.
[0407] In one implementation, the processing module 91 is specifically configured to:
[0408] Transferring allocation information of the virtual logical device corresponding to the second computing device from the use linked list to the error linked list;
[0409] The identifier of the virtual logical device corresponding to the identifier of the second computing device in the error linked list is obtained.
[0410] The first computing device provided in this implementation can execute the technical solution shown in the above method embodiment, and its implementation principle and beneficial effects are similar, which will not be repeated here.
[0411] In one implementation, the sending module 92 is specifically configured to:
[0412] Generate a virtual logical device detail list according to the virtual logical device identifier, the virtual logical device detail list includes a relative offset address of the virtual logical device, a capacity of the virtual logical device, and an identifier of a CXL device corresponding to the virtual logical device;
[0413] The virtual logical device list is sent to the second computing device.
[0414] The first computing device provided in this implementation can execute the technical solution shown in the above method embodiment, and its implementation principle and beneficial effects are similar, which will not be repeated here.
[0415] In one implementation,
[0416] The processing module 91 is further configured to determine, in response to receiving the binding failure information sent by the second computing device, an identifier of an idle virtual logical device allocated to the second computing device according to the idle linked list; wherein the idle linked list includes an identifier of at least one idle virtual logical device;
[0417] The sending module 92 is further configured to allocate the virtual logical device corresponding to the identifier of the idle virtual logical device to the second computing device.
[0418] The first computing device provided in this implementation can execute the technical solution shown in the above method embodiment, and its implementation principle and beneficial effects are similar, which will not be repeated here.
[0419] In one implementation, the processing module 91 is further configured to:
[0420] In response to receiving the binding success information sent by the second computing device, the allocation information of the virtual logical device corresponding to the second computing device is transferred from the error linked list to the use linked list.
[0421] The first computing device provided in this implementation can execute the technical solution shown in the above method embodiment, and its implementation principle and beneficial effects are similar, which will not be repeated here.
[0422] In one implementation, the processing module 91 is specifically configured to:
[0423] By searching the error chain list, the identifier of the virtual logical device corresponding to the identifier of the second computing device in the error chain list is determined.
[0424] The first computing device provided in this implementation can execute the technical solution shown in the above method embodiment, and its implementation principle and beneficial effects are similar, which will not be repeated here.
[0425] In one implementation, the processing module 91 is specifically configured to:
[0426] The error chain list is sent to the second computing device; the error chain list is used for the second computing device to determine the identifier of the virtual logical device corresponding to the identifier of the second computing device in the error chain list by searching the error chain list;
[0427] An identifier of a virtual logical device corresponding to the identifier of the second computing device and sent by the second computing device is obtained.
[0428] The first computing device provided in this implementation can execute the technical solution shown in the above method embodiment, and its implementation principle and beneficial effects are similar, which will not be repeated here.
[0429] In one implementation, the processing module 91 is specifically configured to:
[0430] Determining whether a restart of the second computing device is recognized within a first preset time period;
[0431] When it is determined that the second computing device is restarted within the first preset time period, in response to receiving a recovery request sent by the second computing device, an error list is sent to the second computing device.
[0432] The first computing device provided in this implementation can execute the technical solution shown in the above method embodiment, and its implementation principle and beneficial effects are similar, which will not be repeated here.
[0433] In one implementation, the processing module 91 is further configured to:
[0434] When it is determined that the restart of the second computing device is not identified within the first preset time period, the virtual logical device corresponding to the second computing device is recycled.
[0435] The first computing device provided in this implementation can execute the technical solution shown in the above method embodiment, and its implementation principle and beneficial effects are similar, which will not be repeated here.
[0436] In one implementation,
[0437] The processing module 91 is further configured to determine, in response to receiving an allocation request sent by the second computing device, an identifier of an idle virtual logical device allocated to the second computing device according to the idle linked list; wherein the idle linked list includes an identifier of at least one idle virtual logical device;
[0438] The sending module 92 is further configured to allocate the virtual logical device corresponding to the identifier of the idle virtual logical device to the second computing device.
[0439] The first computing device provided in this implementation can execute the technical solution shown in the above method embodiment, and its implementation principle and beneficial effects are similar, which will not be repeated here.
[0440] In one implementation, the processing module 91 is specifically configured to:
[0441] After identifying that the second computing device is abnormal, marking the state of the allocation information of the virtual logical device corresponding to the second computing device in the structure manager mapping table from the use state to the error state;
[0442] The identifier of the virtual logical device corresponding to the identifier of the second computing device in the allocation information of the virtual logical device in the error state in the fabric manager mapping table is obtained.
[0443] The first computing device provided in this implementation can execute the technical solution shown in the above method embodiment, and its implementation principle and beneficial effects are similar, which will not be repeated here.
[0444] Fig.10 This is a schematic diagram of the structure of the second computing device provided in the embodiment of the present application. Fig.10 As shown, the second computing device 100 includes a sending module 1001 and a processing module 1002 .
[0445] The sending module 1001 is used to send a recovery request to the first computing device after the second computing device is restarted, and the recovery request is used to obtain the identifier of the virtual logical device corresponding to the identifier of the second computing device in the allocation information of the erroneous virtual logical device;
[0446] The processing module 1002 is configured to bind the virtual logical device allocated by the first computing device to restore the CXL memory space of the second computing device.
[0447] The first computing device provided in the embodiment of the present application can execute the technical solution shown in the above method embodiment, and its implementation principle and beneficial effects are similar, which will not be repeated here.
[0448] In one implementation, the processing module 1002 is specifically configured to:
[0449] In response to receiving the virtual logical device list sent by the first computing device, obtaining physical address information of a physical memory device corresponding to the virtual logical device according to an identifier of a CXL device corresponding to the virtual logical device in the virtual logical device list; wherein the virtual logical device list is generated by the first computing device according to the identifier of the virtual logical device;
[0450] Determine the physical address information of the virtual logical device according to the relative offset address of the virtual logical device in the virtual logical device list, the capacity of the virtual logical device in the virtual logical device list, and the physical address information of the physical memory device corresponding to the virtual logical device;
[0451] A local memory pool is created according to the physical address information of the virtual logical device to restore the CXL memory space of the second computing device.
[0452] The first computing device provided in this implementation can execute the technical solution shown in the above method embodiment, and its implementation principle and beneficial effects are similar, which will not be repeated here.
[0453] In one implementation, the processing module 1002 is specifically configured to:
[0454] sending a call request to a CXL controller of at least one CXL device;
[0455] Acquire memory device information sent by a CXL controller of at least one CXL device based on a call request; the memory device information includes an identifier of the CXL device and physical address information of a physical memory device;
[0456] Determine whether, in at least one piece of memory device information, there is an identifier of a CXL device included in the memory device information that is consistent with an identifier of a CXL device corresponding to the virtual logical device;
[0457] If so, it is determined that the identifier of the CXL device corresponding to the virtual logical device has been verified, and the physical address information of the physical memory device corresponding to the identifier of the CXL device corresponding to the virtual logical device in the at least one memory device information is determined as the physical address information of the physical memory device corresponding to the virtual logical device.
[0458] The first computing device provided in this implementation can execute the technical solution shown in the above method embodiment, and its implementation principle and beneficial effects are similar, which will not be repeated here.
[0459] In one implementation, the processing module 1002 is further configured to:
[0460] If not, determining that the identity check of the CXL device corresponding to the virtual logical device fails, and sending a binding failure message to the first computing device;
[0461] The virtual logical device corresponding to the identifier of the idle virtual logical device allocated by the first computing device is bound.
[0462] The first computing device provided in this implementation can execute the technical solution shown in the above method embodiment, and its implementation principle and beneficial effects are similar, which will not be repeated here.
[0463] In one implementation, the sending module 1001 is further configured to:
[0464] After the local memory pool is created, a binding success message is sent to the first computing device.
[0465] The first computing device provided in this implementation can execute the technical solution shown in the above method embodiment, and its implementation principle and beneficial effects are similar, which will not be repeated here.
[0466] In one implementation,
[0467] The processing module 1002 is further used to obtain an error chain list sent by the first computing device;
[0468] The processing module 1002 is further configured to determine the identifier of the virtual logical device corresponding to the identifier of the second computing device in the error linked list by searching the error linked list;
[0469] The sending module 1001 is further configured to send the identifier of the virtual logical device corresponding to the identifier of the second computing device to the first computing device.
[0470] The first computing device provided in this implementation can execute the technical solution shown in the above method embodiment, and its implementation principle and beneficial effects are similar, which will not be repeated here.
[0471] In one implementation, the processing module 1002 is further configured to:
[0472] By searching the error linked list, determining that the identifier of the virtual logical device corresponding to the identifier of the second computing device does not exist in the error linked list, and sending an allocation request to the first computing device;
[0473] The virtual logical device corresponding to the identifier of the idle virtual logical device allocated by the first computing device is bound.
[0474] The first computing device provided in this implementation can execute the technical solution shown in the above method embodiment, and its implementation principle and beneficial effects are similar, which will not be repeated here.
[0475] An embodiment of the present application also provides a computing system, including: a first computing device and at least one second computing device.
[0476] The first computing device is used to execute the method for managing memory space of the first aspect; and the second computing device is used to execute the method for managing memory space of the second aspect.
[0477] The first computing device and the second computing device in the computing system provided in the embodiment of the present application can execute the technical solution shown in the above method embodiment, and the implementation principles and beneficial effects are similar, which will not be repeated here.
[0478] Fig.11 This is a schematic diagram of the structure of a computing device provided in an embodiment of the present application. Fig.11 As shown, the computing device 110 includes: a processor 1101 and a memory 1102; wherein the processor 1101 is communicatively connected with the memory 1102, and the memory 1102 is used to store computer-executable instructions; the processor 1101 is configured to execute the technical solution in the aforementioned method embodiment by executing the computer-executable instructions stored in the memory 1102.
[0479] Optionally, the memory 1102 may be independent or integrated with the processor 1101. Optionally, when the memory 1102 is a device independent of the processor 1101, the server 110 may further include: a bus for connecting the above devices.
[0480] The processor is used to execute the technical solution in the aforementioned method embodiment, and its implementation principle and technical effect are similar and will not be repeated here.
[0481] An embodiment of the present application also provides a computer-readable storage medium, in which computer-executable instructions are stored. When the computer-executable instructions are executed by a processor, they are used to implement the technical solution provided by the aforementioned method embodiment.
[0482] An embodiment of the present application also provides a computer program product, including a computer program, which is used to implement the technical solution provided by the aforementioned method embodiment when executed by a processor.
[0483] Those skilled in the art can understand that all or part of the steps of implementing the above-mentioned method embodiments can be completed by hardware related to program instructions. The aforementioned program can be stored in a computer-readable storage medium. When the program is executed, the steps of the above-mentioned method embodiments are executed; and the aforementioned storage medium includes: volatile memory, non-volatile memory and other media that can store program codes.
[0484] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit it. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or replace some or all of the technical features therein with equivalents. However, these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present application.
Claims
1. A method for managing memory space, characterized in that: Applied to a first computing device, the method includes: After identifying that the second computing device is abnormal, the allocation information of the virtual logical device corresponding to the second computing device is recorded as the allocation information of the erroneous virtual logical device; wherein the virtual logical device is part or all of the CXL memory space of the physical memory device; the allocation information of the virtual logical device corresponding to the second computing device includes an identifier of the virtual logical device and an identifier of the second computing device corresponding to the virtual logical device; After recognizing that the second computing device is restarted, in response to receiving a recovery request sent by the second computing device, obtaining an identifier of a virtual logical device corresponding to the identifier of the second computing device in the allocation information of the erroneous virtual logical device; Allocate the virtual logical device corresponding to the identifier of the virtual logical device to the second computing device.
2. The method for managing memory space according to claim 1, characterized in that: The step of recording the allocation information of the virtual logical device corresponding to the second computing device as the allocation information of the erroneous virtual logical device includes: Transferring allocation information of the virtual logical device corresponding to the second computing device from the use linked list to the error linked list; Then, in the allocation information of the virtual logical device that has been acquired in error, the identifier of the virtual logical device corresponding to the identifier of the second computing device includes: Obtain an identifier of a virtual logical device in the error linked list that corresponds to the identifier of the second computing device.
3. The method for managing memory space according to claim 2, characterized in that: The allocating the virtual logical device corresponding to the identifier of the virtual logical device to the second computing device includes: Generate a virtual logical device detail list according to the identifier of the virtual logical device, wherein the virtual logical device detail list includes a relative offset address of the virtual logical device, a capacity of the virtual logical device, and an identifier of a CXL device corresponding to the virtual logical device; The virtual logical device list is sent to the second computing device.
4. The method for managing memory space according to claim 2, characterized in that: Also includes: In response to receiving the binding failure information sent by the second computing device, determining, according to the free linked list, an identifier of an idle virtual logical device allocated to the second computing device; wherein the free linked list includes an identifier of at least one idle virtual logical device; Allocate the virtual logical device corresponding to the identifier of the idle virtual logical device to the second computing device.
5. The method for managing memory space according to any one of claims 2 to 4, characterized in that: The obtaining the identifier of the virtual logical device corresponding to the identifier of the second computing device in the error linked list includes: The error chain list is sent to the second computing device; the error chain list is used for the second computing device to determine the identifier of the virtual logical device corresponding to the identifier of the second computing device in the error chain list by searching the error chain list; Obtain an identifier of a virtual logical device sent by the second computing device and corresponding to the identifier of the second computing device.
6. The method for managing memory space according to claim 5, characterized in that: The sending the error linked list to the second computing device comprises: Determine whether the second computing device is recognized to be restarted within a first preset time range; When it is determined that the second computing device is restarted within the first preset time period, in response to receiving a recovery request sent by the second computing device, the error linked list is sent to the second computing device.
7. The method for managing memory space according to claim 6, characterized in that: Also includes: When it is determined that the restart of the second computing device is not identified within the first preset time period, the virtual logical device corresponding to the second computing device is recycled.
8. The method for managing memory space according to claim 1, characterized in that: The step of recording the allocation information of the virtual logical device corresponding to the second computing device as the allocation information of the erroneous virtual logical device includes: After identifying that the second computing device is abnormal, marking the state in the allocation information of the virtual logical device corresponding to the second computing device in the structure manager mapping table from the use state to the error state; Then, in the step of obtaining allocation information of all erroneous virtual logical devices, the identifier of the virtual logical device corresponding to the identifier of the second computing device includes: The identifier of the virtual logical device corresponding to the identifier of the second computing device in the allocation information of the virtual logical device in the error state in the fabric manager mapping table is obtained.
9. A method for managing memory space, characterized in that: Applied to a second computing device, the method includes: After the second computing device is restarted, sending a recovery request to the first computing device, the recovery request being used to obtain an identifier of a virtual logical device corresponding to the identifier of the second computing device in the allocation information of the erroneous virtual logical device; Bind the virtual logical device corresponding to the identifier of the virtual logical device allocated by the first computing device to restore the CXL memory space of the second computing device.
10. The method for managing memory space according to claim 9, characterized in that: The step of binding the virtual logical device corresponding to the identifier of the virtual logical device allocated by the first computing device to restore the CXL memory space of the second computing device includes: In response to receiving the virtual logical device list sent by the first computing device, obtaining physical address information of a physical memory device corresponding to the virtual logical device according to an identifier of a CXL device corresponding to the virtual logical device in the virtual logical device list; wherein the virtual logical device list is generated by the first computing device according to the identifier of the virtual logical device; Determine the physical address information of the virtual logical device according to the relative offset address of the virtual logical device in the virtual logical device list, the capacity of the virtual logical device in the virtual logical device list, and the physical address information of the physical memory device corresponding to the virtual logical device; A local memory pool is created according to the physical address information of the virtual logical device to restore the CXL memory space of the second computing device.