Application migration method, computing device and computing system

Through the memory sharing capability of CXL memory devices, the memory image of the application is directly migrated between the source computing device and the target computing device, solving the problem of low migration efficiency caused by multiple copies in the prior art, and achieving efficient application migration.

CN120335957APending Publication Date: 2025-07-18XFUSION DIGITAL TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510400263.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-03-31
Publication Date
2025-07-18

AI Technical Summary

Technical Problem

In the prior art, when the application program is hotly migrated, the service interruption time is too long due to multiple copies of the memory image file, which affects the migration efficiency.

Method used

By using the memory sharing capability of the Quick Computation Link (CXL) memory device, the memory image to be migrated is directly stored in the target memory area of the CXL memory device, and the memory image is read from the target memory area to avoid multiple copy operations.

Benefits of technology

Reduces application migration time and read and write operations during migration, improves migration efficiency, and ensures efficient business operation.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120335957A_ABST
    Figure CN120335957A_ABST
Patent Text Reader

Abstract

The invention relates to the field of computing, and discloses an application program migration method, computing equipment and a computing system, the application program migration method is used for first computing equipment, the first computing equipment is connected with fast computing link CXL memory equipment, the CXL memory equipment is connected with second computing equipment, and the method comprises the steps that a memory mirror image of a to-be-migrated application is acquired; determining a target memory area based on the data size of the memory mirror image; wherein the target memory area is a storage area of the CXL memory device; the target memory area is used for storing a memory mirror image; writing the memory mirror image into the target memory area; sending identification information of the target memory area to the second computing device; the second computing device reads the memory mirror image from the target memory area according to the identification information of the target memory area, and the to-be-migrated application is recovered based on the memory mirror image. According to the application, the migration efficiency of the application program can be improved, and efficient operation of businesses is ensured.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of computing, and in particular, to a method for migrating an application program, a computing device, and a computing system. Background Art

[0002] Live migration can migrate a running application program from one physical server to other physical servers, so as to achieve purposes such as load balancing, hardware maintenance, and energy management. In related technologies, live migration tools (such as CRIU (checkpoint / restore in userspace), CRIUPlus, etc.) are usually used to perform live migration on application programs.

[0003] When CRIU in the source server transmits the memory image file to the destination server through the network, multiple copies of the memory image file are required, and the above-mentioned multiple copies take a long time, resulting in too long an interruption time for the service. Summary of the Invention

[0004] Embodiments of this application provide a method for migrating an application program, a computing device, and a computing system, which can avoid multiple copies during the migration process of memory data, so as to improve the migration efficiency of the application program and ensure the efficient operation of the service.

[0005] In a first aspect, an embodiment of this application provides a method for migrating an application program, which is applied to a first computing device. The first computing device is connected to a Compute Express Link (CXL) memory device, and the CXL memory device is connected to a second computing device; the method includes: obtaining a memory image of the application to be migrated; determining a target memory area based on the data size of the memory image; where the target memory area is a storage area of the CXL memory device; the target memory area is used to store the memory image; writing the memory image into the target memory area; sending identification information of the target memory area to the second computing device; so that the second computing device reads the memory image from the target memory area according to the identification information of the target memory area, and restores the application to be migrated based on the memory image.

[0006] Based on this implementation, when migrating the application to be migrated in the first computing device to the second computing device, it is only necessary to store the memory image of the application to be migrated in the target memory area of the CXL memory device through the first computing device, and read the memory image from the target memory area in the CXL memory device through the second computing device. Based on the memory sharing ability of the CXL memory device, different computing devices can access the same memory area. Therefore, multiple copies are not required when migrating the application to be migrated, which can reduce the migration duration of the application program and the read and write operations during the migration process, thereby improving the migration efficiency of the application program and ensuring the efficient operation of the service.

[0007] In a possible implementation, determining the target memory area based on the data size of the above memory image includes: sending a memory allocation request; wherein, the memory allocation request is used to indicate allocating the target memory area from the above CXL memory device; the size of the target memory area is equal to the data size of the memory image; determining the target memory area based on the response to the memory allocation request; wherein, the response to the memory allocation request includes the identification information of the target memory area.

[0008] Based on this implementation, the memory management module in the first computing device or the second computing device can manage and allocate the memory area in the CXL memory device, so as to determine a suitable target memory area based on the size of the memory data of the application to be migrated, so that the first computing device can successfully write the memory image into the memory area of the CXL memory device.

[0009] In another possible implementation, the response to the memory allocation request further includes the target address of the target memory area; writing the memory image into the target memory area includes: dividing the memory image into multiple data blocks; writing the multiple data blocks of the memory image into the target memory area based on the target address of the target memory area to reduce memory bandwidth consumption.

[0010] Based on this implementation, the method of writing multiple memory image blocks into the target memory area in sequence can effectively avoid the high memory bandwidth consumption that may be brought about when loading the entire memory image at one time, reduce the instantaneous pressure on the memory bandwidth, and make the migration process more stable. Moreover, it can make the writing operation of each memory block relatively independent. Even if a data block writing fails, it will not affect the migration and recovery of other data blocks, which is convenient for fault tolerance processing; if a writing error is encountered, only the data of this block needs to be retried, rather than rewriting the entire memory image.

[0011] In yet another possible implementation, the method further includes: sending a first memory release request; wherein, the first memory release request is used to indicate releasing the occupancy of the target memory area by the first computing device.

[0012] Based on this implementation, the memory management module can be used to manage the memory area in the CXL memory device. After the first computing device finishes writing the memory image and the second computing device finishes reading the memory image, the first computing device and the second computing device can apply to the memory management module to release the target memory area, so as to efficiently implement the release process of the target memory area.

[0013] In yet another possible implementation, the above method further includes: sending a deletion request; wherein, the deletion request is used to indicate deleting the memory image in the target memory area and returning the usage permission of the target memory area.

[0014] Based on this implementation, the memory area in the CXL memory device can be managed through the memory management module. After the memory management module finishes releasing the target memory area, the first computing device can apply to the memory management module to delete the target memory area, so as to efficiently implement the deletion process of the target memory area.

[0015] In a second aspect, an embodiment of the present application provides a method for migrating an application program, which is applied to a second computing device. The second computing device is connected to a Compute Express Link (CXL) memory device, and the CXL memory device is connected to a first computing device; the method includes: receiving the identification information of the target memory area sent by the first computing device; wherein, the target memory area is used to store the memory image of the application to be migrated; obtaining the target address of the target memory area based on the identification information of the target memory area; reading the memory image from the target memory area based on the target address of the target memory area; restoring the application to be migrated based on the memory image.

[0016] Based on this implementation, when migrating the application to be migrated in the first computing device to the second computing device, it is only necessary to store the memory image of the application to be migrated in the target memory area in the CXL memory device through the first computing device, and read the memory image from the target memory area in the CXL memory device through the second computing device. Based on the memory sharing ability of the CXL memory device, different computing devices can access the same CXL memory device. Therefore, when migrating the application to be migrated, there is no need for multiple copies, which can reduce the migration duration of the application program and the read and write operations during the migration process, thereby improving the migration efficiency of the application program and ensuring the efficient operation of the service.

[0017] In yet another possible implementation, obtaining the target address of the target memory area based on the identification information of the target memory area includes: sending a memory address acquisition request; wherein, the memory address acquisition request is used to indicate acquiring the target address of the target memory area corresponding to the identification information of the target memory area; determining the target address of the target memory area based on the response to the memory address acquisition request.

[0018] Based on this implementation manner, when the second computing device needs to read the memory image written by the first computing device in the CXL memory device, it only needs to obtain the target address corresponding to the identification information based on the identification information of the target memory area sent by the first computing device through the memory management device, and read the memory image in the target memory area based on the target address, thereby improving the migration efficiency of the application program.

[0019] In another possible implementation manner, the above method further includes: sending a second memory release request; wherein, the second memory release request is used to indicate the release of the occupancy of the target memory area by the second computing device.

[0020] Based on this implementation manner, the management of the memory area in the CXL memory device can be implemented through the memory management module. After the first computing device completes writing the memory image and the second computing device completes reading the memory image, the first computing device and the second computing device can apply to the memory management module to release the target memory area, thereby enabling efficient release processing of the target memory area.

[0021] In a third aspect, an embodiment of the present application further provides a migration device for an application program, configured in a first computing device, the first computing device is connected to a Compute Express Link (CXL) memory device, and the CXL memory device is connected to a second computing device; the device includes: a first acquisition module, configured to acquire a memory image of an application to be migrated; a determination module, configured to determine a target memory area based on the data size of the memory image; wherein, the target memory area is a storage area of the CXL memory device; the target memory area is used to store the memory image; a writing module, configured to write the memory image into the target memory area; a first sending module, configured to send the identification information of the target memory area to the second computing device; so that the second computing device reads the memory image from the target memory area according to the identification information of the target memory area, and restores the application to be migrated based on the memory image.

[0022] In a possible implementation manner, the determination module is specifically configured to: send a memory allocation request; wherein, the memory allocation request is used to indicate the allocation of the target memory area from the CXL memory device; the size of the target memory area is equal to the data size of the memory image; determine the target memory area based on the response to the memory allocation request; wherein, the response to the memory allocation request includes the identification information of the target memory area.

[0023] In another possible implementation, the response to the above memory allocation request further includes the target address of the above target memory area; the writing module is specifically configured to: divide the above memory image into multiple data blocks; write the multiple data blocks of the above memory image into the above target memory area based on the target address of the above target memory area, so as to reduce memory bandwidth consumption.

[0024] In yet another possible implementation, the above first sending module is further configured to: send a first memory release request; wherein, the above first memory release request is used to indicate releasing the occupancy of the above target memory area by the above first computing device.

[0025] In yet another possible implementation, the above first sending module is further configured to: send a deletion request; wherein, the above deletion request is used to indicate deleting the above memory image in the above target memory area and returning the usage permission of the above target memory area.

[0026] Fourthly, an embodiment of the present application further provides a migration device for an application program, configured in a second computing device, the above second computing device is connected to a Compute Express Link (CXL) memory device, and the above CXL memory device is connected to a first computing device; the device includes: a receiving module, configured to receive the identification information of the above target memory area sent by the above first computing device; wherein, the above target memory area is used to store the memory image of the application to be migrated; a second obtaining module, configured to obtain the target address of the above target memory area based on the identification information of the above target memory area; a reading module, configured to read the above memory image from the above target memory area based on the target address of the above target memory area; a recovery module, configured to recover the above application to be migrated based on the above memory image.

[0027] In one possible implementation, the above second obtaining module is specifically configured to: send a memory address obtaining request; wherein, the above memory address obtaining request is used to indicate obtaining the target address of the above target memory area corresponding to the identification information of the above target memory area; determine the target address of the above target memory area based on the response to the above memory address obtaining request.

[0028] In another possible implementation, the device further includes a second sending module; the above second sending module is configured to: send a second memory release request; wherein, the above second memory release request is used to indicate releasing the occupancy of the above target memory area by the above second computing device.

[0029] Fifth aspect, embodiments of the present application further provide a computing device. The computing device includes a memory and a processor; the memory and the processor are coupled; the memory is used to store computer program instructions; the processor is used to execute the computer program instructions so that the computing device performs: obtaining a memory image of an application to be migrated; determining a target memory area based on the data size of the memory image; wherein, the target memory area is a storage area of the CXL memory device; the target memory area is used to store the memory image; writing the memory image into the target memory area; sending identification information of the target memory area to the second computing device; so that the second computing device reads the memory image from the target memory area according to the identification information of the target memory area to restore the application to be migrated based on the memory image.

[0030] In a possible implementation manner, the computing device performs: sending a memory allocation request; wherein, the memory allocation request is used to indicate allocating the target memory area from the CXL memory device; the size of the target memory area is equal to the data size of the memory image; determining the target memory area based on the response to the memory allocation request; wherein, the response to the memory allocation request includes the identification information of the target memory area.

[0031] In another possible implementation manner, the response to the memory allocation request further includes the target address of the target memory area; the computing device performs: dividing the memory image into multiple data blocks; writing the multiple data blocks of the memory image into the target memory area based on the target address of the target memory area.

[0032] In yet another possible implementation manner, the computing device performs: sending a first memory release request; wherein, the first memory release request is used to indicate releasing the computing device's occupancy of the target memory area.

[0033] In yet another possible implementation manner, the computing device performs: sending a deletion request; wherein, the deletion request is used to indicate deleting the memory image in the target memory area and returning the usage permission of the target memory area.

[0034] Sixth aspect, an embodiment of the present application further provides a computing device; the computing device includes a memory and a processor; the memory and the processor are coupled; the memory is used to store computer program instructions; the processor is used to execute the computer program instructions so that the computing device performs: receiving identification information of a target memory area sent by the first computing device; wherein the target memory area is used to store a memory image of an application to be migrated; obtaining a target address of the target memory area based on the identification information of the target memory area; reading the memory image from the target memory area based on the target address of the target memory area; and restoring the application to be migrated based on the memory image.

[0035] In a possible implementation manner, the computing device performs: sending a memory address acquisition request; wherein the memory address acquisition request is used to indicate to obtain the target address of the target memory area corresponding to the identification information of the target memory area; and determining the target address of the target memory area based on a response to the memory address acquisition request.

[0036] In another possible implementation manner, the computing device performs: sending a second memory release request; wherein the second memory release request is used to indicate releasing the computing device's occupation of the target memory area.

[0037] Seventh aspect, an embodiment of the present application provides a computing system, the computing system includes a first computing device, a second computing device, and a Compute Express Link (CXL) memory device; wherein the first computing device and the second computing device are respectively connected to the CXL memory device; the first computing device is the computing device described in the fifth aspect above, and the second computing device is the computing device described in the sixth aspect above.

[0038] In a possible implementation manner, the CXL memory device includes a CXL multi-head controller or a CXL switching device.

[0039] Eighth aspect, an embodiment of the present application provides a chip, the chip is used to execute the method according to any one of the first aspect above, or the method according to any one of the second aspect above.

[0040] Ninth aspect, an embodiment of the present application provides a computer-readable storage medium, in which computer-executable instructions are stored, and when the computer-executable instructions are executed by a computer, they implement the method according to any one of the first aspect above, or the method according to any one of the second aspect above.

[0041] Tenth aspect, an embodiment of the present application provides a program product, including a computer program, and when the computer program is executed by a processor, it implements the method according to any one of the first aspect above, or the method according to any one of the second aspect above. Description of the Drawings

[0042] Figure 1 It is a scenario diagram of a method for migrating an application program provided by an embodiment of the present application;

[0043] Figure 2 It is an interaction diagram of a method for migrating an application program provided by an embodiment of the present application;

[0044] Figure 3 It is an interaction diagram of a method for obtaining region information corresponding to a target memory region provided by an embodiment of the present application;

[0045] Figure 4 It is a schematic diagram of a memory region in a CXL memory device provided by an embodiment of the present application;

[0046] Figure 5 It is an interaction diagram of a method for writing a memory image into a target memory region provided by an embodiment of the present application;

[0047] Figure 6 It is an interaction diagram of a method for reading a memory image in a target memory region provided by an embodiment of the present application;

[0048] Figure 7 It is an interaction diagram of a method for block - reading a memory image provided by an embodiment of the present application;

[0049] Figure 8 It is an interaction diagram of a method for releasing a target memory region provided by an embodiment of the present application;

[0050] Figure 9 It is an interaction diagram of a method for deleting the mapping relationship between identification information and a target memory region provided by an embodiment of the present application;

[0051] Figure 10 It is an interaction diagram of another method for migrating an application program provided by an embodiment of the present application;

[0052] Figure 11 It is a schematic diagram of a device for migrating an application program provided by an embodiment of the present application;

[0053] Figure 12 It is a schematic diagram of another device for migrating an application program provided by an embodiment of the present application;

[0054] Figure 13 It is a schematic diagram of a computing device provided by an embodiment of the present application. Detailed Embodiments

[0055] The technical solutions in the embodiments of the present application will be described below with reference to the accompanying drawings in the embodiments of the present application. To clearly describe the technical solutions in the embodiments of the present application, the first, second, etc. descriptions that appear in the embodiments of the present application are only for schematic and distinguishing the described objects, without an order, and do not represent a special limitation on the number of devices in the embodiments of the present application, and cannot constitute any limitation to the embodiments of the present application.

[0056] The application program migration method provided by the embodiments of the present application can be applied to a computing device (including a first computing device and a second computing device), and the computing device can be a server or a terminal device. The first computing device is physically connected to a Compute Express Link (CXL) device, and the CXL memory device is physically connected to the second computing device. Among them, the CXL memory device can include a CXL multi-headed device or a CXL switch, etc. In practical applications, taking the first computing device as the source computing device (i.e., the computing device where the application program to be migrated is located) and the second computing device as the destination computing device (i.e., the computing device where the migrated application program is located) as an example, the memory mirror corresponding to the application to be migrated in the first computing device can be written into the target memory area in the CXL memory device, and then the second computing device reads and restores the memory mirror in the target memory area in the CXL memory device, so as to complete the migration of the application program. The above process does not require multiple copies of the memory mirror corresponding to the application to be migrated (such as in the related art, the memory mirror needs to be copied to the memory buffer in the first computing device, the network card buffer in the first computing device, the network card buffer in the second computing device, and the file buffer in the second computing device in sequence to realize the migration of the application program), thereby reducing the migration duration of the application program and the read and write operations during the migration process, so as to improve the migration efficiency of the application program.

[0057] Figure 1 It is a scenario diagram of an application program migration method provided by the embodiments of the present application. In the following embodiments, the first computing device is used as the source computing device and the second computing device is used as the destination computing device as an example to illustrate the application program migration method provided by the present application.

[0058] Such as Figure 1As shown, there is a physical connection between the first computing device 110 and the CXL memory device 120 via a high-speed cable, and there is also a physical connection between the CXL memory device 120 and the second computing device 130 via a high-speed cable. Among them, the transmission interface of the high-speed cable can be a peripheral component interconnect express (PCIe) interface, enabling the CXL memory device 120 to transmit memory mirroring with the first computing device 110 / second computing device 130 via the PCIe interface, thereby improving the transmission speed of memory mirroring.

[0059] CXL is a cache-coherent interconnect protocol for supporting processors, memory expansion, and accelerators. The CXL memory device 120 includes a CXL control device and one or more memory modules; among them, the CXL control device and the memory module can be integrated into one device or can be discrete. The memory module can be a dual inline memory module (DIMM), etc., and the memory area provided by the memory module can be used to store the memory mirroring transmitted by the computing device.

[0060] The CXL memory device 120 can be a CXL multi-head controller or a CXL switching device. Among them, the CXL multi-head device can support multiple computing devices to access the same memory area in the memory module based on the low-latency memory access (CXL.mem) protocol. The CXL switching device is an interconnection device that can provide more flexible memory pooling and resource sharing capabilities, and can also support multiple computing devices to access the same memory area in the memory module.

[0061] A client hot migration component (such as CRIU page-server client) 10 is configured in the first computing device 110, and a server hot migration component (such as CRIU page-server server) 11 is configured in the second computing device 130. The memory management module 12 can be configured in any computing device (hereinafter referred to as the target computing device) connected to the CXL memory device, such as the first computing device 110 or the second computing device 130 or other computing devices connected to the CXL memory device. Among them, the memory management module 12 can be a fabric manager, etc.

[0062] A network connection can also be established between the first computing device 110 and the second computing device 130. Data with a relatively small data volume such as messages and commands can be transmitted through network communication between the first computing device 110 and the second computing device 130. After establishing a network connection between the first computing device 110 and the second computing device 130, the first computing device 110 can determine the data size of the memory data corresponding to the application to be migrated in the first computing device 110, and call the memory management module 12 through the client hot migration component 10; the memory management module 12 can, based on the size of the memory data, divide a target memory area in the memory area of the CXL memory device 120 (hereinafter referred to as the total memory area) for the first computing device 110 to access. Among them, the memory size of the target memory area is equal to the data size of the memory data corresponding to the application to be migrated.

[0063] After determining the target memory area, the memory management module 12 can generate area information corresponding to the target memory area, and send the area information corresponding to the target memory area to the client hot migration component 10. After receiving the area information corresponding to the target memory area, the client hot migration component 10 can freeze, dump, etc. the application to be migrated to obtain a memory image of the application to be migrated; and write the memory image into the target memory area of the CXL memory device 120 through a physical interface (such as a PCIe interface) based on the area information corresponding to the target memory area. After the writing is completed, the client hot migration component 10 can send the area information corresponding to the target memory area to the server hot migration component 11 in the second computing device 130 through network transmission. After receiving the area information corresponding to the target memory area, the server hot migration component 11 can read the memory image of the application to be migrated in the target memory area of the CXL memory device 120 based on the area information, and perform a restore process on the read memory image, thereby completing the migration of the application to be migrated.

[0064] Exemplarily, the region information corresponding to the target memory region may include the target address corresponding to the target memory region. The memory management module 12 may determine the target address corresponding to the target memory region and send the target address corresponding to the target memory region to the client hot migration component 10. After receiving the target address corresponding to the target memory region, the client hot migration component 10 may write the memory data corresponding to the application to be migrated into the target memory region of the CXL memory device 120 based on the target address corresponding to the target memory region. After the writing is completed, the client hot migration component 10 may send the target address corresponding to the target memory region to the server hot migration component 11 in the second computing device 130 via network transmission. After receiving the target address corresponding to the target memory region, the server hot migration component 11 may read the memory image from the target memory region of the CXL memory device 120 based on the target address and perform a recovery process on the read memory image.

[0065] Exemplarily, the region information corresponding to the target memory region may further include the identification information (i.e., object ID) corresponding to the target memory region. There is a one-to-one mapping relationship between the target address corresponding to the target memory region and the identification information. The memory management module 12 may determine the target address and the corresponding identification information corresponding to the target memory region and send the target address and the identification information corresponding to the target memory region to the client hot migration component 10. After receiving the target address and the identification information corresponding to the target memory region, the client hot migration component 10 may write the memory data corresponding to the application to be migrated into the target memory region of the CXL memory device 120 based on the target address corresponding to the target memory region. After the writing is completed, the client hot migration component 10 may send the identification information corresponding to the target memory region to the server hot migration component 11 in the second computing device 130 via network transmission. After receiving the identification information corresponding to the target memory region, the server hot migration component 11 may send the identification information to the memory management module 12; the memory management module 12 may determine the target address corresponding to the identification information based on the mapping relationship between the target address and the identification information and send the target address to the server hot migration component 11. Thus, the server hot migration component 11 may read the memory image from the target memory region of the CXL memory device 120 based on the target address and perform a recovery process on the read memory image.

[0066] Through the above solution, when migrating the application to be migrated in the first computing device to the second computing device, it is only necessary to store the memory image of the application to be migrated in the target memory area in the CXL memory device through the first computing device, and read the memory image from the target memory area in the CXL memory device through the second computing device. Based on the memory sharing ability of the CXL memory device, this application enables different computing devices to access the same memory area. Therefore, when migrating the application to be migrated, there is no need for multiple copies, which can reduce the migration duration of the application program and the read and write operations during the migration process, thereby improving the migration efficiency of the application program.

[0067] Figure 2 It is an interaction diagram of a method for migrating an application program provided by an embodiment of this application. This method can be applied to Figure 1 the first computing device and the second computing device shown in the figure. As Figure 2 shown, this method includes steps 210 to 270.

[0068] Step 210, the first computing device obtains the memory image of the application to be migrated.

[0069] In some embodiments, when migrating the application to be migrated in the first computing device, the first computing device can first determine the data size of the memory data corresponding to the application to be migrated. It can be understood that the application program itself is just a static executable file stored on the disk, while the process is the actual execution unit of the application program when it is running, which includes all the running states of the application program, including memory data, CPU registers, file descriptors, network connection states, etc. Therefore, when migrating an application program, it is essentially migrating the process of the application program, that is, saving (checkpoint / dump) the running state of the process and restoring it in the destination computing device, so that the application program can continue to execute in the destination computing device.

[0070] When migrating an application program, it is mainly migrating the memory data generated during the running of the process. Therefore, in the following embodiments, the migration process of the application program will be described by taking the memory data as an example. The principles of migrating data such as CPU registers, file descriptors, and network connection states are the same as those of the memory data, and the implementation methods of migrating the memory data of the process can be referred to, which will not be elaborated in the subsequent embodiments.

[0071] Exemplarily, the first computing device can obtain the process information (such as the process identifier pid) corresponding to the process of the application to be migrated, and obtain the size of the memory data of the process based on the process information.

[0072] In some embodiments, since the memory data of the process of the application to be migrated changes dynamically after the application runs, the first computing device may first freeze the process of the application to be migrated and obtain the current running state of the process, such as the current memory data (including the code, heap, stack, data segment, etc. of the process); then perform a dump process on the current memory data, that is, save the current memory data as a series of files to obtain the memory image of the application to be migrated.

[0073] Among them, the memory image of the application to be migrated stores the current memory state of the application to be migrated, and its specific content and data size are the same as the current memory data of the application to be migrated, so that the application to be migrated can be restored to the current running state and continue to run normally on the second computing device based on the memory image subsequently.

[0074] Step 220, the first computing device determines the target memory area based on the data size of the memory image.

[0075] In some embodiments, after the first computing device determines the data size of the memory data or the memory image, it may obtain the area information corresponding to the target memory area in the CXL memory device for storing the memory image. Among them, the area information corresponding to the target memory area may include the identification information (i.e., object ID) corresponding to the target memory area.

[0076] Exemplarily, the target memory area in the CXL memory device can be determined by the memory management module based on the data size of the memory data or the memory image and the memory size of the total memory area in the CXL memory device, and the determined target memory area can be accessed by the first computing device. The memory management module can be configured in the first computing device or in the second computing device, and this is not limited in this embodiment.

[0077] Step 230, the first computing device writes the memory image into the target memory area.

[0078] In some embodiments, after the first computing device obtains the memory image of the application to be migrated, it may write the memory image into the target memory area in the CXL memory device based on the identification information corresponding to the target memory area.

[0079] Exemplarily, the first computing device may write all the memory images into the target memory area at one time; or divide the memory image into multiple memory image blocks and write the multiple memory image blocks into the target memory area in sequence. The specific manner of writing the memory image is not limited in this embodiment.

[0080] Step 240, the first computing device sends the identification information of the target memory area to the second computing device.

[0081] In some embodiments, after the first computing device finishes writing the memory image, it may send the identification information corresponding to the target memory area to the second computing device. Exemplarily, the first computing device may send the identification information corresponding to the target memory area to the second computing device through network transmission.

[0082] By the first computing device sending the area information corresponding to the target memory area to the second computing device after finishing writing the mirror data, the second computing device does not need to monitor the writing process of the mirror data in real time, saving computing resources. It only needs to read the mirror data after receiving the area information corresponding to the target memory area; and it can avoid the problem that the second computing device reads incomplete mirror data due to reading the data before the mirror data writing is completed.

[0083] Step 250, the second computing device receives the identification information of the target memory area sent by the first computing device, and determines the target address of the target memory area based on the identification information of the target memory area.

[0084] In some embodiments, the area information corresponding to the target memory area may further include the target address corresponding to the target memory area. After the second computing device receives the identification information corresponding to the target memory area through the network, it may determine the target address of the target memory area based on the identification information corresponding to the target memory area.

[0085] Exemplarily, the second computing device may send the identification information to the memory management module, so that the memory management module determines the target address corresponding to the identification information based on the mapping relationship between the target address and the identification information, and sends the target address to the second computing device.

[0086] Step 260, read the memory image from the target memory area based on the target address of the target memory area.

[0087] In some embodiments, after the second computing device obtains the target address corresponding to the target memory area, it accesses the target memory area in the CXL memory device based on the target address, and takes the target address as the starting read address to read the memory image in the target memory area.

[0088] Exemplarily, when the second computing device reads the memory image, it may directly read the entire memory image at one time; or, it may also adopt a block-by-block reading method to sequentially read memory image blocks to obtain a complete memory image. The specific method of reading the memory image in this embodiment is not limited.

[0089] Step 270, the second computing device restores the application to be migrated based on the memory image.

[0090] In some embodiments, after the second computing device reads the memory image, it performs read and recovery processing on the read memory image to restore the running state of the process of the application to be migrated in the second computing device. Exemplarily, the second computing device may first store the read memory image in a local file and subsequently perform recovery processing on the memory image in the local file; alternatively, the second computing device may also directly perform recovery processing on the read memory image, which is not limited in this embodiment. Thus, after the memory image of the application to be migrated is recovered, the running state of the application to be migrated can be restored in the second computing device, thereby completing the hot migration of the application program.

[0091] Through the above solution, when migrating the application to be migrated in the first computing device to the second computing device, it is only necessary to store the memory image of the application to be migrated in the target memory area in the CXL memory device through the first computing device, and read the memory image from the target memory area in the CXL memory device through the second computing device. Based on the memory sharing ability of the CXL memory device, different computing devices can access the same memory area. Therefore, there is no need for multiple copies when migrating the application to be migrated, which can reduce the migration duration of the application program and the read and write operations during the migration process, thereby improving the migration efficiency of the application program.

[0092] Figure 3 An interaction diagram for obtaining region information corresponding to a target memory area provided by an embodiment of this application is as follows Figure 3 As shown, the above step 220 includes steps 310 to 340.

[0093] Step 310, the client hot migration component sends a memory allocation request to the memory management module.

[0094] In some embodiments, a memory management module may be configured in the first computing device or the second computing device. The memory management module provides multiple application program interfaces (APIs), including a memory allocation interface, a memory address acquisition interface, a memory release interface, and a memory deletion interface. A client hot migration component is configured in the first computing device, and the client hot migration component can call the interfaces of the memory management module.

[0095] Exemplarily, after the first computing device determines the data size of the memory data corresponding to the application to be migrated, the user can call the memory allocation interface of the memory management module through the client hot migration component to send a memory allocation request to the memory management module. The memory allocation request includes the data size of the memory data, and is used to instruct the memory management module to allocate a target memory area for storing the memory mirror from the CXL memory device. In some examples, the form of the memory allocation interface can be: create_blob(unsigned long long size,void*payload). Wherein, the payload is the information returned by the memory management module to the first computing device, including the identification information and the target address corresponding to the target memory area.

[0096] Step 320, in response to the memory allocation request, the memory management module obtains the memory size of the total memory area of the CXL memory device.

[0097] In some embodiments, then, in response to the memory allocation request, the memory management module determines a target memory area in the total memory area of the CXL memory device based on the data size of the memory data for the first computing device to access. The memory size of the target memory area is equal to the data size of the memory data corresponding to the application to be migrated, and the memory size of the target memory area is less than or equal to the memory size of the total memory area.

[0098] Reference Figure 4 A schematic diagram of the memory area in a CXL memory device as shown. As Figure 4 shown, the CXL memory device can be connected to one or more memory modules, and the memory areas of all memory modules form the total memory area. The memory management module can manage and allocate the total memory area.

[0099] Exemplarily, the memory management module can determine the unoccupied memory area in the total memory area and obtain the memory size of the unoccupied memory area to determine the target memory area in the unoccupied memory area. The unoccupied memory area refers to the memory area not used by other computing devices, that is, there is currently no other computing device reading or writing data in this memory area. The occupied memory area refers to the memory area being used by other computing devices, that is, there is currently another computing device reading or writing data in this memory area.

[0100] Step 330, the memory management module determines the target memory area in the total memory area based on the data size of the memory data and the memory size of the total memory area in the CXL memory device, and determines the area information corresponding to the target memory area.

[0101] In some embodiments, next, the memory management module may determine a target memory area in the total memory area. If the memory size of the total memory area is greater than or equal to the data size of the memory data, the memory management module determines a continuous target memory area in the total memory area, and the memory size is equal to the size of the memory data corresponding to the application to be migrated. If the memory size of the total memory area is less than the data size of the memory data, the memory management module may return a result indicating that the creation of the target memory area fails to the client hot migration component.

[0102] In some embodiments, the memory management module may determine a target memory area in the unoccupied memory area. If the memory size of the total unoccupied memory area is greater than or equal to the data size of the memory data, the memory management module determines a continuous target memory area in the unoccupied memory area, and the memory size is equal to the size of the memory data corresponding to the application to be migrated. If there is no unoccupied memory area in the total memory area whose memory size is greater than or equal to the memory data size, the memory management module may return a result indicating that the creation of the target memory area fails to the client hot migration component.

[0103] In some embodiments, when the memory management module manages the total memory area in the CXL memory device, it may first map the total memory area into one or more area blocks according to a preset mapping size, and set a physical address for each area block, and the physical address is the start address (i.e., the base address) of each area block; moreover, each area block may be used as a direct access (DAX) device for the computing device to access based on the base address. Exemplarily, the memory management module may determine a target memory area corresponding to the first computing device in the target area block of multiple area blocks.

[0104] In some examples, the memory management module may determine the size of the unoccupied memory area in each area block. If there is a target area block in multiple area blocks whose unoccupied memory area size is greater than or equal to the memory data size, it may determine a target memory area in any target area block whose memory area size is greater than or equal to the memory data size. Moreover, the memory management module may determine the offset of the target memory area relative to the base address of its target area block, and generate identification information of the target memory area. Among them, the target address corresponding to the target memory area is determined according to the sum of the base address corresponding to the target memory area and the offset, that is, target address = base address + offset. The first computing device can directly access the corresponding target memory area in the CXL memory device based on the target address. There is a one-to-one correspondence between the target address corresponding to the target memory area and the identification information, that is, the identification information corresponding to each target memory area is different from each other.

[0105] Exemplarily, continue to refer to Figure 4As shown in the figure, the memory management module divides the memory area of memory module A into area block a1 and area block a2 (the sizes of the unoccupied memory areas in both area blocks are larger than the size of the memory data). For area block a1, when the entire area block a1 is in the unoccupied state, the memory management module can use the base address of area block a1 as the starting address of the target memory area, and determine the entire target memory area (i.e., the memory area numbered 1) based on the size of the memory data. The target address of this target memory area 1 is the base address of area block a1 (offset is 0). The memory area 2 in area block a1 is the unoccupied memory area.

[0106] For area block a2, if there is an occupied target memory area (i.e., target memory area 3) in area block a2, the memory management module can determine the target memory area corresponding to the first computing device in the memory area after this target memory area 3. The offset of this target memory area 4 can be determined according to the size of target memory area 3, and the target address of target memory area 4 is the sum of the base address of area block a2 and this offset. The base address of area block a2 can be determined based on the base address of area block a1 and the size of area block a1.

[0107] In some embodiments, the memory management module can create a memory information table corresponding to the CXL memory device. The memory information table can include the area information, occupancy status, and area size corresponding to the target memory area. Among them, the area information corresponding to the target memory area can include the target address (including the base address and offset) corresponding to the target memory area and the identification information. There is a one-to-one mapping relationship between the identification information and the target address determined according to the base address and offset; the occupancy status includes the occupied state and the unoccupied state. In some examples, the content of the memory information table can be referred to as shown in Table 1:

[0108] Table 1

[0109] Identification information Base address Offset Region size Occupancy status 123 0x10000000 0x00000000 16GB Occupied 146 0x10000000 0x20000000 8GB Occupied 157 0x11000000 0x00000000 8GB Unoccupied

[0110] The memory management module can determine the situations of the unoccupied and occupied memory areas in each area block based on the above memory information table, so as to allocate a suitable target memory area for the first computing device.

[0111] Step 340, the memory management module sends a response to the memory allocation request to the client hot migration component.

[0112] In some embodiments, after the memory management module determines the area information corresponding to the target memory area, it sends a response to the memory allocation request to the client hot migration component, where the response to the memory allocation request includes the identification information corresponding to the target memory area. Thus, after receiving the identification information, the client hot migration component can access the corresponding target memory area in the CXL memory device based on the identification information and write the memory image of the application to be migrated into the target memory area.

[0113] Step 350, the client hot migration component determines the target memory area based on the response to the memory allocation request.

[0114] In some embodiments, after receiving the response to the memory allocation request sent by the memory management module, the client hot migration component can determine the target memory area in the CXL memory device based on the identification information corresponding to the target memory area, so as to write the memory image into the target memory area.

[0115] Through the above solution, the memory area in the CXL memory device can be managed and allocated by the memory management module in the first computing device or the second computing device, so as to determine a suitable target memory area based on the size of the memory data of the application to be migrated, so that the first computing device can successfully write the memory image into the memory area in the CXL memory device.

[0116] Figure 5 An interaction diagram for writing a memory image into a target memory area provided by an embodiment of the present application is as Figure 5 shown, and the above step 230 includes steps 510 to 530.

[0117] Step 510, the client hot migration component divides the memory image into multiple memory image blocks.

[0118] In some embodiments, the response to the memory allocation request sent by the memory management module to the first computing device after determining the area information corresponding to the target memory area may further include the target address of the target memory area. After receiving the response to the memory allocation request, the first computing device can write the memory image into the target memory area of the CXL memory device in a block-by-block writing manner based on the target address of the target memory area.

[0119] In some embodiments, the client hot migration component may first divide the memory image into multiple memory image blocks based on a first preset value and the size of the memory image. The first preset value may be a preset data block size; the sizes of the multiple memory image blocks may be equal or different. For example, if the first preset value is 2 GB and the size of the memory image is 8.5 GB, the memory image may be divided into 4 memory image blocks of 2 GB, 2 GB, 2 GB, and 2.5 GB, or into 5 memory image blocks of 2 GB, 2 GB, 2 GB, 2 GB, and 0.5 GB, etc.

[0120] Step 520, the client hot migration component writes multiple data blocks of the memory image to the target memory area based on the target address of the target memory area.

[0121] In some embodiments, the client hot migration component may write each memory image block to the target memory area in sequence. The multiple memory image blocks include data blocks to be written and / or data blocks that have been written. When writing each data block to be written to the target memory area, the current write address may be determined first according to the total size of the data blocks that have been written and the target address.

[0122] Exemplarily, the client hot migration component obtains the first data block of the multiple memory image blocks (i.e., the first data block to be written), and determines the target address corresponding to the target memory area as the current write address; then writes the first data block to the target memory area starting from the current write address. Next, obtain the next data block (i.e., the second data block to be written), and determine the current write address according to the target address and the size of the first data block (i.e., the data block that has been written); then write the second data block to the target memory area starting from the current write address. Next, obtain the next data block (i.e., the third data block to be written), and determine the current write address according to the target address and the sum of the sizes of the first data block and the second data block (i.e., the data blocks that have been written); then write the third data block to the target memory area starting from the current write address, and so on.

[0123] Step 530, the client hot migration component writes the data block to be written to the target memory area of the target CXL memory device starting from the current write address until the sum of the data sizes of the data blocks that have been written is equal to the data size of the memory image.

[0124] In some embodiments, after determining the current write address, the client hot migration component may write the data block to be written to the target memory area of the CXL memory device starting from the current write address until the sum of the data sizes of the data blocks that have been written is equal to the data size of the memory image, that is, until all the memory image blocks are written.

[0125] Through the above solution, the method of sequentially writing memory mirror blocks into the target memory area can effectively avoid the high memory bandwidth consumption that may be brought about when loading the entire memory mirror at once, reduce the instantaneous pressure on the memory bandwidth, and make the migration process more stable. Moreover, it can make the write operation of each memory block relatively independent. Even if a write failure occurs for a certain data block, it will not affect the migration and recovery of other data blocks, which is convenient for fault tolerance processing; if a write error is encountered, only the data of this block needs to be retried, rather than rewriting the entire memory mirror.

[0126] Figure 6 The following is an interaction diagram for reading a memory mirror in a target memory area provided by an embodiment of this application. As Figure 6 shown, the above steps 240 to 260 include steps 610 to 650.

[0127] Step 610, the client hot migration component sends the identification information corresponding to the target memory area to the server hot migration component.

[0128] In some embodiments, after the client hot migration component of the first computing device finishes writing the memory mirror, it can send the identification information corresponding to the target memory area to the server hot migration component of the second computing device through network transmission. Moreover, the client hot migration component can also send information indicating that the memory mirror writing is completed to the server hot migration component to notify the server hot migration component that it can start reading the memory mirror.

[0129] Step 620, the server hot migration component sends a memory address acquisition request to the memory management module.

[0130] In some embodiments, after receiving the identification information corresponding to the target memory area, the server hot migration component calls the memory address acquisition interface of the memory management module to send a memory address acquisition request to the memory management module. Among them, the memory address acquisition request includes the identification information corresponding to the target memory area, and the memory address acquisition request is used to request to obtain the target address of the target memory area corresponding to the identification information. In some examples, the form of the memory address acquisition interface can be: get_blob(const char*oid,void*payload). Among them, payload (payload) is the information returned by the memory management module to the second computing device, which includes the target address corresponding to the target memory area.

[0131] Step 630, the memory management module determines the target address of the target memory area in response to the memory address acquisition request.

[0132] In some embodiments, next, the memory management module receives the identification information corresponding to the target memory area and, in response to a memory address acquisition request, determines the target address corresponding to the identification information based on the identification information and the mapping relationship between the identification information and the target memory area.

[0133] Exemplarily, the memory management module may look up the target address (including the base address and offset) corresponding to the identification information in the memory information table. Also, the memory management module may look up the area size of the target memory area corresponding to the identification information in the memory information table. For example, as shown in Table 1, if the identification information received by the memory management module is 146, then according to this memory information table, it can be determined that the base address of the target memory area corresponding to the identification information 146 is 0x10000000, the offset is 0x20000000, and the area size is 8GB.

[0134] Step 640, the memory management module sends a response to the memory address acquisition request to the server hot migration component.

[0135] In some embodiments, after the memory management module obtains the target address corresponding to the identification information and the area size of the target area corresponding to the identification information, it may send a response to the memory address acquisition request to the server hot migration component through network transmission. Among them, the response to the memory address acquisition request includes the target address corresponding to the target memory area and the area size corresponding to the target memory area.

[0136] Step 650, the server hot migration component determines the target address corresponding to the target memory area based on the response to the memory address acquisition request, and reads the memory image in the target memory area of the CXL memory device.

[0137] In some embodiments, after the server hot migration component receives the response to the memory address acquisition request, it may read the memory image in the target memory area of the CXL memory device based on the target address and the area size corresponding to the target memory area.

[0138] Exemplarily, when the server hot migration component reads the memory image, it may directly read the entire memory image at once. For example, the server hot migration component may start reading the memory image in the target memory area from the target address until the size of the read memory image is equal to the area size, thereby completing the reading of the memory image. Or, the server hot migration component may also adopt a block-by-block reading method to sequentially read memory image blocks based on the target address to obtain the complete memory image.

[0139] Through the above solution, based on the memory sharing ability of the CXL memory device, after the first computing device writes the memory image into the target memory area in the CXL memory device, the second computing device can directly access the target memory area based on the target address and read the memory image therein, thereby reducing the number of copies of the memory image and improving the migration efficiency of the application program.

[0140] Figure 7 FIG. is an interaction diagram for block-wise reading of a memory image provided by an embodiment of the present application. As Figure 7 shown, the above step 650 includes steps 710 to 720.

[0141] Step 710, the server hot migration component determines the current read address based on the sum of the data sizes of the read data blocks and the target address.

[0142] In some embodiments, the second computing device may read the memory image in the target memory area in a block-wise manner. Exemplarily, the server hot migration component may determine the size of each read memory image block based on a second preset value and the size of the memory image. The second preset value may be a preset data block size; the sizes of multiple memory image blocks may be equal or unequal. For example, if the second preset value is 4GB and the size of the memory image is 8.5GB, the sizes of the memory image blocks read each time may be 4GB, 4.5GB, or 4GB, 4GB, 0.5GB, etc. It should be noted that the first preset value corresponding to writing and the second preset value corresponding to reading may be the same or different.

[0143] In some embodiments, when the server hot migration component reads the memory image in the target memory area, it may first determine whether the sum of the sizes of the read data blocks is equal to the data size of the memory image before each read. If the sum of the sizes of the read data blocks is less than the data size of the memory image, the current read address is determined based on the sum of the sizes of the read data blocks and the target address. If the sum of the sizes of the read data blocks is equal to the data size of the memory image, it means that all memory image blocks have been read, and the process of reading the memory image ends. The memory image includes multiple memory image blocks, and the multiple memory image blocks include to-be-read data blocks and / or read data blocks.

[0144] Exemplarily, the server hot migration component determines the target address corresponding to the target memory area as the current read address, and reads the first data block in the target memory area starting from the current read address. Then, it determines the current read address based on the target address and the size of the first data block (i.e., the read data block), and reads the second data block in the target memory area starting from the current read address. Then, it determines the current read address again based on the target address and the sum of the sizes of the first data block and the second data block (i.e., the read data blocks), and reads the third data block in the target memory area starting from the current read address, and so on.

[0145] Step 720, the server hot migration component reads the data block to be read in the target memory area starting from the current read address until the sum of the data sizes of the read data blocks is equal to the data size of the memory image.

[0146] In some embodiments, after determining the current read address, the server hot migration component reads the data block to be read in the target memory area of the CXL memory device starting from the current read address until the sum of the data sizes of the read data blocks is equal to the data size of the memory image, that is, until all the memory image blocks are read.

[0147] Through the above solution, the method of sequentially reading memory image blocks in the target memory area can effectively avoid the high memory bandwidth consumption that may be brought about by loading the entire memory image at once, reduce the instantaneous pressure on the memory bandwidth, and make the migration process more stable. Moreover, it can make the read operation of each memory block relatively independent. Even if a certain data block fails to be read, it will not affect the migration and recovery of other data blocks, which is convenient for fault tolerance processing; if a read error is encountered, only the data of this block needs to be retried, rather than re-reading the entire memory image.

[0148] Figure 8 An interaction diagram for releasing the target memory area provided by the embodiments of this application is as Figure 8 shown, and the above method further includes steps 810 to 830.

[0149] Step 810, the client hot migration component sends a first memory release request to the memory management module.

[0150] In some embodiments, after the client hot migration component in the first computing device writes the memory mirror block to the target memory area, the user can call the memory release interface (i.e., the memory area release interface) of the memory management module through the client hot migration component to send a first memory release request to the memory management module. The memory release request includes the area information corresponding to the target memory area, and the first memory release request is used to instruct the memory management module to release the occupancy of the target memory area by the first computing device. Exemplarily, the form of the memory release interface can be: release_blob(const char*oid).

[0151] Among them, the area information corresponding to the target memory area sent by the client hot migration component to the memory management module can be the identification information corresponding to the target memory area.

[0152] Step 820, the server hot migration component sends a second memory release request to the memory management module.

[0153] In some embodiments, after the server hot migration component in the second computing device finishes reading the memory mirror, the user can call the memory release interface of the memory management module through the server hot migration component to send a second memory release request to the memory management module. The second memory release request includes the area information corresponding to the target memory area, and the second memory release request is used to instruct the memory management module to release the occupancy of the target memory area by the second computing device.

[0154] Among them, the area information corresponding to the target memory area sent by the server hot migration component to the memory management module can be the identification information corresponding to the target memory area.

[0155] Step 830, in response to the first memory release request sent by the first computing device and the second memory release request sent by the second computing device, the memory management module updates the occupancy status of the target memory area from the occupied state to the unoccupied state based on the area information corresponding to the target memory area.

[0156] In some embodiments, when the memory management module receives a first memory release request sent by a first computing device and a second memory release request sent by a second computing device, the memory management module updates the occupancy status of the target memory area from the occupied state to the unoccupied state based on the area information corresponding to the target memory area. That is to say, the memory management module can update the occupancy status of the target memory area only when it receives memory release requests sent by all computing devices using the target memory area. After updating the status of the target memory area to the unoccupied state, it indicates that no computing device is currently using this memory area for application migration, so this memory area can be used for migrating other applications in the first computing device.

[0157] Exemplarily, after the memory management module receives the area information corresponding to the target memory area sent by the first computing device and the second computing device respectively, it can determine whether these two area information are consistent. And when these two area information are consistent, the memory management module updates the occupancy status of the target memory area from the occupied state to the unoccupied state.

[0158] Exemplarily, the memory management module can update the occupancy status of the target memory area through a memory information table. As shown in Table 1, if the first computing device and the second computing device request to release the target memory area with the identification information of 123, the memory management module will search for the target memory area with the identification information of 123 in the memory information table and update the occupancy status from the occupied state to the unoccupied state.

[0159] In some embodiments, after the memory management module finishes updating the occupancy status of the target memory area, it can return a release success message to the first computing device and the second computing device to notify the first computing device and the second computing device that the release of the target memory area has been successfully completed.

[0160] In some embodiments, if the memory management module only receives a memory release request sent by one of the first computing device and the second computing device and does not receive a memory release request sent by the other computing device within a preset time period, the memory management module can return a release failure message to the computing device that has sent the memory release request to notify the computing device that the release of the target memory area has not been successful. Or, if the area information received by the memory management module from the first computing device and the second computing device is inconsistent, the memory management module can return a release failure message to the first computing device and the second computing device to notify the first computing device and the second computing device that the release of the target memory area has not been successful.

[0161] Through the above solution, the memory management module can be used to manage the memory areas in the CXL memory device. After the first computing device finishes writing the memory image and the second computing device finishes reading the memory image, the first computing device and the second computing device can apply to the memory management module to release the target memory area, so as to efficiently implement the release process of the target memory area.

[0162] Figure 9 An interaction diagram of the mapping relationship between the deletion identification information and the target memory area provided by an embodiment of the present application is as Figure 9 shown, and the above method further includes steps 910 to 920.

[0163] Step 910, the client hot migration component sends a deletion request to the memory management module.

[0164] In some embodiments, after the memory management module updates the occupancy status of the target memory area from the occupied status to the unoccupied status, the client hot migration component can further call the memory deletion interface of the memory management module to send a deletion request and the identification information corresponding to the target memory area to the memory management module, where the deletion request is used to instruct the memory management module to delete the memory image in the target memory area and return the usage right of the target memory area corresponding to the identification information to the CXL memory device, so that the memory management module can re-partition and allocate the target memory area and make it available for other computing devices to migrate other application programs. Exemplarily, the form of the memory deletion interface can be: delete_blob(const char*oid).

[0165] Step 920, the memory management module responds to the deletion request, deletes the memory image in the target memory area, and returns the usage right of the target memory area.

[0166] In some embodiments, after receiving the deletion request and the identification information corresponding to the target memory area sent by the client hot migration component, the memory management module can look up the target address corresponding to the identification information in the memory information table and delete the identification information, so as to delete the mapping relationship between the identification information and the target memory area; and, the memory management module can delete the memory image in the target memory area.

[0167] Exemplarily, after receiving a deletion request, the memory management module may first determine whether the computing device that sent the deletion request is the computing device that applied to create the target memory area (i.e., the source computing device), and delete the above mapping relationship if the computing device that sent the deletion request is the computing device that applied to create the target memory area; if the computing device that sent the deletion request is not the computing device that applied to create the target memory area, it refuses to delete the target memory area and may send a deletion failure message to the computing device that sent the deletion request.

[0168] In some examples, the memory management module may record the device information (such as device identifiers, etc.) of the computing device that applied to create the target memory area in the memory information table, and after receiving the deletion request and identification information, look up the device information corresponding to the corresponding target memory area in the memory information table based on the identification information, and determine whether the device information corresponding to the computing device that calls the memory deletion interface is consistent with the device information of the target memory area. If they are consistent, it is determined that the computing device that sent the deletion request is the computing device that applied to create the target memory area; if they are inconsistent, it is determined that the computing device that sent the deletion request is not the computing device that applied to create the target memory area.

[0169] Through the above solution, the memory management module can be used to manage the memory areas in the CXL memory device. After the memory management module finishes releasing the target memory area, the first computing device may apply to the memory management module to delete the target memory area, so as to efficiently implement the deletion process of the target memory area.

[0170] Figure 10 The interaction diagram of another application migration method provided by the embodiments of this application is as Figure 10 shown, and this method includes steps 1001 to 1015.

[0171] Step 1001, the client hot migration component calls the memory allocation interface of the memory management module and sends the data size of the memory data of the application to be migrated to the memory management module.

[0172] It can be understood that the specific implementation manner of step 1001 can refer to the descriptions of steps 210 and 310, and will not be elaborated here.

[0173] Step 1002, the memory management module determines a target memory area in the total memory area based on the data size of the memory data and the memory size of the total memory area in the CXL memory device, and determines the area information corresponding to the target memory area.

[0174] It can be understood that the specific implementation manner of step 1002 can refer to the descriptions of steps S220, 320, and 330, and will not be elaborated here.

[0175] Step 1003: The memory management module sends the region information corresponding to the target memory region in the CXL memory device to the client hot migration component.

[0176] It can be understood that the specific implementation method of step 1003 can refer to the description of step 340, which will not be elaborated here.

[0177] Step 1004: The client hot migration component writes the memory image of the application to be migrated into the target memory region based on the region information corresponding to the target memory region.

[0178] It can be understood that the specific implementation method of step 1004 can refer to the descriptions of step S230, step 240, and steps 510 to 530, which will not be elaborated here.

[0179] Step 1005: The client hot migration component sends the region information corresponding to the target memory region to the server hot migration component.

[0180] It can be understood that the specific implementation method of step 1005 can refer to the description of step 610, which will not be elaborated here.

[0181] Step 1006: The server hot migration component calls the memory address acquisition interface of the memory management module and sends identification information to the memory management module.

[0182] It can be understood that the specific implementation method of step 1006 can refer to the description of step 620, which will not be elaborated here.

[0183] Step 1007: The memory management module determines the target address corresponding to the identification information based on the mapping relationship between the identification information and the target memory region.

[0184] It can be understood that the specific implementation method of step 1007 can refer to the description of step 630, which will not be elaborated here.

[0185] Step 1008: The memory management module sends the target address corresponding to the target memory region to the server hot migration component.

[0186] It can be understood that the specific implementation method of step 1008 can refer to the descriptions of step 250 and step 640, which will not be elaborated here.

[0187] Step 1009: The server hot migration component reads the memory image in the target memory region based on the target address corresponding to the target memory region.

[0188] It can be understood that the specific implementation of step 1009 can refer to the descriptions of step 260, step 650, and steps 710 to 720, which will not be elaborated here.

[0189] Step 1010, the server hot migration component performs a recovery process on the memory image.

[0190] It can be understood that the specific implementation of step 1010 can refer to the description of step 270, which will not be elaborated here.

[0191] Step 1011, the client hot migration component calls the memory release interface of the memory management module and sends the region information corresponding to the target memory region.

[0192] It can be understood that the specific implementation of step 1011 can refer to the description of step 810, which will not be elaborated here.

[0193] Step 1012, the server hot migration component calls the memory release interface of the memory management module and sends the region information corresponding to the target memory region.

[0194] It can be understood that the specific implementation of step 1012 can refer to the description of step 820, which will not be elaborated here.

[0195] Step 1013, in response to the memory release interface being called by the first computing device and the second computing device, the memory management module updates the occupancy status of the target memory region from the occupied state to the unoccupied state based on the region information corresponding to the target memory region.

[0196] It can be understood that the specific implementation of step 1013 can refer to the description of step 830, which will not be elaborated here.

[0197] Step 1014, the client hot migration component calls the memory deletion interface of the memory management module and sends the identification information corresponding to the target memory region.

[0198] It can be understood that the specific implementation of step 1014 can refer to the description of step 910, which will not be elaborated here.

[0199] Step 1015, in response to the memory deletion interface being called, the memory management module deletes the mapping relationship between the identification information corresponding to the target memory region and the target memory region.

[0200] It can be understood that the specific implementation of step 1015 can refer to the description of step 920, which will not be elaborated here.

[0201] When applying the technical solution of this application to migrate the application to be migrated in the first computing device to the second computing device, it is only necessary to store the memory image of the application to be migrated in the target memory area of the CXL memory device through the first computing device, and read the memory image from the target memory area of the CXL memory device through the second computing device. Based on the memory sharing ability of the CXL memory device, this application enables different computing devices to access the same CXL memory device. Therefore, when migrating the application to be migrated, there is no need for multiple copies, which can reduce the migration duration of the application program and the read and write operations during the migration process, thereby improving the migration efficiency of the application program. Moreover, by deploying a memory management module in the first computing device or the second computing device, the management of the memory area in the CXL memory device can be realized, which can further improve the migration efficiency of the application program and ensure the reliability of the migration process.

[0202] Figure 11 It is a schematic diagram of a migration device for an application program provided by an embodiment of this application. As Figure 11 shown, the migration device 1100 of the application program is configured in Figure 1 the first computing device shown. The first computing device is connected to the CXL memory device, and the CXL memory device is connected to the second computing device. The migration device 1100 of the application program includes a first acquisition module 1110, a determination module 1120, a writing module 1130, and a first sending module 1140.

[0203] The first acquisition module 1110 is configured to acquire the memory image of the application to be migrated.

[0204] The determination module 1120 is configured to determine the target memory area based on the data size of the memory image.

[0205] Among them, the target memory area is the storage area of the CXL memory device; the target memory area is used to store the memory image.

[0206] The writing module 1130 is configured to write the memory image into the target memory area.

[0207] The first sending module 1140 is configured to send the identification information of the target memory area to the second computing device; so that the second computing device reads the memory image from the target memory area according to the identification information of the target memory area to restore the application to be migrated based on the memory image.

[0208] In some embodiments, the determination module 1120 is specifically configured to: send a memory allocation request; wherein, the memory allocation request is used to indicate the allocation of a target memory area from a CXL memory device; the size of the target memory area is equal to the data size of the memory image; based on the response to the memory allocation request, determine the target memory area; wherein, the response to the memory allocation request includes the identification information of the target memory area.

[0209] In some embodiments, the response to the memory allocation request further includes the target address of the target memory area; the writing module 1130 is specifically configured to: divide the memory image into multiple data blocks; write the multiple data blocks of the memory image into the target memory area based on the target address of the target memory area, so as to reduce the memory bandwidth consumption.

[0210] In some embodiments, the first sending module 1140 is further configured to: send a first memory release request; wherein, the first memory release request is used to indicate the release of the occupancy of the target memory area by the first computing device.

[0211] In some embodiments, the first sending module 1140 is further configured to: send a deletion request; wherein, the deletion request is used to indicate the deletion of the memory image in the target memory area and the return of the usage right of the target memory area.

[0212] Figure 12 FIG. is a schematic diagram of another application migration device provided by an embodiment of the present application. As Figure 12 shown, the application migration device 1200 is configured in Figure 1 the second computing device shown, the second computing device is connected to a CXL memory device, the CXL memory device is connected to a first computing device, and the application migration device 1200 includes a receiving module 1210, a second obtaining module 1220, a reading module 1230 and a restoring module 1240.

[0213] The receiving module 1210 is configured to receive the identification information of the target memory area sent by the first computing device.

[0214] Wherein, the target memory area is used to store the memory image of the application to be migrated.

[0215] The second obtaining module 1220 is configured to obtain the target address of the target memory area based on the identification information of the target memory area.

[0216] The reading module 1230 is configured to read the memory image from the target memory area based on the target address of the target memory area.

[0217] The restoring module 1240 is configured to restore the application to be migrated based on the memory image.

[0218] In some embodiments, the second acquisition module 1220 is specifically configured to: send a memory address acquisition request; wherein, the memory address acquisition request is used to indicate acquiring the target address of the target memory area corresponding to the identification information of the target memory area; determine the target address of the target memory area based on the response to the memory address acquisition request.

[0219] As Figure 12 shown, the migration device 1200 of the application further includes: a second sending module 1250.

[0220] In some embodiments, the second sending module 1250 is configured to: send a second memory release request; wherein, the second memory release request is used to indicate releasing the occupancy of the target memory area by the second computing device.

[0221] Figure 13 This is a schematic diagram of a computing device provided in some embodiments of the present application. In some embodiments, the computing device may be a server, a terminal device, etc. The computing device includes one or more processors and a memory. The memory is configured to: store one or more programs. Wherein, when the one or more programs are executed by the one or more processors, the one or more processors implement the application migration method in the above embodiments.

[0222] As Figure 13 shown, the computing device 1300 includes: a processor 1301 and a memory 1302. Exemplarily, the computing device 1300 may further include: a communications interface 1303 and a communication bus 1304.

[0223] Wherein, the processor 1301, the memory 1302, and the communications interface 1303 communicate with each other through the communication bus 1304. The communications interface 1303 is used to communicate with network elements of other devices such as clients or other servers.

[0224] In some embodiments, the processor 1301 is used to execute the program 1305, and specifically may execute the relevant steps in the above embodiments of the application migration method. Specifically, the program 1305 may include program code, and the program code includes computer-executable instructions.

[0225] Exemplarily, the processor 1301 may be a central processing unit (CPU), or an application specific integrated circuit (ASIC), or one or more integrated circuits configured to implement some embodiments of the present application. One or more processors included in the computing device 1300 may be of the same type of processor, such as one or more CPUs; or may be of different types of processors, such as one or more CPUs and one or more ASICs.

[0226] In some embodiments, the memory 1302 is used to store the program 1305. The memory 1302 may include high-speed RAM memory, and may also include non-volatile memory (NVM), such as at least one disk memory.

[0227] Specifically, the program 1305 can be called by the processor 1301 to cause the computing device 1300 to perform the operation of the application migration method.

[0228] Some embodiments of the present application provide a computer-readable storage medium storing at least one executable instruction, which, when running on the computing device 1300, causes the computing device 1300 to perform the application migration method in the above embodiments.

[0229] The executable instruction can specifically be used to cause the computing device 1300 to perform the operation of the application migration method.

[0230] For example, the computer-readable storage medium may be a read-only memory (ROM), a random access memory (RAM), a compact disc read-only memory (CD-ROM), magnetic tape, floppy disk, and optical data storage device, etc.

[0231] The beneficial effects that can be achieved by the readable storage medium provided in some embodiments of the present application can refer to the beneficial effects in the corresponding application migration method provided above, which will not be elaborated here.

[0232] It should be noted that in the application, relational terms such as first and second are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any actual relationship or order between these entities or operations. Moreover, the terms "comprising", "including" or any other variants thereof are intended to cover non-exclusive inclusion, such that a process, method, article or device comprising a series of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such process, method, article or device. Without further limitation, an element defined by the statement "comprising an..." does not exclude the presence of additional identical elements in the process, method, article or device comprising the element.

[0233] Each embodiment in this specification is described in a related manner. For the same or similar parts among the embodiments, reference can be made to each other, and the differences between each embodiment and other embodiments are emphasized. In particular, for the device embodiments, since they are basically similar to the method embodiments, the description is relatively simple, and for the relevant parts, reference can be made to the description of the method embodiments.

[0234] The logic and / or steps represented in the flowchart or otherwise described herein, for example, can be considered as a sequenced list of executable instructions for implementing logical functions, and can be specifically implemented in any computer-readable medium for use by an instruction execution system, apparatus or device (such as a computer-based system, a system including a processor, or other systems that can fetch and execute instructions from the instruction execution system, apparatus or device), or in conjunction with such instruction execution systems, apparatus or devices.

[0235] For the purposes of this specification, a "computer-readable medium" can be any device that can contain, store, communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus or device.

[0236] More specific examples (non-exhaustive list) of computer-readable media include the following: an electrical connection portion having one or more wirings (electronic device), a portable computer diskette (magnetic device), a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber device, and a portable compact disc read-only memory (CDROM).

[0237] Additionally, a computer-readable medium can even be paper or other suitable media on which a program can be printed, because the program can be obtained electronically, for example, by optically scanning the paper or other media, followed by editing, interpretation, or other suitable processing as necessary, and then stored in a computer memory. It should be understood that the various parts of the present application can be implemented using hardware, software, firmware, or a combination thereof.

[0238] In the above-described embodiments, multiple steps or methods can be implemented using software or firmware stored in a memory and executed by a suitable instruction execution system. For example, if implemented using hardware, as in another embodiment, any one or a combination of the following techniques well known in the art can be used: discrete logic circuits having logic gate circuits for implementing logical functions on data signals, application specific integrated circuits having suitable combinational logic gate circuits, programmable gate arrays (PGAs), field programmable gate arrays (FPGAs), etc.

[0239] The above-described embodiments are only specific embodiments of the present application and are not used to limit the protection scope of the present application. Any modifications, equivalent replacements, improvements, etc. made on the basis of the technical solutions of the present application shall be included within the protection scope of the present application.

Claims

1. A method for migrating an application program, characterized in that Applied to a first computing device; The first computing device is connected to a Compute Express Link (CXL) memory device; The CXL memory device is connected to a second computing device; The method includes: Obtaining a memory image of an application to be migrated; Determining a target memory area based on the data size of the memory image; wherein, the target memory area is a storage area of the CXL memory device; the target memory area is used to store the memory image; Writing the memory image into the target memory area; Sending identification information of the target memory area to the second computing device; so that the second computing device reads the memory image from the target memory area according to the identification information of the target memory area, and restores the application to be migrated based on the memory image.

2. The method according to claim 1, wherein The determining the target memory area based on the data size of the memory image includes: Sending a memory allocation request; wherein, the memory allocation request is used to indicate allocating the target memory area from the CXL memory device; the size of the target memory area is equal to the data size of the memory image; Determining the target memory area based on a response to the memory allocation request; wherein, the response to the memory allocation request includes identification information of the target memory area.

3. The method according to claim 2, wherein The response to the memory allocation request further includes a target address of the target memory area; The writing the memory image into the target memory area includes: Dividing the memory image into a plurality of data blocks; Writing the plurality of data blocks of the memory image into the target memory area based on the target address of the target memory area.

4. The method according to any one of claims 1-3, characterized in that, The method further includes: Sending a first memory release request; wherein, the first memory release request is used to indicate releasing the occupancy of the target memory area by the first computing device.

5. The method according to claim 4, wherein The method further includes: Sending a deletion request; wherein, the deletion request is used to indicate deleting the memory image in the target memory area and returning the usage right of the target memory area.

6. A method for migrating an application program, characterized in that, Applied to a second computing device; The second computing device is connected to a Compute Express Link (CXL) memory device; The CXL memory device is connected to a first computing device; The method includes: Receiving identification information of a target memory area sent by the first computing device; wherein, the target memory area is used to store a memory image of an application to be migrated; Obtaining a target address of the target memory area based on the identification information of the target memory area; Reading the memory image from the target memory area based on the target address of the target memory area; Restoring the application to be migrated based on the memory image.

7. The method according to claim 6, wherein The obtaining the target address of the target memory area based on the identification information of the target memory area includes: Sending a memory address acquisition request; wherein, the memory address acquisition request is used to indicate acquiring the target address of the target memory area corresponding to the identification information of the target memory area; Determining the target address of the target memory area based on a response to the memory address acquisition request.

8. The method according to claim 6 or 7, characterized in that, The method further includes: Send a second memory release request; wherein, the second memory release request is used to indicate releasing the occupancy of the target memory area by the second computing device.

9. A computing device, characterized in that, Including: A memory and a processor; The memory and the processor are coupled; The memory is used to store computer program instructions; The processor is used to execute the computer program instructions so that the computing device executes the application migration method described in any one of claims 1-5 or 6-8.

10. A computing system, characterized in that, The computing system includes a first computing device, a second computing device, and a Compute Express Link (CXL) memory device; Wherein, the first computing device and the second computing device are respectively connected to the CXL memory device; The first computing device and / or the second computing device is the computing device described in claim 9.

11. The computing system according to claim 10, wherein The CXL memory device includes a CXL multi-head controller or a CXL switching device.