Process migration method and device
By downgrading physical pages to the CXL memory pool and rebuilding the virtual address space on the target node, the problem of high data movement overhead in task migration is solved, efficient process migration is achieved, and the load balancing and fault tolerance rate of the data center are improved.
Patent Information
- Application Number
- CN202410881769.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-02
- Publication Date
- 2024-10-01
AI Technical Summary
Existing task migration technology has problems such as high data movement overhead, load imbalance and performance bottlenecks during data transmission, especially in high-performance computing and artificial intelligence applications.
Process migration is achieved by downgrading the physical pages of the source node to the CXL memory pool, rebuilding the virtual address space on the target node, and using the shared CXL memory pool for mapping to avoid moving data directly to the target node.
It reduces the amount of data movement, improves the performance of process migration, reduces migration overhead, and improves the load balancing and fault tolerance rate of the data center.
Smart Images

Figure CN118733231A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of data migration, and more specifically, to a process migration method and device. Background Art
[0002] High-Performance Computing (HPC) and Artificial Intelligence (AI) applications require large-scale data center computing systems. Task migration technology refers to the process of transferring the state of a running application to a remote node, which must continue to run the application correctly with minimal downtime. This technology can avoid load imbalance and performance bottlenecks by dynamically adjusting task locations, and is crucial to achieving load balancing, fault tolerance, and high utilization in data centers.
[0003] The current mainstream migration technologies include: system-level migration and process-level migration.
[0004] In system-level migration technology, the complete virtual memory or container snapshot (including all virtual resources) of the source node needs to be saved to a snapshot file first, then transferred to the target node, and then fully read and loaded; the same problem exists in process-level migration technology. The host status and data as well as the accelerator data need to be completely unloaded, transferred and loaded.
[0005] In addition, both require long-distance data transmission and multiple IO transmissions, which brings huge overhead to the migration operation. For example, in the traditional IO-based architecture, data needs to be transferred to the memory first, then written to the disk, transmitted to the target node through the network card, and then read and loaded into the memory to gradually achieve migration. In addition, for task migration using the memory pool, although IO transmission is reduced, there is repeated data movement in the memory pool.
[0006] Therefore, there is an urgent need for a method and apparatus that can reduce data movement to improve process migration performance. Summary of the invention
[0007] The object of the present invention is to provide a process migration method and device to at least solve the above-mentioned problems in the related art, or not to solve any of the above-mentioned problems.
[0008] According to an exemplary embodiment of the present invention, on one hand, a process migration method is provided, comprising: demoting a physical page in a local memory of a source node corresponding to the process to a physical page of a CXL memory pool, wherein the physical page in the CXL memory pool has a first physical address, wherein the first physical address is based on a physical address encoding rule of the source node; reconstructing a second virtual address space corresponding to a first virtual address space of the source node corresponding to the process at a target node; determining a second physical address of the physical page in the CXL memory pool, wherein the second physical address is based on a physical address encoding rule of the target node; and mapping the second virtual address space to the second physical address, wherein the CXL memory pool is shared by the source node and the target node.
[0009] According to an embodiment of the present disclosure, by mapping the second virtual address space with the second physical address, the migration process can be executed without moving data in the CXL memory pool to the target node.
[0010] Optionally, the method further includes: splitting the virtual memory area of the source node corresponding to the process into virtual pages; and identifying the physical page in the local memory corresponding to the virtual page based on the first page table of the source node corresponding to the process.
[0011] Optionally, the method further comprises: sending metadata of the process of the source node to the target node, and wherein the step of rebuilding the second virtual address space at the target node comprises: rebuilding the second virtual address space at the target node based on the metadata.
[0012] Optionally, the second virtual address space includes virtual memory information and does not include physical page allocation information.
[0013] Optionally, the method further comprises: sending information about the first physical address to the target node, and wherein the step of determining the second physical address comprises: determining the second physical address based on the information about the first physical address and the physical address encoding rule of the target node.
[0014] Optionally, the information about the first physical address indicates a relative offset of the first physical address relative to an address of the CXL memory pool.
[0015] Optionally, the step of mapping the second virtual address space with the second physical address includes: establishing a second page table corresponding to the process at the target node, and achieving mapping of the second virtual address space with the second physical address by filling the second physical address into the second page table.
[0016] Optionally, the method further includes: determining whether to upgrade the physical page in the CXL memory to a local memory of the target node according to a frequency at which the physical page is accessed.
[0017] Optionally, the method further comprises: in response to determining that an access frequency of one of the physical pages exceeds a threshold, promoting the one physical page from the CXL memory pool to a local memory of the target node.
[0018] According to an embodiment of the present disclosure, the performance of a process may be improved by upgrading hot pages to a local memory of a node.
[0019] According to another aspect of an embodiment of the present disclosure, a process migration device is provided, including: a source node, configured to downgrade a physical page in a local memory of the source node corresponding to the process to a physical page of a CXL memory pool, wherein the physical page in the CXL memory pool has a first physical address, wherein the first physical address is based on a physical address encoding rule of the source node; a target node, configured to: rebuild a second virtual address space corresponding to a first virtual address space of the source node corresponding to the process at the target node, determine a second physical address of the physical page in the CXL memory pool, wherein the second physical address is based on the physical address encoding rule of the target node, and map the second virtual address space to the second physical address, wherein the CXL memory pool is shared by the source node and the target node.
[0020] Optionally, the source node is further configured to: split the virtual memory area of the source node corresponding to the process into virtual pages; and identify the physical page in the local memory corresponding to the virtual page based on the first page table of the source node corresponding to the process.
[0021] Optionally, the source node is further configured to: send meta information of the process of the source node to the target node, and wherein the target node is configured to: rebuild the second virtual address space at the target node based on the meta information.
[0022] Optionally, the second virtual address space includes virtual memory information but does not include physical page allocation information.
[0023] Optionally, the source node is further configured to: send information about the first physical address to the target node, and wherein the target node is configured to: determine the second physical address based on the information about the first physical address and the physical address encoding rule of the target node.
[0024] Optionally, the information about the first physical address indicates a relative offset of the first physical address relative to an address of the CXL memory pool.
[0025] Optionally, the target node is configured to: establish a second page table corresponding to the process at the target node; and implement mapping between the second virtual address space and the second physical address by filling the second physical address into the second page table.
[0026] Optionally, the target node is further configured to: determine whether to upgrade the physical page in the CXL memory to the local memory of the target node according to the frequency at which the physical page is accessed.
[0027] Optionally, the target node is further configured to: in response to determining that an access frequency of one of the physical pages exceeds a threshold, upgrade the one physical page from the CXL memory pool to a local memory of the target node.
[0028] According to another aspect of an embodiment of the present disclosure, a computer-readable storage medium storing a computer program is provided, wherein when the computer program is executed by a processor, the processor is enabled to implement the process migration method as described herein. BRIEF DESCRIPTION OF THE DRAWINGS
[0029] The above and other objects and features of the present invention will become more apparent from the following description in conjunction with the accompanying drawings which exemplarily illustrate embodiments, in which:
[0030] Figure 1 A flowchart of a process migration method according to an embodiment of the present disclosure is shown;
[0031] Figure 2 A schematic diagram showing a process of downgrading a physical page of a source node to a physical page in a CXL memory pool according to an embodiment of the present disclosure;
[0032] Figure 3 is a schematic diagram of creating a second virtual address space according to an embodiment of the present disclosure;
[0033] Figure 4 A schematic diagram showing a process of implementing mapping of a second physical address to a second virtual address space according to an embodiment of the present disclosure is shown;
[0034] Figure 5 is a schematic diagram of a process of promoting a page to a CXL memory pool according to the hotness or coldness of the page according to an embodiment of the present disclosure;
[0035] Figure 6 An overall architecture diagram of a process migration process according to an embodiment of the present disclosure is shown; and
[0036] Figure 7 A block diagram showing the structure of a process migration apparatus according to an embodiment of the present disclosure. DETAILED DESCRIPTION
[0037] Hereinafter, various embodiments of the present disclosure are described with reference to the accompanying drawings, wherein the same reference numerals are used to represent the same or similar elements, features and structures. However, it is not intended that the present disclosure be limited to specific embodiments by the various embodiments described herein, and it is intended that: the present disclosure covers all modifications, equivalents and / or substitutes of the present disclosure, as long as they are within the scope of the attached claims and their equivalents. The terms and words used in the following specification and claims are not limited to their dictionary meanings, but are only used to enable a clear and consistent understanding of the present disclosure. Therefore, it should be apparent to those skilled in the art that the following description of various embodiments of the present disclosure is provided for illustrative purposes only, and not for the purpose of limiting the present disclosure defined by the attached claims and their equivalents.
[0038] It should be understood that the singular includes the plural unless the context clearly indicates otherwise.The terms "include", "comprising" and "having" used herein indicate the presence of disclosed functions, operations or elements, but do not exclude other functions, operations or elements.
[0039] For example, the expression "A or B" or "at least one of A and / or B" may indicate A and B, A or B. For example, the expression "A or B" or "at least one of A and / or B" may indicate (1) A, (2) B, or (3) both A and B.
[0040] In various embodiments of the present disclosure, it is intended that when a component (e.g., a first component) is referred to as being "coupled" or "connected" to another component (e.g., a second component) or being "coupled" or "connected" to another component (e.g., the second component), the component may be directly connected to the other component or may be connected through another component (e.g., a third component). In contrast, when a component (e.g., a first component) is referred to as being "directly coupled" or "directly connected" to another component (e.g., the second component) or being directly coupled to or directly connected to another component (e.g., the second component), there is no other component (e.g., the third component) between the component and the other component.
[0041] The expression "configured to" used in describing various embodiments of the present disclosure may be used interchangeably with expressions such as "suitable for", "having the ability to", "designed to", "suitable for", "manufactured to", and "capable of", for example, depending on the circumstances. The term "configured to" may not necessarily indicate that it is "specially designed to" in terms of hardware. On the contrary, the expression "a device configured to..." in some cases may indicate that the device and another device or part "can..." For example, the expression "a processor configured to perform A, B, and C" may indicate a dedicated processor (e.g., an embedded processor) for performing the corresponding operations or a general-purpose processor (e.g., a central processing unit CPU or an application processor (AP)) for performing the corresponding operations by executing at least one software program stored in a memory device.
[0042] The terms used herein are to describe certain embodiments of the present disclosure, but are not intended to limit the scope of other embodiments. Unless otherwise noted herein, all terms used herein (including technical or scientific terms) may have the same meaning as those generally understood by those skilled in the art. Typically, the terms defined in the dictionary should be considered to have the same meaning as the contextual meaning in the relevant field, and, unless clearly defined herein, should not be understood differently or understood to have an overly formal meaning. In any case, the terms defined in the present disclosure are not intended to be interpreted as excluding embodiments of the present disclosure.
[0043] In order to improve the computing performance of large-scale data center computing systems, task migration technology is needed to achieve load balancing in data centers, improve fault tolerance and equipment utilization.
[0044] The current mainstream migration technologies are mainly divided into two directions:
[0045] Process-level migration
[0046] This method implements transparent snapshots and IO (Input / Output) transfers, both of which require saving and transmitting the states of the host and accelerator. For snapshots and IO transfers for specific applications (such as PyTorch), only the data used for calculation needs to be saved.
[0047] System-level migration
[0048] This method uses containers and IO transfers. The container usually contains the running environment of the process; or virtual memory snapshots and IO transfers. The virtual memory snapshot usually includes the operating system, virtual hardware and the running environment.
[0049] However, the above two methods require complete data loading, unloading and transmission, which is time-consuming and requires long-distance data transmission and multiple IO transmissions, which brings huge overhead to the migration operation.
[0050] Figure 1 A flowchart of a process migration method according to an embodiment of the present disclosure is shown.
[0051] Reference Figure 1 In step S101, a physical page in a local memory (hereinafter referred to as a first local memory) of a source node corresponding to the process is downgraded to a physical page of a CXL memory pool, wherein the physical page in the CXL memory pool has a first physical address, wherein the first physical address is based on a physical address encoding rule of the source node. As an example, Figure 1 The method shown also includes: splitting the virtual memory area of the source node corresponding to the process into virtual pages; identifying the physical page in the local memory corresponding to the virtual page based on the first page table (Page Table, PT) of the source node corresponding to the process.
[0052] As an example, the downgrade operation may be triggered based on receiving a process migration request.
[0053] As understood by those skilled in the art, downgrading has the same or similar meaning as migrating or moving.
[0054] The physical pages in the local memory of the source node corresponding to the process (hereinafter referred to as the first local memory) indicate the physical pages in the local memory of the source node used by the process when the process runs on the source node.
[0055] For example, demoting a physical page to a physical page in the CXL memory pool indicates that data in the physical page in the local memory is migrated to an unused physical page in the CXL memory pool, and at the same time, the physical page in the local memory becomes an unused physical page.
[0056] As those skilled in the art understand, a virtual page may or may not have a corresponding physical page in the local memory. When a virtual page has a corresponding physical page, it means that the page is frequently accessed during the execution of the process (because frequently accessed pages are generally stored in the local memory), and therefore, it can be called a hot page, otherwise, it can be called a cold page. That is, the hotness of a page depends on the frequency of access to the page.
[0057] The CXL memory pool described herein has higher bandwidth and lower latency than IO and is shared by all nodes (eg, source nodes and destination nodes).
[0058] Figure 2 A schematic diagram showing a process of demoting a physical page of a source node to a physical page in a CXL memory pool according to an embodiment of the present disclosure is shown.
[0059] Reference Figure 2, the source node can perform active hot data unloading operations through the memory unloading module to achieve the downgrade operation. Specifically, in step ①, the virtual memory area is split to obtain virtual pages. In step ②, the physical page in the local memory (e.g., local DRAM) corresponding to the virtual page is determined based on the page table (PT). In step ③, the physical page (data in) in the local memory is downgraded to the CXL memory pool.
[0060] As understood by those skilled in the art, the page table contains the correspondence between virtual pages and physical pages.
[0061] As an example, Figure 1 The method further includes: automatically downgrading cold pages of the local memory to physical pages of the CXL memory pool.
[0062] As those skilled in the art will appreciate, during the execution of a process, the hot and cold characteristics of data may change. When hot data in the local memory becomes cold data, the cold data is demoted to the CXL memory pool, which can increase the remaining storage space of the local memory for storing other hot data. In addition, when performing migration, the amount of data moved from the local memory to the CXL memory pool can also be reduced.
[0063] For example, if the data in a physical page in the local memory has become cold data, if the cold data has not been migrated to the CXL memory pool before migration, the cold data needs to be downgraded to the CXL memory pool when the process migration is performed. If the cold data has been downgraded to the CXL memory pool before the process migration is performed, there is no need to perform the downgrade operation on the cold data when the process migration is performed.
[0064] Return to reference Figure 1 In step S102, a second virtual address space corresponding to the first virtual address space of the source node corresponding to the process is rebuilt at the target node.
[0065] As an example, Figure 1 The method shown may also include: sending meta information of the process of the source node or meta information of the first virtual address space to the target node.
[0066] As an example, the meta information may include parameters such as the start address (start_addr), size (size), permission (permission), access flag (access_flag), offset (offset) and the like of the first virtual address space.
[0067] As an example, the step of rebuilding the second virtual address space at the target node includes: rebuilding the second virtual address space at the target node based on the meta information.
[0068] As an example, the second virtual address space includes virtual memory information and does not include physical page allocation information.
[0069] Figure 3 FIG. 4 is a schematic diagram of creating a second virtual address space according to an embodiment of the present disclosure.
[0070] Reference Figure 3 , metadata of the first virtual address space is sent to a target node, and the target node clones the first virtual address space based on the received metadata to obtain a second virtual address space.
[0071] As those skilled in the art will appreciate, the second virtual address space established at this time is not allocated physical pages, and therefore only contains virtual memory information. The process of allocating physical pages to the second virtual address space will be described later.
[0072] In step S103, a second physical address of the physical page in the CXL memory pool is determined, wherein the second physical address is based on a physical address encoding rule of the target node.
[0073] As those skilled in the art will appreciate, the source node has a first physical address encoding rule for the local memory and the CXL memory pool, and the target node has a second physical address encoding rule for the local memory and the CXL memory pool.
[0074] As an example, assuming that the first local memory has 4 storage units and the CXL memory pool has 100 storage units, the source node may encode the physical address of the first local memory as 1, 2, 3, 4, and the physical address of the CXL memory pool as 5, 6, ..., 104. Assuming that the second local memory has 3 storage units, the target node may encode the physical address of the second local memory as 1, 2, 3, and the physical address of the CXL memory pool as 4, 6, ..., 103.
[0075] Obviously, for the same data in the CXL memory pool, the physical address of the data in the source node system is different from the physical address of the data in the target node system.
[0076] Those skilled in the art should understand that the above examples are only for schematically explaining the difference in physical address encoding between the source node and the target node, and do not limit the present disclosure.
[0077] As described above, the physical address encoding rule of the source node is different from the physical address encoding rule of the target node. Therefore, it is necessary to re-determine the physical encoding address of the physical page demoted to the XCL memory pool in the target node.
[0078] As an example, Figure 1The illustrated method may further include sending information about the first physical address to the target node, and wherein the step of determining the second physical address includes determining the second physical address based on the information about the first physical address and the physical address encoding rule of the target node.
[0079] As an example, the information about the first physical address indicates a relative offset of the first physical address relative to the address of the XCL memory pool. For example, the addresses of the three physical pages in the CXL memory pool are 5, 6, and 7 based on the first physical address encoding rule, and the relative addresses of the addresses relative to the physical address of the CXL memory pool are 1, 2, and 3. The target node may encode the addresses of the three physical pages in the CXL memory pool as 4, 5, and 6 based on the relative addresses.
[0080] As an example, the information about the first physical address may include the first physical address and a first physical address encoding rule.
[0081] As an example, the information about the first physical address may be used by the target node to determine the information about the second physical address. For example, the information may be determined based on the first physical address and the first physical coding rule.
[0082] In step S104, the second virtual address space is mapped to the second physical address.
[0083] After mapping the second virtual address space to the second physical address, the process may continue to be executed on the target node.
[0084] As an example, the step of mapping the second virtual address space to the second physical address includes: establishing a second page table corresponding to the process at the target node; and
[0085] The mapping between the second virtual address space and the second physical address is achieved by filling the second physical address into the second page table.
[0086] Return to reference Figure 3 , a second page table (ie, the page table in the target node) may be established while establishing the second virtual space.
[0087] As understood by those skilled in the art, the populated second page table includes a correspondence between the second virtual address space and the local memory of the target node and / or the physical pages of the CXL memory pool.
[0088] Figure 4 A schematic diagram of a process for implementing mapping of a second physical address to a second virtual address space according to an embodiment of the present disclosure is shown.
[0089] Reference Figure 4In step (1), information about the first physical address (which may be referred to as an intermediate physical address (IPA), for example, the relative address described above) may be obtained through the intermediate address conversion module and transmitted to the target node.
[0090] As understood by those skilled in the art, in the process of physical address conversion, the physical addresses before and after the conversion correspond to the same virtual address (VA).
[0091] In step (2), the target node may utilize a page table entry (PTE) remapping module to obtain a second physical address (ie, a new physical address) based on the intermediate physical address and the physical memory information of the target node.
[0092] In step (3), the target node may use the PTE remapping module to fill the second physical address into the page table established by the target node.
[0093] According to the embodiments of the present disclosure, the physical pages in the CXL memory pool are directly injected into the virtual address space of the migration process. Therefore, when the target node executes the process, it is not necessary to upgrade the physical pages in the CXL memory pool to the local memory of the target node. According to the prior art, the data in the CXL memory needs to be loaded into the local memory of the target node to complete the process migration. Obviously, the technical solution of the present disclosure can move less data.
[0094] Furthermore, according to the embodiments of the present disclosure, since the cold pages in the local memory are destaged, the amount of data movement from the local memory to the CXL memory pool can be reduced when performing a migration operation.
[0095] As an example, Figure 1 The method may further include: determining whether to upgrade the physical page in the CXL memory to a local memory of a target node according to a frequency at which the physical page is accessed.
[0096] As an example, Figure 1 The illustrated method may further include: in response to determining that an access frequency of one of the physical pages exceeds a threshold, promoting the one physical page from the CXL memory pool to a local memory of the target node.
[0097] Figure 5 FIG. 4 is a schematic diagram of a process of promoting pages to a CXL memory pool according to the hotness or coldness of the pages according to an embodiment of the present disclosure.
[0098] Reference Figure 5At the beginning, all data is located in the physical pages of the CXL memory pool. As the pages in the CXL memory pool become hot one by one, the hot pages are promoted to the physical pages of the local memory of the node (e.g., the source node before the migration operation, the target node after the migration operation is completed).
[0099] Figure 6 The overall architecture diagram of the process migration process according to an embodiment of the present disclosure is shown.
[0100] Reference Figure 6 ,This architecture consists of three main components: the virtual address space sharing part, the ,cross-node physical address management part and the memory ,layering system.
[0101] As an example, Figure 6 One of the two user process spaces in may correspond to the source node, and the other may correspond to the target node.
[0102] Virtual address space sharing is mainly used to intercept, manage and record all memory requests related to the process, and then clone the virtual address space on the target node.
[0103] Cross-node physical address management can utilize a memory (e.g., DRAM) offload module to perform identification and migration of pages in local memory, a physical address translation module to perform physical address translation of shared pages in a memory pool, and a PTE remapping module to remap new physical addresses to the cloned virtual space in a target node.
[0104] The memory tiering system can unload / load local pages to / from the CXL memory pool.
[0105] Through the above layers, all unnecessary data movement during task migration is eliminated as much as possible.
[0106] Refer to the above reference Figures 1 to 6 The process migration method according to the embodiment of the present disclosure is described. Figure 7 The process migration apparatus and computer-readable storage medium according to the embodiments of the present disclosure are described.
[0107] Figure 7 A block diagram showing the structure of a process migration apparatus 700 according to an embodiment of the present disclosure is shown.
[0108] Reference Figure 5 , the process migration device 700 may include a source node 701 and a target node 702.
[0109] Those skilled in the art should understand that the process migration apparatus 700 may further include other components, and at least one of the components included in the process migration apparatus 700 may be combined or split.
[0110] As an example, the source node 501 may be configured to downgrade a physical page in a local memory of the source node corresponding to the process to a physical page of a CXL memory pool, wherein the physical page in the CXL memory pool has a first physical address, wherein the first physical address is based on a physical address encoding rule of the source node.
[0111] As an example, the target node 502 may be configured to: reconstruct at the target node a second virtual address space corresponding to a first virtual address space of the source node corresponding to the process, determine a second physical address of the physical page in the CXL memory pool, wherein the second physical address is based on a physical address encoding rule of the target node, and map the second virtual address space to the second physical address, wherein the CXL memory pool is shared by the source node and the target node.
[0112] As an example, the source node 501 can also be configured to: split the virtual memory area of the source node corresponding to the process into virtual pages; and identify the physical page in the local memory corresponding to the virtual page based on the first page table of the source node corresponding to the process.
[0113] As an example, the source node 501 may also be configured to: send metadata of the process of the source node to the target node, and wherein the target node 502 may also be configured to: rebuild the second virtual address space at the target node based on the metadata.
[0114] As an example, the second virtual address space includes virtual memory information and does not include physical page allocation information.
[0115] As an example, the source node 501 may also be configured to send information about the first physical address to the target node, and wherein the target node 502 may also be configured to determine the second physical address based on the information about the first physical address and the physical address encoding rule of the target node.
[0116] As an example, the information about the first physical address indicates a relative offset of the first physical address with respect to an address of the CXL memory pool.
[0117] As an example, the target node 502 may be configured to: establish a second page table corresponding to the process at the target node; and implement mapping between the second virtual address space and the second physical address by filling the second physical address into the second page table.
[0118] As an example, the target node 502 may be further configured to determine whether to upgrade the physical page in the CXL memory to the local memory of the target node according to the access frequency of the physical page.
[0119] As an example, the target node 502 may be further configured to: in response to determining that the access frequency of one of the physical pages exceeds a threshold, promote the one physical page from the CXL memory pool to the local memory of the target node.
[0120] According to another aspect of an embodiment of the present disclosure, a computer-readable storage medium storing a computer program is provided, wherein when the computer program is executed by a processor, the processor implements the process migration method as described herein. Examples of computer-readable storage media include: read-only memory (ROM), random access programmable read-only memory (PROM), electrically erasable programmable read-only memory (EEPROM), random access memory (RAM), dynamic random access memory (DRAM), static random access memory (SRAM), flash memory, non-volatile memory, CD-ROM, CD-R, CD+R, CD-RW, CD+RW, DVD-ROM, DVD-R, DVD+R, DVD-RW, DVD+RW, DVD-RAM, BD-ROM, BD-R, BD-R LTH, BD-RE, Blu-ray or optical disk storage, hard disk drive (HDD), solid state drive (SSD), card storage (such as, multimedia card, secure digital (SD) card or extreme digital (XD) card), magnetic tape, floppy disk, magneto-optical data storage device, optical data storage device, hard disk, solid state disk and any other device, any other device is configured to store computer programs and any associated data, data files and data structures in a non-transitory manner and provide the computer programs and any associated data, data files and data structures to a processor or computer so that the processor or computer can execute the computer program. The computer program in the above-mentioned computer-readable storage medium can be run in an environment deployed in a computer device such as a client, a host, an agent device, a server, etc. In addition, in one example, the computer program and any associated data, data files and data structures are distributed on a networked computer system, so that the computer program and any associated data, data files and data structures are stored, accessed and executed in a distributed manner by one or more processors or computers.
[0121] According to an embodiment of the present disclosure, a computer program product may also be provided, and instructions in the computer program product may be executed by a processor of a computer device to complete the process migration method described herein.
[0122] Those skilled in the art will readily appreciate other embodiments of the present disclosure after considering the specification and practicing the invention disclosed herein. This application is intended to cover any variations, uses or adaptations of the present disclosure, which follow the general principles of the present disclosure and include common knowledge or customary techniques in the art that are not disclosed in the present disclosure. The specification and examples are intended to be exemplary only, and the true scope and spirit of the present disclosure are included in the appended claims.
Claims
1. A process migration method, include: Demoting a physical page in a local memory of a source node corresponding to the process to a physical page of a CXL memory pool, wherein the physical page in the CXL memory pool has a first physical address, wherein the first physical address is based on a physical address encoding rule of the source node; Reconstructing, at the target node, a second virtual address space corresponding to the first virtual address space of the source node corresponding to the process; determining a second physical address of the physical page in the CXL memory pool, wherein the second physical address is based on a physical address encoding rule of the target node; and Mapping the second virtual address space to the second physical address, The CXL memory pool is shared by the source node and the target node.
2. The method according to claim 2, further comprising: include: Splitting a virtual memory area of the source node corresponding to the process into virtual pages; as well as The physical page in the local memory corresponding to the virtual page is identified based on a first page table of the source node corresponding to the process.
3. The method according to claim 1, further comprising: include: sending meta information of the process of the source node to the target node, and in, The step of reconstructing the second virtual address space at the target node comprises: A second virtual address space is rebuilt at the target node based on the meta information.
4. The method of claim 3, wherein the second virtual address space includes virtual memory information and does not include physical page allocation information.
5. The method according to claim 1, further comprising: include: sending information about the first physical address to the target node, and The step of determining the second physical address includes: A second physical address is determined based on the information about the first physical address and the physical address encoding rule of the target node.
6. The method according to claim 5, in, The information about the first physical address indicates a relative offset of the first physical address with respect to an address of the CXL memory pool.
7. The method of claim 1, wherein the step of mapping the second virtual address space to the second physical address include: Establishing a second page table corresponding to the process at the target node; as well as The mapping between the second virtual address space and the second physical address is achieved by filling the second physical address into the second page table.
8. The method of claim 1, further comprising: include: Whether to upgrade the physical page in the CXL memory to the local memory of the target node is determined according to the access frequency of the physical page.
9. The method according to claim 8, further comprising: include: In response to determining that an access frequency of one of the physical pages exceeds a threshold, the one physical page is promoted from the CXL memory pool to a local memory of the target node.
10. A process migration device, include: a source node configured to downgrade a physical page in a local memory of the source node corresponding to the process to a physical page of a CXL memory pool, wherein the physical page in the CXL memory pool has a first physical address, wherein the first physical address is based on a physical address encoding rule of the source node; The target node is configured to: reconstruct a second virtual address space corresponding to the first virtual address space of the source node corresponding to the process at the target node, determine a second physical address of the physical page in the CXL memory pool, wherein the second physical address is based on a physical address encoding rule of the target node, and map the second virtual address space to the second physical address, wherein the CXL memory pool is shared by the source node and the target node.
11. A computer-readable storage medium storing a computer program, in, When the computer program is executed by a processor, the processor is enabled to implement the process migration method according to any one of claims 1 to 9.
