Dirty page migration method, dirty page migration device, electronic equipment, medium and product

By predicting storage access to the task execution data of the source virtual machine and determining the priority of storage page transfer, the problem of repeated transfer of dirty pages during virtual machine migration is solved, and a more efficient migration process is achieved.

CN122173207APending Publication Date: 2026-06-09MOORE THREADS TECHNOLOGY (SHANGHAI) CO LTD

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
MOORE THREADS TECHNOLOGY (SHANGHAI) CO LTD
Filing Date
2026-05-11
Publication Date
2026-06-09

AI Technical Summary

Technical Problem

During virtual machine migration, existing technologies may modify previously transferred storage pages into dirty pages, requiring repeated transfers, increasing network overhead, and extending migration time. This is because dirty pages are not effectively managed, and the impact of virtual machine memory access behavior on storage page migration is not considered.

Method used

By acquiring task execution data from the source virtual machine, storage access prediction is performed to determine the transfer priority of storage pages. Based on this priority, storage pages are migrated to the target virtual machine, reducing repeated transfers of dirty data.

Benefits of technology

It reduced network overhead, improved virtual machine migration efficiency, and reduced migration time.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122173207A_ABST
    Figure CN122173207A_ABST
Patent Text Reader

Abstract

The present disclosure provides a dirty page migration method, a dirty page migration device, an electronic device, a medium and a product, and belongs to the technical field of virtual machines. The method comprises: obtaining task execution data of a source virtual machine, the task execution data being used to represent information of a target task currently executed by the source virtual machine; performing storage access prediction on the task execution data to obtain storage access prediction data of the source virtual machine; determining storage page transmission priorities according to the storage access prediction data, the storage page transmission priorities being used to represent transmission priorities of each storage page in the source virtual machine; and migrating a plurality of storage pages of the source virtual machine to a target virtual machine based on the storage page transmission priorities. The embodiments of the present disclosure can reduce repeated transmission of dirty data, reduce network overhead, and improve migration efficiency.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This disclosure relates to the field of virtual machine technology, and in particular to a dirty page migration method, dirty page migration device, electronic device, computer-readable storage medium, and computer program product. Background Technology

[0002] In virtualized environments, virtual machine migration is a crucial technology for achieving load balancing, fault recovery, and resource optimization. One related technology involves transferring storage pages between the source and target virtual machines using a pre-copy migration method. However, the pre-copy method typically employs a multi-round iterative approach to transfer storage pages. Therefore, during the migration process, already transferred storage pages may be modified again (becoming dirty pages), requiring repeated transfers in subsequent rounds, increasing network overhead, and extending migration time. Summary of the Invention

[0003] This disclosure provides a dirty page migration method, a dirty page migration apparatus, an electronic device, a computer-readable storage medium, and a computer program product.

[0004] In a first aspect, this disclosure provides a dirty page migration method, which includes: acquiring task execution data of a source virtual machine, the task execution data being used to characterize information about a target task currently being executed by the source virtual machine; performing storage access prediction on the task execution data to obtain storage access prediction data of the source virtual machine, the storage access prediction being used to characterize the prediction of access behavior to the storage space of the source virtual machine; determining storage page transfer priorities based on the storage access prediction data, the storage page transfer priorities being used to characterize the transfer priority of each storage page in the source virtual machine; and migrating multiple storage pages of the source virtual machine to a target virtual machine based on the storage page transfer priorities.

[0005] Secondly, this disclosure provides a dirty page migration apparatus, comprising: an acquisition module for acquiring task execution data of a source virtual machine, the task execution data being used to characterize information about a target task currently being executed by the source virtual machine; a prediction module for performing storage access prediction on the task execution data to obtain storage access prediction data of the source virtual machine, the storage access prediction being used to characterize the prediction of access behavior to the storage space of the source virtual machine; a determination module for determining storage page transfer priorities based on the storage access prediction data, the storage page transfer priorities being used to characterize the transfer priority of each storage page in the source virtual machine; and a migration module for migrating multiple storage pages of the source virtual machine to a target virtual machine based on the storage page transfer priorities.

[0006] Thirdly, this disclosure provides an electronic device comprising: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores one or more computer programs executable by the at least one processor, the one or more computer programs being executed by the at least one processor to enable the at least one processor to perform the dirty page migration method described above.

[0007] Fourthly, this disclosure provides a computer-readable storage medium having a computer program stored thereon, wherein the computer program, when executed by a processor, implements the aforementioned dirty page migration method.

[0008] Fifthly, this disclosure provides a computer program product comprising computer-readable code, or a non-volatile computer-readable storage medium carrying computer-readable code, wherein when the computer-readable code is executed in a processor of an electronic device, the processor in the electronic device performs the dirty page migration method described above.

[0009] The dirty page migration method provided in this disclosure, targeting virtual machine migration scenarios, predicts the storage access behavior of the source virtual machine during the migration phase using task execution data from the source virtual machine side when performing storage page migration from the source virtual machine to the target virtual machine. This yields corresponding storage access prediction data, which characterizes the possible memory access behavior of each storage page within the source virtual machine during the migration process. Based on this data, the transmission priority of each storage page can be determined, prioritizing the transmission of storage pages in areas with low memory access behavior to the target virtual machine. This minimizes repeated transmission of dirty data, reduces network overhead, and improves migration efficiency.

[0010] It should be understood that the description in this section is not intended to identify key or essential features of the embodiments of this disclosure, nor is it intended to limit the scope of this disclosure. Other features of this disclosure will become readily apparent from the following description. Attached Figure Description

[0011] The accompanying drawings are provided to further illustrate the present disclosure and form part of the specification. They are used together with the embodiments of the present disclosure to explain the disclosure and do not constitute a limitation thereof. The above and other features and advantages will become more apparent to those skilled in the art from the detailed example embodiments described below with reference to the accompanying drawings.

[0012] Figure 1 This is a flowchart of a dirty page migration method provided in an embodiment of the present disclosure.

[0013] Figure 2This is a flowchart illustrating a dirty page migration method provided in an embodiment of this disclosure.

[0014] Figure 3 This is a block diagram of a dirty page migration device provided in an embodiment of the present disclosure.

[0015] Figure 4 This is a block diagram of an electronic device provided in an embodiment of the present disclosure.

[0016] Figure 5 A block diagram of another electronic device provided in an embodiment of this disclosure. Detailed Implementation

[0017] To enable those skilled in the art to better understand the technical solutions of this disclosure, exemplary embodiments of this disclosure are described below with reference to the accompanying drawings, including various details of the embodiments of this disclosure to aid understanding. These should be considered merely exemplary. Therefore, those skilled in the art should recognize that various changes and modifications can be made to the embodiments described herein without departing from the scope and spirit of this disclosure. Similarly, for clarity and conciseness, descriptions of well-known functions and structures are omitted in the following description.

[0018] Where there is no conflict, the various embodiments of this disclosure and the features thereof in the embodiments may be combined with each other.

[0019] As used herein, the term “and / or” includes any and all combinations of one or more related enumerated entries.

[0020] The terminology used herein is for the purpose of describing particular embodiments only and is not intended to limit this disclosure. As used herein, the singular forms “a” and “the” are intended to include the plural forms as well, unless the context clearly indicates otherwise. It will also be understood that when the terms “comprising” and / or “made of” are used in this specification, the presence of the stated feature, integral, step, operation, element, and / or component is specified, but the presence or addition of one or more other features, integrals, steps, operations, elements, components, and / or groups thereof is not excluded. Words such as “connected” or “linked” are not limited to physical or mechanical connections but can include electrical connections, whether direct or indirect.

[0021] Unless otherwise specified, all terms used herein (including technical and scientific terms) have the same meaning as commonly understood by one of ordinary skill in the art. It will also be understood that terms such as those defined in commonly used dictionaries should be interpreted as having a meaning consistent with their meaning in the context of the relevant art and this disclosure, and will not be interpreted as having an idealized or overly formal meaning, unless expressly so defined herein.

[0022] The collection, storage, use, processing, transmission, provision, and disclosure of user personal information in this technical solution comply with relevant laws and regulations and do not violate public order and good morals. The use of user data in this technical solution follows relevant national laws and regulations (e.g., the "Information Security Technology - Personal Information Security Specification"). For example, appropriate measures are taken for personal information access control; restrictions are imposed on the display of personal information; the purpose of using personal information does not exceed the scope of direct or reasonable association; and explicit identity targeting is eliminated when using personal information to avoid precisely identifying specific individuals.

[0023] For storage page transfer in virtual machine migration scenarios, a pre-copy method can be used. However, since transferred storage pages may become dirty, it is necessary to repeatedly transfer dirty data. Therefore, this approach does not effectively manage duplicate dirty pages during storage page migration, nor does it consider the impact of the virtual machine's (VM) own memory access behavior on storage page migration.

[0024] In view of the above, embodiments of this disclosure provide a dirty page migration method, a dirty page migration apparatus, an electronic device, a computer-readable storage medium, and a computer program product.

[0025] In this embodiment of the disclosure, storage access prediction data of the source virtual machine during the migration phase can be obtained through prediction. The storage access prediction data can reflect the possible memory access behavior of each storage page of the source virtual machine during the migration process. Therefore, the transmission priority of each storage page can be determined by the storage access prediction data, so that storage pages in low memory access areas can be transmitted to the target virtual machine first, thereby minimizing repeated transmission of dirty data, reducing network overhead, and improving migration efficiency.

[0026] Figure 1 A flowchart illustrating a dirty page migration method provided in an embodiment of this disclosure. (Refer to...) Figure 1 The dirty page migration method may include the following steps.

[0027] Step S11: Obtain the task execution data of the source virtual machine. The task execution data is used to characterize the target task currently being executed by the source virtual machine.

[0028] Step S12: Perform storage access prediction on the task execution data to obtain storage access prediction data of the source virtual machine. The storage access prediction is used to characterize the prediction of access behavior to the storage space of the source virtual machine.

[0029] Step S13: Determine the storage page transfer priority based on the storage access prediction data. The storage page transfer priority is used to characterize the transfer priority of each storage page in the source virtual machine.

[0030] Step S14: Based on storage page transfer priority, migrate multiple storage pages from the source virtual machine to the target virtual machine.

[0031] In some optional embodiments, a virtualization platform can be used to migrate the running status, storage pages, and hardware resource mapping relationships of the source virtual machine from one physical host to another through a virtual machine monitor (Hypervisor). This can achieve resource scheduling, hardware maintenance, or disaster recovery with no or low interruption of business operations, and the target virtual machine can continue to run on the target host.

[0032] Exemplary examples include migration between Virtual Central Processing Units (vCPUs), between Virtual Graphics Processing Units (vGPUs), and between vCPUs and vGPUs, which are not limited in this disclosure.

[0033] Storage page migration is a crucial process in virtual machine migration. It refers to the process of synchronizing data across physical machines, tracking dirty pages, migrating and registering address mapping relationships for virtual machine storage pages during VM migration. It is key to achieving uninterrupted VM storage layer and data consistency.

[0034] As mentioned earlier, a virtual machine includes a vCPU and a vGPU. Accordingly, storage pages in a vCPU include memory pages, and storage pages in a vGPU include video memory pages.

[0035] Furthermore, in this embodiment of the disclosure, considering that the memory access behavior of each storage page in the virtual machine exhibits different characteristics when the virtual machine is performing different tasks or at different stages of task execution, these characteristics can be applied to the migration of storage pages to determine the transmission priority of storage pages. This enables effective management of the transmission of storage pages between the source virtual machine and the target virtual machine based on the transmission priority, effectively reducing repeated transmission of dirty data.

[0036] In summary, in this embodiment of the present disclosure, for virtual machine migration scenarios, when migrating storage pages from the source virtual machine to the target virtual machine, the task execution data on the source virtual machine side can be used to predict the storage access behavior of the source virtual machine during the migration phase, obtaining corresponding storage access prediction data. The storage access prediction data can characterize the possible memory access behavior of each storage page within the source virtual machine during the migration process. Based on this, the transmission priority of each storage page can be determined according to the storage access prediction data, so that storage pages in areas with low memory access behavior can be transmitted to the target virtual machine first, thereby minimizing repeated transmission of dirty data, reducing network overhead, and improving migration efficiency.

[0037] The dirty page migration method of this disclosure will now be described in detail.

[0038] In some optional embodiments, before performing storage page transfer from the source virtual machine to the target virtual machine, the storage access behavior of the source virtual machine in the future period can be predicted to obtain the corresponding access characteristics.

[0039] In some optional embodiments, storage access prediction can be performed using task execution data from the source virtual machine. Task execution data characterizes information about the target task currently being executed by the source virtual machine. Storage access prediction can then predict the source virtual machine's access behavior to its storage space over a future period, yielding corresponding storage access prediction data. In other words, storage access prediction analyzes the virtual machine's historical access behavior to storage areas to predict future (e.g., within a preset time period) access behavior, obtaining storage access prediction data that includes information such as which storage areas, which locations, and when to perform what type of access behavior (e.g., write operations, read operations, etc.). Furthermore, when analyzing the virtual machine's historical access behavior to storage areas, information such as the type of task executed by the virtual machine, the stage of task execution, and the amount of data being processed can be combined to obtain more accurate and detailed storage access prediction data.

[0040] In some optional embodiments, the task execution data may include at least one of the following: the task type of the target task, the amount of data to be processed, the task execution stage, etc.

[0041] For example, task types include basic operation tasks, resource scheduling tasks, general business support tasks, and computationally intensive tasks. Among them, basic operation tasks mainly include operating system (OS) kernel scheduling tasks and OS support tasks; resource scheduling tasks are mainly used to adjust virtual machine resource configurations, such as dynamic scaling tasks; general business support tasks mainly include various upper-layer business application tasks, including web service tasks and database tasks; and computationally intensive tasks include artificial intelligence (AI) training tasks and AI inference tasks. The amount of data to be processed is the amount of data corresponding to the target task that needs to be processed; the task execution stage can reflect which stage of the target task is currently being executed.

[0042] It should be noted that when a virtual machine executes different types of tasks, the access types and frequencies of different storage regions vary. Therefore, by understanding the task type of the target task, the storage access prediction data of the source virtual machine can be predicted more reasonably and accurately.

[0043] For example, the source virtual machine's storage pages include kernel pages, application code pages, application data pages, system configuration pages, temporary cache pages, and snapshot metadata pages. Correspondingly, when performing basic runtime tasks, since there is no upper-layer business load, storage access is concentrated at the kernel and code layers. Therefore, access operations are mainly performed on kernel pages and application code pages, and the write frequency is much lower than the read frequency; the frequency of memory access operations on other storage pages is relatively low. When performing resource scheduling tasks, the main focus is on adjusting virtual machine resource configurations; therefore, access operations are mainly concentrated on kernel pages and image pages. Metadata pages show relatively similar write and read frequencies. When performing general business tasks, storage access covers the entire partition, with less frequent access to system configuration pages. The specific read and write frequencies vary slightly depending on the task content; for example, web service tasks have a higher read frequency, while database tasks have a higher write frequency. When performing computationally intensive tasks, which primarily involve massive data computation, storage access is concentrated on application data pages and temporary cache pages. Furthermore, due to the generation of numerous intermediate computation results, the write frequency is significantly higher than the read frequency. Therefore, it can be concluded that the access operations of different storage pages in the source virtual machine may differ significantly for different task types. These differences can be leveraged to more efficiently manage storage page migration.

[0044] Furthermore, considering that access operations to different storage pages may change at different stages of task execution—for example, some storage pages may be accessed more frequently in the early stages of task execution, while others may be accessed more frequently as the task progresses—more granular storage access prediction can be performed using the task execution phase.

[0045] For example, when executing general business-bearing tasks, the early stage of task execution mainly involves high-frequency read operations on the kernel, code, and / or configuration information, with the main access operations concentrated on the kernel page, application code page, and system configuration page. In the middle stage of task execution, high-speed read and write operations on application data and temporary cache data are mainly performed, with the main access operations concentrated on the application data page and temporary cache page. In the later stage of task execution, operations such as writing back to the temporary cache are mainly performed, with the main access operations concentrated on the application data page and temporary cache page.

[0046] It should be noted that the above examples of task execution data are merely illustrative and are not intended to limit the scope of this disclosure.

[0047] In some optional embodiments, storage access prediction can be performed using an access prediction model. For example, after obtaining the task execution data of the source virtual machine, the task execution data can be input into a preset access prediction model to perform storage access prediction, thereby obtaining the storage access prediction data of the source virtual machine.

[0048] In some optional embodiments, the access prediction model is a model trained on a preset training set; the preset training set includes task execution sample data for various task types and corresponding actual storage access data; wherein, the access prediction model is used to perform storage access prediction based on the input task execution sample data to obtain storage access prediction sample data, to calculate a loss value based on the storage access prediction sample data and the actual storage access data, and to update at least some of the model parameters of the access prediction model based on the loss value.

[0049] Therefore, the task execution sample data is pre-acquired training sample data, essentially the same as the task execution data of the aforementioned source virtual machine. The actual storage access data, on the other hand, is the data showing the actual access behavior of the sample virtual machine to storage pages during the execution of its corresponding tasks. By combining the task execution sample data and the corresponding actual storage access data, the access prediction model can learn the access behavior characteristics under different task types, data volumes, and task execution stages. This allows it to predict the virtual machine's access behavior to different storage pages based on the input virtual machine's task execution data, thus obtaining storage access prediction data.

[0050] Furthermore, after training to obtain the access prediction model, the trained access prediction model can be used to perform storage access prediction, and it can be applied to various virtual machine migration scenarios of different businesses. Since the access prediction model can be directly reused, there is no need to rewrite the processing logic for performing prediction for each storage access prediction, thereby effectively reducing development and maintenance costs.

[0051] In some optional embodiments, storage access prediction data may include the predicted frequency of different access operations performed on each storage page in the source virtual machine, such as the predicted frequency of write operations for each storage page. In other words, the main reason a storage page becomes "dirty" is because write operations have been performed on it. Therefore, the predicted frequency of write operations on a storage page can effectively reflect the likelihood of that storage page becoming "dirty," thereby determining when to transmit the storage page to minimize the repeated transmission of dirty data.

[0052] In some optional embodiments, the storage access prediction data may include a storage page access prediction frequency heatmap, which reflects the access prediction frequency of different storage regions and different storage pages.

[0053] In some optional embodiments, storage access prediction data may include access distribution prediction data, which reflects the spatial distribution characteristics of access operations performed on the storage area of ​​the source virtual machine, such as whether a certain storage area is accessed continuously and centrally.

[0054] In some optional embodiments, a pre-copy method can be used to transfer storage pages to the target virtual machine. In other words, without shutting down the source virtual machine, a full transfer of storage pages is performed first, followed by multiple incremental scans and transfers of newly generated dirty pages from the source virtual machine during the migration process. When a preset migration convergence condition is met, the source virtual machine is briefly paused, and the remaining small number of dirty pages are synchronized to the target virtual machine, thereby achieving seamless migration of services. This approach does not consider the impact of storage page access methods on storage page transfer, nor can it accurately predict storage pages with high modification frequency. Furthermore, vGPU lacks an accurate mechanism for identifying dirty pages. Therefore, the lack of effective management and filtering of storage page transfer can easily lead to frequent and repeated transfers of dirty data, resulting in high network overhead.

[0055] In contrast, embodiments of this disclosure can prioritize the transmission of storage pages based on storage access prediction data, thereby ensuring storage page migration while reducing the amount of dirty data that is repeatedly transmitted and reducing network overhead.

[0056] In some optional embodiments, based on storage access prediction data, several sub-regions in the storage region of the source virtual machine with different degrees of influence on the target task can be identified, and the storage page transfer priority of each sub-region can be determined according to the degree of influence corresponding to each sub-region.

[0057] Furthermore, considering that access to sub-regions with higher impact is more frequent than access to sub-regions with lower impact, in order to minimize the repeated transmission of dirty data, storage pages in sub-regions with lower impact can be transmitted first, while storage pages in sub-regions with higher impact can be transmitted later.

[0058] In some optional embodiments, determining the storage page transfer priority based on storage access prediction data includes: dividing the storage area of ​​the source virtual machine into multiple sub-regions based on the storage access prediction data, and determining the degree of influence of each sub-region; determining the storage page transfer priority corresponding to each sub-region based on the degree of influence of each sub-region; wherein the degree of influence is used to characterize the degree of influence of the sub-region on the execution indicators of the target task, and the degree of influence of the sub-region is negatively correlated with the storage page transfer priority of the sub-region.

[0059] The performance indicators include metrics that reflect the performance of the target task, such as task execution time and resource utilization rate. This disclosure does not limit these metrics.

[0060] Therefore, the degree of impact can appropriately reflect the activity level of the corresponding sub-region. Sub-regions with lower impact levels have relatively lower activity and a correspondingly lower probability of generating dirty pages. Thus, after a single transmission, there is generally no need for repeated transmissions. Prioritizing the transmission of data from this sub-region to the target virtual machine reduces bandwidth consumption for unnecessary repeated transmissions. Conversely, sub-regions with higher impact levels have relatively higher activity and a correspondingly higher probability of generating dirty pages. Therefore, the transmission priority of this sub-region is set to a lower level, and it is transmitted at the beginning and end of the migration phase. At this time, the virtual machine is about to complete the switch, the window period is extremely short, and the number of dirty pages to be transmitted is significantly reduced, requiring only a few iterations to complete the transmission. In other words, if the sub-regions with higher impact levels are migrated first, this sub-region may continuously generate more dirty pages during the migration process, easily falling into a cycle of "transmission, dirty pages, retransmission," which will significantly increase the amount of data transmitted repeatedly and the migration time. Through the partitioning and sequential transmission strategy described above, the number of dirty page iterations can be effectively reduced, the amount of data transmitted repeatedly can be reduced, the convergence time of virtual machine migration can be shortened, thereby reducing network bandwidth consumption and the risk of service interruption.

[0061] In some optional embodiments, the storage access prediction data includes access prediction frequency. Based on the access prediction frequency, the storage area of ​​the source virtual machine can be divided into multiple sub-regions, and it can be determined that the influence of the sub-region with high access prediction frequency is higher than that of the sub-region with low access prediction frequency. Based on this, storage pages in the sub-region with low access prediction frequency are preferentially transferred.

[0062] In some optional embodiments, determining the storage page transfer priority based on storage access prediction data includes: determining the transfer priority of each storage page based on the write operation prediction frequency to obtain the storage page transfer priority; wherein, the write operation prediction frequency and the storage page transfer priority are inversely correlated.

[0063] Therefore, storage pages with a high frequency of write operation predictions are more likely to become dirty pages. Thus, the transmission priority of these storage pages is set to a lower priority, while the transmission priority of storage pages with a low frequency of write operation predictions is set to a higher priority. This allows storage pages with a lower probability of becoming dirty to be transmitted to the target virtual machine first, thereby effectively reducing the amount of data transmitted repeatedly and reducing the number of dirty page iterations.

[0064] For example, if a storage page is frequently written to, it is more likely to become a dirty page. If a storage page is given a high transfer priority, it will be transferred to the target virtual machine at the initial stage of migration. Since the storage page is more likely to become a dirty page, it may become a dirty page during the subsequent transfer of the remaining storage pages. Therefore, the storage page needs to be transferred repeatedly in subsequent rounds to ensure that the data remains consistent between the source virtual machine and the target virtual machine.

[0065] In some optional embodiments, multiple memory pages can be sorted according to the write operation prediction frequency of each memory page to obtain a memory page sequence. If the pages are sorted in descending order of write operation prediction frequency, the transmission priority of the memory pages in the sequence is arranged in ascending order; if they are sorted in ascending order of write operation prediction frequency, the transmission priority of the memory pages in the sequence is arranged in descending order. Based on this, the relative transmission priority between memory pages can be clearly defined, and subsequent memory page transmission can be indicated based on the relative transmission priority.

[0066] In some optional embodiments, a mapping relationship between write operation prediction frequency and transmission priority can be pre-defined, which conforms to the requirement that write operation prediction frequency and transmission priority are inversely correlated. Based on this, after determining the write operation prediction frequency of each memory page, the transmission priority of each memory page can be determined according to this mapping relationship. Specifically, the mapping relationship between write operation prediction frequency and transmission priority can be such that one transmission priority corresponds to one write operation prediction frequency interval; that is, as long as the content is within the specified write operation prediction frequency interval, it corresponds to the same transmission priority, thereby simplifying the processing.

[0067] It should be noted that the above method of determining transmission priority based on the frequency of write operations is only an example, and the embodiments disclosed herein do not limit this.

[0068] In some optional embodiments, migrating multiple storage pages from a source virtual machine to a target virtual machine based on storage page transfer priority includes: transferring multiple storage pages from the source virtual machine to the target virtual machine in descending order of transfer priority according to the storage page transfer priority.

[0069] For example, multiple storage pages can be sorted in descending order of transmission priority to obtain a storage page transmission queue; the storage page transmission queue is transmitted from the source virtual machine to the target virtual machine with the head of the queue as the transmission start point and the tail of the queue as the transmission end point.

[0070] Therefore, during the first full transfer of storage pages, multiple storage pages in the source virtual machine can be sorted according to their transfer priority from high to low, forming a storage page transfer queue. The first page in the queue is then used as the starting point for sequential transfer, ultimately transferring the entire storage page transfer queue to the target virtual machine. Based on this, on the one hand, by transferring the entire data to the target virtual machine, a complete virtual machine replica can be built from scratch within the target virtual machine, enabling it to possess the processing capabilities of the source virtual machine. On the other hand, transferring storage pages according to transfer priority during the full transfer ensures orderly and comprehensive data transmission, reducing the possibility of missing storage pages. Furthermore, because storage pages with a lower probability of becoming dirty are prioritized for transfer, and storage pages in areas with low memory access activity are transferred to the target virtual machine first, repeated transfers of dirty data can be minimized, reducing the waste of bandwidth and other transmission resources.

[0071] Furthermore, during the full transfer of storage pages (i.e., the first transfer), dirty pages may occur. Therefore, multiple rounds of iterative incremental transfers can be used to further transfer data from the source virtual machine to the target virtual machine. Moreover, since incremental transfers are used in the iterative transfers, only dirty storage pages need to be transferred, thus effectively reducing the amount of data transferred.

[0072] In some optional embodiments, the dirty page migration method further includes: if a preset migration convergence condition is not met, proceeding to the i-th transfer, where i ≥ 2; for the i-th transfer, determining multiple target storage pages, where each target storage page is a storage page that has been marked as dirty after completing the (i-1)-th transfer; determining the actual transfer priority of each target storage page based on its transfer priority and the number of times it has been marked as dirty; transferring at least a portion of the dirty data corresponding to the multiple target storage pages from the source virtual machine to the target virtual machine based on their actual transfer priorities; and proceeding to the (i+1)-th transfer if the preset migration convergence condition is not met.

[0073] In some optional embodiments, the preset migration convergence condition is used as the basis for determining whether to terminate incremental transmission and enter the final synchronization stage during the multi-round incremental dirty page transfer phase. Meeting the preset migration convergence condition triggers migration convergence.

[0074] For example, the preset migration convergence condition includes at least one of the following: the amount of dirty data that has not yet been transmitted is less than or equal to a preset data amount threshold, and the dirty page generation rate is less than or equal to a preset rate threshold.

[0075] It should be noted that the above-mentioned preset migration convergence conditions are merely illustrative examples, and the embodiments disclosed herein do not impose any limitations on them.

[0076] Therefore, during each round of incremental transfer, the corresponding dirty pages (i.e., the target storage pages) can be identified first. Then, based on the number of times a dirty page has been marked as dirty, its original transfer priority is adjusted to obtain its actual transfer priority in this transfer. Finally, the incremental transfer is performed based on the actual transfer priority of each dirty page. For these dirty pages, it is not necessary to transfer the entire page data; only the dirty data needs to be transferred. This effectively reduces data transfer volume, lowers network overhead, and improves migration efficiency.

[0077] In some optional embodiments, the source virtual machine saves the historical modification data of each storage page through dirty page cache data, the historical modification data including dirty marks and dirty mark counts; for the i-th transfer, determining the corresponding multiple target storage pages includes: obtaining the historical modification data of each storage page from the dirty page cache data; and filtering the target storage page from the multiple storage pages based on the historical modification data.

[0078] Therefore, the source virtual machine can maintain the historical modification count for each storage page. This historical modification count reflects the historical modification information of the corresponding storage page, including dirty markings and the number of dirty markings. This allows for a clear understanding of when, what data, and how many modifications were made to the storage page. Based on this, during iterative incremental transfers, target storage pages can be accurately selected based on historical modification data, determining the storage pages to be transferred first. This enables dynamic updates to storage page transfer priorities during incremental transfers, further reducing data transfer volume and network overhead.

[0079] For example, the source virtual machine maintains a multi-level dirty page cache, which caches dirty pages of different partitions and different modification frequencies in a hierarchical manner, such as high-speed, normal, and low-speed, so that high-value dirty pages (such as frequently modified dirty pages or dirty pages storing core business data) can be tracked with low latency, and the overhead of invalid scanning for low-value dirty pages can be reduced.

[0080] In some optional embodiments, the dirty mark count of the target storage page includes a first dirty mark count and / or a second dirty mark count. The first dirty mark count is the number of times the storage page has been dirty-marked since its first transfer to the target virtual machine, and the second dirty mark count is the number of times the storage page has been dirty-marked since its last transfer. When adjusting the transfer priority, either or both can be referenced, and this disclosure does not impose any limitations on this.

[0081] For example, the number of dirty marks for the target storage page includes the first dirty mark count N1, and the transmission priority of the target storage page can be adjusted directly based on the first dirty mark count N1.

[0082] For example, the number of dirty marks on the target storage page includes the second dirty mark number N2, and the transmission priority of the target storage page can be adjusted directly based on the second dirty mark number N2.

[0083] For example, the number of dirty markings of the target storage page includes a first dirty marking count N1 and a second dirty marking count N2. Using preset weighting coefficients w1 and w2, the current weighted dirty marking count is obtained, and the transmission priority of the target storage page is adjusted based on the weighted dirty marking count; where the weighted dirty marking count N... w =w1×N1+w2×N2, and considering that the second dirty mark count focuses more on reflecting the write operation frequency of the target storage page in the recent period, the weight coefficient w2 can be appropriately assigned a higher value so that the weighted dirty mark count can better match the current write operation characteristics of the target storage page.

[0084] It should be noted that the above methods for determining the weighting coefficients are merely illustrative examples. The values ​​of the weighting coefficients can also be determined based on experience, statistical data, and simulation data. This disclosure does not impose any restrictions on this.

[0085] In some optional embodiments, the actual transmission priority of each target storage page is determined based on the transmission priority of each target storage page and the number of dirty markings of each target storage page. This includes: for any target storage page, determining the corresponding level adjustment quantity based on the relationship between the number of dirty markings and a preset number threshold, wherein the number of preset number thresholds is one or more; and adjusting the transmission priority of the target storage page according to the level adjustment quantity to obtain the actual transmission priority of the target storage page.

[0086] The number of dirty markers includes the aforementioned number of first dirty markers, number of second dirty markers, or weighted number of dirty markers.

[0087] For example, assume that the transfer priority of the target storage page is D. ini Furthermore, preset threshold numbers T1, T2, ..., T are set in advance. mIf the number of dirty marks for the target storage page is in the interval [T1, T2), then the corresponding level adjustment quantity can be determined as D1, and the actual transmission priority of the target storage page can be determined as D. act =D ini -D1, if the number of dirty markings of the target storage page is in the interval [T2, T3), then the corresponding level adjustment quantity can be determined as D2, and the actual transmission priority of the target storage page can be determined as D. act =D ini -D2, ..., if the number of dirty marks for the target memory page is within the interval [T m-1 ,T m Then, the corresponding level adjustment quantity can be determined as D. m-1 This allows us to determine the actual transfer priority of the target storage page as D. act =D ini -D m-1 Where m is an integer greater than 1, T1 to T m The integers are greater than or equal to 1, and the values ​​increase sequentially from D1 to D... m-1 It is an integer greater than or equal to 1, and the values ​​increase sequentially.

[0088] Therefore, for a target storage page that has been marked as dirty more times, its transmission priority is reduced to a greater extent, in order to reduce the repeated transmission of dirty data.

[0089] It's important to note that the actual transmission priority is only a reference for transmitting dirty data. During any dirty data transmission, dirty data with a particularly low actual transmission priority can be paused in the current transmission and then transmitted in the next transmission or subsequent rounds to further reduce duplicate transmissions. Furthermore, when determining whether to transmit dirty data with a particularly low actual transmission priority, information such as network bandwidth and network utilization can be considered. For example, in scenarios with high network bandwidth and low network utilization, dirty data with a low actual transmission priority can be transmitted; conversely, in scenarios with low network bandwidth, the transmission of dirty data with a low actual transmission priority can be paused.

[0090] In summary, the embodiments of this disclosure provide a method for dynamically adjusting the transmission priority of storage pages. Not only does it indicate the transmission order of storage pages based on the initial transmission priority determined by storage access prediction data during the full transmission of storage pages, but it also dynamically adjusts the initial transmission priority based on the number of dirty markings of storage pages during subsequent iterative transmission processes. This makes the adjusted actual transmission priority more closely match the current access behavior of storage pages, thereby further reducing the repeated transmission of dirty data, reducing network overhead, and improving migration efficiency.

[0091] Furthermore, if the preset migration convergence conditions are met after a certain transfer, a dirty page synchronization operation can be performed to synchronize the dirty data that has not yet been transferred to the target virtual machine all at once, providing a basis for subsequent virtual machine switching operations.

[0092] In some optional embodiments, the dirty page migration method further includes: transferring the remaining dirty pages that have not yet been transferred to the target virtual machine to the target virtual machine, provided that a preset migration convergence condition is met.

[0093] For example, when the amount of data corresponding to a dirty page is small enough, the dirty page synchronization phase begins, and the remaining dirty data that has not yet been transferred to the target virtual machine is transferred to the target virtual machine. The amount of data corresponding to a dirty page being small enough can mean that the number of dirty pages is small, resulting in a small amount of dirty data; or it can mean that although the number of dirty pages may be considerable, the amount of dirty data in each dirty page is small, thus resulting in a small total amount of dirty data.

[0094] For example, when the source virtual machine is a vGPU, when the dirty data is small enough, the dirty page synchronization phase is entered, and the modifications to the video memory are synchronized to the target virtual machine until the dirty pages are fully synchronized or the target virtual machine is paused.

[0095] In some optional embodiments, after migrating multiple storage pages of the source virtual machine to the target virtual machine based on storage page transfer priority, the dirty page migration method further includes: when the target virtual machine is in a suspended state and the source virtual machine has unexecuted task instructions, in response to the source virtual machine completing the execution of the task instructions, transferring the dirty data generated by executing the task instructions and the dirty data that is not synchronized due to the suspension of the target virtual machine to the target virtual machine; when the target virtual machine is in a running state and the source virtual machine has unexecuted task instructions, pausing the instruction reception of the source virtual machine, and in response to the source virtual machine completing the execution of the task instructions, transferring the dirty data generated by executing the task instructions to the target virtual machine.

[0096] For example, in a migration scenario where the source virtual machine is a vGPU and the target virtual machine is a vCPU, during the switching phase, if there is still unsent dirty data after the vCPU is paused, the migration is completed by synchronizing the untransmitted dirty data to the vCPU after the vGPU has processed all instructions. The untransmitted dirty data includes dirty data that was not synchronized due to the vCPU pause, as well as dirty data generated by the vGPU during the execution of the remaining instructions (if no new dirty data is generated during the execution of the remaining instructions, only the unsynchronized dirty data needs to be transmitted). If the vCPU is not paused at this time, the transmission of new instructions to the vGPU is paused, and the migration is completed by synchronizing the dirty data generated by the vGPU during the execution of the remaining instructions to the destination after the vGPU has processed all instructions (if no new dirty data is generated during the execution of the remaining instructions, there is no need to synchronize the dirty data).

[0097] Therefore, it can be seen that a matching processing method is adopted for different running states of the target virtual machine. On the one hand, it can ensure the complete execution of task instructions, and on the other hand, it can ensure that all dirty data is synchronized to the target virtual machine side, avoiding problems and failures caused by data inconsistency between the two sides.

[0098] Figure 2 This is a schematic flowchart illustrating a dirty page migration method provided in an embodiment of this disclosure. (Refer to...) Figure 2 The dirty page migration method may include the following steps.

[0099] Step S201: Obtain task execution data from the source virtual machine.

[0100] Step S202: Input the task execution data into the preset access prediction model to perform storage access prediction, and obtain the storage access prediction data of the source virtual machine. The storage access prediction data includes the write operation prediction frequency of each storage page.

[0101] Step S203: Determine the transmission priority of each storage page based on the write operation prediction frequency to obtain the storage page transmission priority.

[0102] Step S204: Sort multiple storage pages in descending order of transmission priority to obtain a storage page transmission queue.

[0103] Step S205: Based on the storage page transfer queue, perform the first storage page transfer.

[0104] In the first memory page transfer, the head of the memory page transfer queue is used as the transfer start point, and the tail of the memory page transfer queue is used as the transfer end point, transferring the memory page transfer queue from the source virtual machine to the target virtual machine, thereby achieving a full memory page transfer. Further, after completing the first memory page transfer, step S206 can be executed.

[0105] Step S206: Determine whether the preset migration convergence condition is met.

[0106] If the preset migration convergence condition is not met, proceed to step S207; if the preset migration convergence condition is met, proceed to step S211.

[0107] Step S207: Update i to i+1.

[0108] Here, i represents the number of transfers, and i=1 when performing the first memory page transfer.

[0109] Step S208: For the i-th transmission, determine the corresponding multiple target storage pages. The target storage pages are the storage pages that have been marked as dirty after the (i-1)-th transmission is completed.

[0110] Step S209: Determine the actual transmission priority of each target storage page based on the transmission priority of each target storage page and the number of dirty markings of each target storage page.

[0111] Step S210: Based on the actual transmission priority of each target storage page, at least a portion of the dirty data corresponding to multiple target storage pages is transmitted from the source virtual machine to the target virtual machine.

[0112] After completing step S210, proceed to step S206; if the preset migration convergence condition is met, proceed to step S211.

[0113] Step S211: Enter the synchronization phase and transfer the remaining dirty data that has not yet been transferred to the target virtual machine to the target virtual machine.

[0114] After executing step S211, step S212 or step S213 can be executed depending on the state of the target virtual machine. For example, if the target virtual machine is in a paused state, step S212 is executed; if the target virtual machine is in a running state, step S213 is executed. Either step S212 or step S213 can be executed.

[0115] Step S212: If the target virtual machine is in a paused state and the source virtual machine has unexecuted task instructions, in response to the source virtual machine completing the task instructions, the dirty data generated by executing the task instructions and the dirty data that was not synchronized due to the target virtual machine being paused are transferred to the target virtual machine.

[0116] Step S213: When the target virtual machine is running and the source virtual machine has unexecuted task instructions, pause the instruction reception of the source virtual machine, and in response to the source virtual machine completing the task instructions, transfer the dirty data generated by executing the task instructions to the target virtual machine.

[0117] After completing step S212 or step S213, step S214 can be executed.

[0118] Step S214: Switch the task running on the source virtual machine to the target virtual machine, and let the target virtual machine perform the corresponding task processing.

[0119] It is understood that the various method embodiments mentioned above in this disclosure can be combined with each other to form combined embodiments without violating the principle and logic. Due to space limitations, this disclosure will not elaborate further. Those skilled in the art will understand that in the above methods of specific implementation, the specific execution order of each step should be determined by its function and possible internal logic.

[0120] In addition, this disclosure also provides a dirty page migration apparatus, an electronic device, and a computer-readable storage medium, all of which can be used to implement any of the dirty page migration methods provided in this disclosure. The corresponding technical solutions and descriptions are described in the corresponding records in the method section and will not be repeated here.

[0121] Figure 3 This is a block diagram of a dirty page migration device provided in an embodiment of the present disclosure.

[0122] Reference Figure 3 This disclosure provides a dirty page migration device 300, which includes the following modules.

[0123] The acquisition module 301 is used to acquire task execution data of the source virtual machine. The task execution data is used to characterize the target task currently being executed by the source virtual machine.

[0124] The prediction module 302 is used to perform storage access prediction on task execution data to obtain storage access prediction data of the source virtual machine. The storage access prediction is used to characterize the prediction of access behavior to the storage space of the source virtual machine.

[0125] The determination module 303 is used to determine the storage page transfer priority based on the storage access prediction data. The storage page transfer priority is used to characterize the transfer priority of each storage page in the source virtual machine.

[0126] Migration module 304 is used to migrate multiple storage pages from a source virtual machine to a target virtual machine based on storage page transfer priority.

[0127] Therefore, in this embodiment of the present disclosure, for virtual machine migration scenarios, when performing the migration of storage pages from the source virtual machine to the target virtual machine, the task execution data on the source virtual machine side can be used to predict the storage access behavior of the source virtual machine during the migration phase, and obtain the corresponding storage access prediction data. The storage access prediction data can characterize the possible memory access behavior of each storage page in the source virtual machine during the migration process. Based on this, the transmission priority of each storage page can be determined according to the storage access prediction data, so that storage pages in low memory access behavior areas can be transmitted to the target virtual machine first, thereby minimizing the repeated transmission of dirty data, reducing network overhead, and improving migration efficiency.

[0128] Each module in the aforementioned dirty page migration device can be implemented entirely or partially through software, hardware, or a combination thereof. These modules can be embedded in the processor of a computer device in hardware form or independent of it, or stored in the memory of a computer device in software form, so that the processor can call and execute the operations corresponding to each module.

[0129] Figure 4 This is a block diagram of an electronic device provided in an embodiment of the present disclosure.

[0130] Reference Figure 4 This disclosure provides an electronic device including: at least one processor 401, at least one memory 402, and one or more I / O interfaces 403; wherein the memory 402 stores one or more computer programs that can be executed by at least one processor 401, and the one or more computer programs are executed by at least one processor 401 to enable at least one processor 401 to perform the dirty page migration method described above.

[0131] Figure 5 A block diagram of another electronic device provided in an embodiment of this disclosure.

[0132] Reference Figure 5 This disclosure provides an electronic device that includes multiple processing cores 501 and an on-chip network 502. The multiple processing cores 501 are all connected to the on-chip network 502, which is used to exchange data between the multiple processing cores and external data.

[0133] One or more processing cores 501 store one or more instructions, which are executed by one or more processing cores 501 to enable one or more processing cores 501 to perform the dirty page migration method described above.

[0134] The modules in the aforementioned electronic devices can be implemented entirely or partially through software, hardware, or a combination thereof. These modules can be embedded in the processor of a computer device in hardware form or independent of it, or stored in the memory of a computer device in software form, so that the processor can call and execute the operations corresponding to each module.

[0135] This disclosure also provides a computer-readable storage medium storing a computer program thereon, wherein the computer program, when executed by a processor, implements the dirty page migration method described above. The computer-readable storage medium may be volatile or non-volatile.

[0136] This disclosure also provides a computer program product, including computer-readable code, or a non-volatile computer-readable storage medium carrying computer-readable code, wherein when the computer-readable code is run in a processor of an electronic device, the processor in the electronic device performs the above-described dirty page migration method.

[0137] Those skilled in the art will understand that all or some of the steps, systems, and apparatuses disclosed above, and their functional modules / units, can be implemented as software, firmware, hardware, or suitable combinations thereof. In hardware implementations, the division between functional modules / units mentioned above does not necessarily correspond to the division of physical components; for example, a physical component may have multiple functions, or a function or step may be performed collaboratively by several physical components. Some or all physical components may be implemented as software executed by a processor, such as a central processing unit, digital signal processor, or microprocessor, or as hardware, or as an integrated circuit, such as an application-specific integrated circuit (ASIC). Such software can be distributed on a computer-readable storage medium, which may include computer storage media (or non-transitory media) and communication media (or transient media).

[0138] As is known to those skilled in the art, the term computer storage medium includes volatile and non-volatile, removable and non-removable media implemented in any method or technology for storing information, such as computer-readable program instructions, data structures, program modules, or other data. Computer storage media includes, but is not limited to, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM), static random access memory (SRAM), flash memory or other memory technologies, portable compact disc read-only memory (CD-ROM), digital versatile disc (DVD) or other optical disc storage, magnetic cartridges, magnetic tape, disk storage or other magnetic storage devices, or any other medium that can be used to store desired information and is accessible to a computer. Furthermore, it is known to those skilled in the art that communication media typically contain computer-readable program instructions, data structures, program modules, or other data in modulated data signals such as carrier waves or other transmission mechanisms, and may include any information delivery medium.

[0139] The computer-readable program instructions described herein can be downloaded from computer-readable storage media to various computing / processing devices, or downloaded via a network, such as the Internet, local area network, wide area network, and / or wireless network, to an external computer or external storage device. The network may include copper transmission cables, fiber optic transmission, wireless transmission, routers, firewalls, switches, gateway computers, and / or edge servers. A network adapter card or network interface in each computing / processing device receives the computer-readable program instructions from the network and forwards them to the computer-readable storage media in the respective computing / processing device.

[0140] Computer program instructions used to perform the operations of this disclosure may be assembly instructions, instruction set architecture (ISA) instructions, machine instructions, machine-dependent instructions, microcode, firmware instructions, status setting data, or source code or object code written in any combination of one or more programming languages, including object-oriented programming languages ​​such as Smalltalk, C++, etc., and conventional procedural programming languages ​​such as the "C" language or similar programming languages. The computer-readable program instructions may execute entirely on the user's computer, partially on the user's computer, as a standalone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving a remote computer, the remote computer may be connected to the user's computer via any type of network—including a local area network (LAN) or a wide area network (WAN)—or may be connected to an external computer (e.g., via the Internet using an Internet service provider). In some embodiments, electronic circuitry, such as programmable logic circuitry, field-programmable gate arrays (FPGAs), or programmable logic arrays (PLAs), is personalized by utilizing the status information of the computer-readable program instructions to implement various aspects of this disclosure.

[0141] The computer program product described herein can be implemented specifically through hardware, software, or a combination thereof. In one alternative embodiment, the computer program product is specifically embodied in a computer storage medium; in another alternative embodiment, the computer program product is specifically embodied in a software product, such as a software development kit (SDK), etc.

[0142] Various aspects of this disclosure are described herein with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of this disclosure. It should be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer-readable program instructions.

[0143] These computer-readable program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing apparatus to produce a machine such that, when executed by the processor of the computer or other programmable data processing apparatus, they create means for implementing the functions / actions specified in one or more blocks of the flowchart and / or block diagram. These computer-readable program instructions can also be stored in a computer-readable storage medium that causes a computer, programmable data processing apparatus, and / or other device to operate in a particular manner; thus, the computer-readable medium storing the instructions comprises an article of manufacture that includes instructions for implementing aspects of the functions / actions specified in one or more blocks of the flowchart and / or block diagram.

[0144] Computer-readable program instructions may also be loaded onto a computer, other programmable data processing apparatus, or other device to cause a series of operational steps to be performed on the computer, other programmable data processing apparatus, or other device to produce a computer-implemented process, thereby causing the instructions executed on the computer, other programmable data processing apparatus, or other device to perform the functions / actions specified in one or more boxes of a flowchart and / or block diagram.

[0145] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of the present disclosure. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of an instruction containing one or more executable instructions for implementing a specified logical function. In some alternative implementations, the functions marked in the blocks may occur in a different order than those shown in the drawings. For example, two consecutive blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, may be implemented using a dedicated hardware-based system that performs the specified function or action, or using a combination of dedicated hardware and computer instructions.

[0146] Example embodiments have been disclosed herein, and while specific terminology has been used, it is for illustrative purposes only and should be construed as such, and is not intended to be limiting. In some instances, it will be apparent to those skilled in the art that features, characteristics, and / or elements described in connection with particular embodiments may be used alone, or in combination with features, characteristics, and / or elements described in connection with other embodiments, unless otherwise expressly indicated. Therefore, those skilled in the art will understand that various changes in form and detail may be made without departing from the scope of this disclosure as set forth by the appended claims.

Claims

1. A method for migrating dirty pages, characterized in that, include: Obtain task execution data from the source virtual machine, wherein the task execution data is used to characterize information about the target task currently being executed by the source virtual machine; Storage access prediction is performed on the task execution data to obtain storage access prediction data of the source virtual machine. The storage access prediction is used to characterize the access behavior to the storage space of the source virtual machine. The storage page transfer priority is determined based on the storage access prediction data, and the storage page transfer priority is used to characterize the transfer priority of each storage page in the source virtual machine; Based on the storage page transfer priority, multiple storage pages of the source virtual machine are migrated to the target virtual machine.

2. The method according to claim 1, characterized in that, The storage access prediction is implemented based on an access prediction model, which is a model trained on a preset training set. The preset training set includes task execution sample data for various task types and corresponding actual storage access data; The access prediction model is used to perform storage access prediction based on the input task execution sample data to obtain storage access prediction sample data, calculate a loss value based on the storage access prediction sample data and the actual storage access data, and update at least some of the model parameters of the access prediction model based on the loss value.

3. The method according to claim 1, characterized in that, Determining the storage page transfer priority based on the storage access prediction data includes: The storage area of ​​the source virtual machine is divided into multiple sub-regions based on the storage access prediction data, and the degree of influence of each sub-region is determined. Based on the degree of influence of each sub-region, the storage page transfer priority corresponding to the sub-region is determined; The degree of influence is used to characterize the degree of influence of the sub-region on the execution indicators of the target task, and the degree of influence of the sub-region is negatively correlated with the storage page transfer priority of the sub-region.

4. The method according to claim 1, characterized in that, The storage access prediction data includes the predicted frequency of write operations for each of the storage pages; Determining the storage page transfer priority based on the storage access prediction data includes: The transmission priority of each memory page is determined based on the predicted frequency of write operations, thus obtaining the transmission priority of the memory page. The frequency of write operation prediction is negatively correlated with the transmission priority of the storage page.

5. The method according to any one of claims 1 to 4, characterized in that, The step of migrating multiple storage pages from the source virtual machine to the target virtual machine based on the storage page transfer priority includes: Based on the storage page transfer priority, multiple storage pages are transferred from the source virtual machine to the target virtual machine in descending order of transfer priority.

6. The method according to any one of claims 1 to 4, characterized in that, The method further includes: If the preset migration convergence condition is not met, proceed to the i-th transmission, where i≥2; For the i-th transmission, determine the corresponding multiple target storage pages, which are the storage pages that have been marked as dirty after the (i-1)-th transmission is completed; The actual transmission priority of each target storage page is determined based on the transmission priority of each target storage page and the number of dirty markings for each target storage page; Based on the actual transmission priority of each target storage page, at least a portion of the dirty data corresponding to multiple target storage pages is transferred from the source virtual machine to the target virtual machine; If the preset migration convergence condition is not met, proceed to the (i+1)th transmission.

7. The method according to claim 6, characterized in that, The step of determining the actual transmission priority of each target storage page based on the transmission priority of each target storage page and the number of dirty markings of each target storage page includes: For any of the target storage pages, the corresponding level adjustment quantity is determined based on the relationship between the number of dirty markings and a preset number threshold, wherein the number of preset number thresholds is one or more. The transmission priority of the target storage page is adjusted according to the level adjustment quantity to obtain the actual transmission priority of the target storage page.

8. The method according to claim 6, characterized in that, The source virtual machine saves the historical modification data of each storage page through dirty page cache data, and the historical modification data includes dirty marks and the number of dirty marks; The determination of the corresponding multiple target storage pages for the i-th transmission includes: Obtain historical modification data for each of the storage pages from the dirty page cache data; The target storage page is selected from multiple storage pages based on the historical modification data.

9. The method according to claim 6, characterized in that, The method further includes: If the preset migration convergence condition is met, the remaining dirty data that has not yet been transferred to the target virtual machine is transferred to the target virtual machine.

10. The method according to any one of claims 1 to 4, characterized in that, After migrating multiple storage pages of the source virtual machine to the target virtual machine based on the storage page transfer priority, the method further includes: When the target virtual machine is in a paused state and the source virtual machine has unexecuted task instructions, in response to the source virtual machine completing the execution of the task instructions, the dirty data generated by executing the task instructions and the dirty data that was not synchronized due to the pause of the target virtual machine are transferred to the target virtual machine. If the target virtual machine is running and the source virtual machine has unexecuted task instructions, the instruction reception of the source virtual machine is paused, and in response to the source virtual machine completing the execution of the task instructions, the dirty data generated by the execution of the task instructions is transferred to the target virtual machine.

11. A dirty page migration device, characterized in that, include: The acquisition module is used to acquire task execution data of the source virtual machine, wherein the task execution data is used to characterize the target task currently being executed by the source virtual machine; The prediction module is used to perform storage access prediction on the task execution data to obtain storage access prediction data of the source virtual machine. The storage access prediction is used to characterize the access behavior to the storage space of the source virtual machine. The determination module is used to determine the storage page transfer priority based on the storage access prediction data, wherein the storage page transfer priority is used to characterize the transfer priority of each storage page in the source virtual machine; The migration module is used to migrate multiple storage pages of the source virtual machine to the target virtual machine based on the storage page transfer priority.

12. An electronic device, characterized in that, include: At least one processor; as well as A memory communicatively connected to the at least one processor; wherein, The memory stores one or more computer programs that can be executed by the at least one processor to enable the at least one processor to perform the dirty page migration method as described in any one of claims 1-10.

13. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the dirty page migration method as described in any one of claims 1-10.

14. A computer program product, characterized in that, Includes computer-readable code, or a non-volatile computer-readable storage medium carrying computer-readable code, wherein when the computer-readable code is run in a processor of an electronic device, the processor in the electronic device performs the dirty page migration method as described in any one of claims 1-10.