Data migration method, access processing method, data migration system and electronic equipment

The online data migration method, which involves collaboration between the switch and the manager, solves the problem of large-scale server failures caused by memory errors in the memory pool system, achieves efficient data migration and continuity of server access, and improves system stability and performance.

CN120723665APending Publication Date: 2025-09-30HANGZHOU ALICLOUD FEITIAN INFORMATION TECH CO LTD

Patent Information

Application Number
CN202410384002.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-03-29
Publication Date
2025-09-30

AI Technical Summary

Technical Problem

In a memory pool system based on an interconnected protocol, since an MLD memory device can be used by multiple servers simultaneously, the server failure storm radius caused by memory errors is large, affecting system stability and reliability.

Method used

Through the collaboration of the switch and the manager, online data migration of the memory area is realized. The data of the erroneous memory area is migrated to the available second memory area at the page level granularity, and the migration status of the data page is recorded during the migration process to ensure the continuity of server access.

Benefits of technology

It reduces large-scale server failures caused by memory problems, improves system reliability, availability and serviceability, and reduces the impact on server performance.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120723665A_ABST
    Figure CN120723665A_ABST
Patent Text Reader

Abstract

The embodiment of the invention provides a data migration method, an access processing method, a data migration system and electronic equipment. The data migration method is applied to a switch, the switch communicates with a plurality of memory devices in a memory pool based on an interconnection protocol, and each memory device is provided with a plurality of memory areas. When data migration needs to be carried out on a first memory area in a memory pool, a switch sequentially migrates a plurality of data pages obtained by dividing data in the first memory area into available second memory areas according to pages, and in the migration process, a page bitmap determined for the first memory region is utilized to record migration states of the plurality of data pages. By adopting the scheme, the problem of large-area fault of the server caused by the memory problem can be effectively solved, the page-level granularity is adopted to migrate the data in the first memory region page by page in the migration process, the access of the server to the first memory region is continuously processed in the migration process, and the influence on the performance of the server is reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of computer technology, and in particular to a data migration method, an access processing method, a data migration system, and an electronic device. Background Art

[0002] The efficient ability of the interconnection protocol to pool memory provides servers with the possibility of memory expansion and memory sharing. In a typical server memory architecture based on the interconnection protocol, multiple servers are connected to corresponding switches, and the switches are also connected to multiple memory devices in the memory pool. Currently, in order to support dynamic allocation of any memory size, the above-mentioned memory devices are generally multiple logical devices (MLD). An MLD memory device can be divided into several memory areas, and different memory areas can be allocated to different servers. Since an MLD memory device can be used by multiple servers at the same time, compared with traditional memory devices that are single logical devices (SLD), there is a problem of a larger radius of server failure storms caused by memory problems. Summary of the Invention

[0003] In view of the above problems mentioned in the background technology, the present application provides a data migration method, access processing method, data migration system, electronic device, computer-readable storage medium, and computer program product that solve the above problems or at least partially solve the above problems.

[0004] In a first embodiment, the present application provides a data migration method applied to a switch, wherein the switch is connected to multiple memory devices in a memory pool based on an interconnection protocol, and each memory device has multiple memory areas. The method includes:

[0005] In response to a migration request triggered for a first memory area in the memory pool, dividing the data in the first memory area into pages to obtain a plurality of data pages;

[0006] Determine a page bitmap for the first memory area, wherein the page bitmap allocates a bit to each of the plurality of data pages, the bit being used to record a migration status of the corresponding data page;

[0007] The plurality of data pages are sequentially migrated to the second memory area in the memory pool, and the migration status of the plurality of data pages is recorded using the page bitmap during the migration process.

[0008] In a second embodiment, the present application provides another data migration method, which is applied to a manager. The method includes:

[0009] Receive memory error information sent by a first memory device; wherein the first memory device is one of multiple memory devices in a memory pool, and each of the multiple memory devices has multiple memory areas;

[0010] When it is determined according to the memory error information that data migration needs to be performed on the first memory area in the first memory device, selecting an available second memory area from the memory pool;

[0011] Sending a migration request to the switch to request the switch to migrate the data in the first memory area to the second memory area;

[0012] Upon receiving a migration completion response fed back by the switch, marking the first memory area as unreliable;

[0013] The switch is communicatively connected to the multiple memory devices based on an interconnection protocol; and the switch divides the data in the first memory area into multiple data pages by page, migrates the multiple data pages to the second memory area in sequence, and uses a page bitmap corresponding to the first memory area to record the migration status of the multiple data pages during the migration process.

[0014] In a third embodiment, the present application provides an access processing method applied to a switch. The method includes:

[0015] When a first server receives an access request to a first memory area during data migration in a first memory area where a memory error occurs, determining a target data page of the access request; the target data page is one of a plurality of data pages in the first memory area;

[0016] Obtaining a page bitmap corresponding to the first memory area; wherein the page bitmap records migration status information of the multiple data pages;

[0017] determining a migration status of the target data page according to the migration status information recorded in the page bitmap;

[0018] According to the migration status of the target data page, adaptive forwarding processing is performed on the access request.

[0019] The first memory area and the second memory area are memory areas in a memory pool, the memory pool includes multiple memory devices, and each memory device has multiple memory areas; the switch is communicatively connected to the multiple memory devices based on an interconnection protocol.

[0020] In a fourth embodiment, the present application provides a data migration system. The system includes:

[0021] A memory pool includes a plurality of memory devices, each memory device having a plurality of memory areas; the first memory device is one of the plurality of memory devices;

[0022] a manager configured to receive memory error information sent by the first memory device, and when determining, based on the memory error information, that data migration is required for the first memory area in the first memory device, select an available second memory area from the memory pool; and send a migration request to the switch to request the switch to migrate the data in the first memory area to the available second memory area;

[0023] A switch is connected to the manager and also communicates with each memory device in the memory pool based on an interconnection protocol, and is used to: in response to the migration request, divide the data in the first memory area into pages to obtain multiple data pages; determine a page bitmap for the first memory area, wherein the page bitmap allocates a bit to each data page in the multiple data pages, and the bit is used to record the migration status of the corresponding data page; migrate the multiple data pages to the second memory area in sequence, and use the page bitmap to record the migration status of the multiple data pages during the migration process.

[0024] In a fifth embodiment, the present application provides an electronic device. The electronic device includes a memory and a processor, wherein the memory is used to store a program; the processor is coupled to the memory and is used to execute the program stored in the memory to implement the steps of each method embodiment provided in the present application;

[0025] In which, the electronic device is a switch based on an interconnection protocol or a manager connected to the switch; when the electronic device is the switch, it also includes a migration engine, and the processor and the migration engine cooperate to implement the steps of the method provided in the first embodiment or the third embodiment above; when the electronic device is the manager, it is used to implement the steps of the method provided in the second embodiment above.

[0026] In a sixth embodiment, the present application provides a computer-readable storage medium having a computer program stored therein; when the computer program is executed by a processor, the steps in each of the method embodiments provided above can be implemented.

[0027] In a seventh embodiment, the present application provides a computer program product, which includes a computer program, and when the computer program is executed by a processor, the processor is enabled to implement the steps of each method embodiment provided in the present application.

[0028] The technical solution provided by the embodiment of the present application is that the switch is connected to multiple memory devices in the memory pool based on the interconnection protocol, and each memory device has multiple memory areas. When it is necessary to migrate data in the first memory area in the memory pool (such as a memory error occurs in the first memory area), the switch divides the data in the first memory area by page and migrates the multiple data pages obtained by the division to the available second memory area in sequence, and during the migration process, a page bitmap determined for the first memory area is used to record the migration status of the multiple data pages. It can be seen that in the memory data scenario based on the interconnection protocol, this solution can realize online migration of data in the memory area when an error occurs in one or more memory areas in the memory pool, which is conducive to solving large-scale server failures caused by memory problems. In addition, during the migration process, page-level granularity is used to migrate data in the first memory area page by page, and the server's access to the first memory area is continued to be processed during the migration process. Specifically, if an access request to the first memory area is received from the first server, the migration status of the target data page requested to be accessed can be determined based on the migration status of multiple data pages in the first memory area recorded in the page bitmap of the first memory area, and then adaptive forwarding processing can be performed on the access request of the first server based on the migration status of the target data page. This solution will not prevent the server from continuing to access a certain memory area during the process of migrating data in the memory area. Obviously, this is conducive to reducing the performance impact on the server. BRIEF DESCRIPTION OF THE DRAWINGS

[0029] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the following is a brief introduction to the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.

[0030] Figure 1 A schematic diagram of the structure of a hardware system (data migration system) provided in one embodiment of the present application;

[0031] Figure 2 An example of an address translation table provided in an embodiment of the present application;

[0032] Figure 3 A schematic diagram of the workflow of a manager provided in one embodiment of the present application;

[0033] Figure 4 A schematic diagram of the workflow of a replication engine included in a migration engine in a switch according to an embodiment of the present application;

[0034] Figure 5A schematic diagram of a workflow for a switch processing a server access request according to an embodiment of the present application;

[0035] Figure 6 A schematic diagram of a flow chart of an access request processing module included in a migration engine provided in an embodiment of the present application processing an access request from a server;

[0036] Figure 7 and Figure 8 A flowchart of a data migration method provided in an embodiment of the present application;

[0037] Figure 9 A flowchart of an access processing method provided in one embodiment of the present application;

[0038] Figure 10 A schematic diagram of the structure of an electronic device provided in one embodiment of the present application. DETAILED DESCRIPTION

[0039] The interconnection protocol is an open protocol that supports connecting multiple servers, connecting a memory pool composed of multiple memory devices, and allocating different memory areas in the memory pool to different services. It provides the possibility of memory expansion and memory sharing for servers. Taking the interconnection protocol CXL (Compute Express Link) as an example, a typical use case of the CXL protocol is the memory pool system. This memory pool system (see Figure 1 ) includes: multiple hosts, a CXL switch (CXL Switch), a CXL memory pool containing multiple CXL memory devices, etc. Multiple hosts are connected to the upstream port of the CXL switch, and multiple CXL memory devices are connected to the downstream port of the CXL switch. In order to support dynamic allocation of arbitrary memory sizes, the CXL protocol defines the concept of multiple logical devices (MLDs). That is, under the CXL protocol, the above-mentioned multiple CXL memory devices can all be MLD memory devices, and an MLD memory device can be divided into multiple memory areas (or called memory segments), and different memory areas can be allocated to different hosts (such as servers) for use. However, in such a memory pool system based on the CXL protocol, since an MLD memory device can be used by multiple hosts at the same time, it will result in a larger host failure explosion radius than a traditional single logical device (SLD) in the event of a memory error.

[0040] In order to solve the above problems, the present application provides an online memory data migration solution for a memory pool system based on an interconnection protocol (such as the CXL protocol), so that when an error (i.e., a failure) occurs in a memory area in the memory pool, the data in the memory area can be automatically migrated to other memory areas in the memory pool that do not have errors, thereby reducing the host (such as a server) failure storm caused by memory problems and improving the performance indicators (such as RAS) of the extended memory (memory pool) to a level close to that of the host's local memory. Among them, the performance indicators referred to by RAS include: reliability (Reliability), availability (Availability) and serviceability (SeServiceability).

[0041] For example, when a memory error (such as an ECC error) occurs in memory region a within a CXL-based memory pool (referred to as the CXL memory pool), the memory device to which memory region a belongs reports the memory error information to the fabric manager (FM). After the FM determines that memory region a meets specific unreliability criteria based on the received memory error information, the FM and a CXL-based switch (referred to as the CXL switch) collaborate to initiate an online migration process to migrate the data in the unreliable memory region a (the source memory region) to a reliable memory region b (the destination memory region). During the migration process, the CXL switch continues to service host requests to memory region a (the source memory region) in a specific service manner. The CXL switch stores an address translation table, in which each entry records the mapping between a host's physical address and the address information of the corresponding memory region in the memory pool. After the CXL switch completes the data migration in memory region a, it updates the address translation table entry associated with memory region a, replacing the address information for memory region a with the address information for memory region b. Furthermore, the fabric manager (FM) replaces the address information for memory region a in its locally stored memory allocation table with the address information for memory region b. The memory allocation table records the mapping between the host and the address information for the memory regions allocated to it by the fabric manager. Consequently, future requests to memory region a will be routed to memory region b. When there are no pending requests for memory region a (i.e., requests are in progress), the fabric manager (FM) closes memory region a and marks it as unreliable to prevent future allocations.

[0042] In order to enable those skilled in the art to better understand the solution of the present application, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application.

[0043] Some processes described in the specification, claims, and figures of this application include multiple operations that appear in a specific order. These operations may be executed in a different order than the order in which they appear in this document, or in parallel. Operation numbers, such as 101 and 102, are simply used to distinguish between different operations and do not imply any order of execution. Furthermore, these processes may include more or fewer operations, and these operations may be executed sequentially or in parallel. It should be noted that terms such as "first" and "second" are used herein to distinguish between different messages, devices, modules, etc., and do not imply a sequential order, nor do they limit "first" and "second" to different types. The term "or / and" in this application simply describes an association relationship between associated objects, indicating that three possible relationships can exist. For example, "A or / and B" indicates that A can exist alone, A and B can exist simultaneously, or B can exist alone. The character " / " in this application generally indicates that the associated objects are in an "or" relationship. It should also be noted that the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a product or system comprising a series of elements includes not only those elements, but also other elements that are not explicitly listed, or also includes elements that are inherent to such product or system. In the absence of further restrictions, an element defined by the statement "comprising a ..." does not exclude the presence of other identical elements in the product or system comprising the element. In addition, the following embodiments are only some of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without making creative work are within the scope of protection of this application.

[0044] Before introducing the technical solutions provided by the embodiments of this application, some terms involved in this application are first explained.

[0045] CXL: is a new device interconnection technology standard. Since its launch, it has been adopted by more and more manufacturers and has become a unified standard interconnection protocol. Specifically, the CXL protocol is based on PICe Gen5+ (5th generation Peripheral Component Interconnect Express) technology. It is a cache coherent interconnection protocol for processors (CPUs), memory expansion and accelerators. It consists of the following three sub-protocols: CXL.io, CXL.cache (CXL cache protocol) and CXL.mem (CXL memory protocol). Among them, CXL.io is used for device discovery, configuration, register access, error reporting, host physical address lookup, interrupts, etc., CXL.cache is used to expand the system cache, and CXL.mem is used to expand the system memory. The above three sub-protocols can provide online level read and write support for the host to access peripheral memory and peripheral devices to access host memory.

[0046] CXL memory devices include DDR (Double Data Rate Synchronous Dynamic Random Access Memory), a memory controller, and provide CXL interfaces and cache-level memory access capabilities.

[0047] A CXL switch is a switch designed specifically for the CXL protocol, supporting communication between components / devices connected to it using the CXL protocol.

[0048] Fabric Manager (FM) is a management software used to manage memory and device allocation, switch routing, and other system operating status.

[0049] A CXL Memory Pool is a memory system with multiple CXL memory devices that connect to the downstream ports of a CXL switch and provide content expansion for multiple hosts. The multiple hosts connect to the upstream ports of the CXL switch and communicate with the fabric manager (FM) via Ethernet. The fabric manager (FM) is also connected to the upstream ports of the switch.

[0050] The RAS of the CXL memory pool refers to the reliability, availability, and serviceability of the CXL memory pool. These three indicators can be used to evaluate system performance and ensure stable system operation and rapid fault recovery.

[0051] The Address Translation Table (ATT) is a table used to record the mapping relationship between the host's physical address and the address information of the corresponding memory area in the memory pool.

[0052] In order to facilitate understanding of the present application, the hardware system architecture on which the method provided in this application is based is first introduced and explained.

[0053] Figure 1 FIG. 1 shows a schematic diagram of the structure of the hardware system (ie, data migration system) provided by this application. Figure 1 The hardware system includes: a memory pool 30 , a switch 20 based on an interconnection protocol, and a manager 40 .

[0054] The memory pool 30 includes multiple memory devices. Each memory device may be an MLD memory device, in which case each memory device has multiple memory regions. Each memory device is connected to a corresponding downstream port 24 of the switch 20. Specifically, each memory device is connected to the corresponding downstream port of the switch 20 based on an interconnection protocol. The interconnection protocol described herein may be, but is not limited to, the CXL protocol. Figure 1 Figure 2 shows an example where the interconnect protocol is the CXL protocol. In this case, switch 20 is also referred to as a CXL switch, and memory pool 30 is also referred to as a CXL memory pool. Manager 40 is the aforementioned fabric manager FM, which is connected to the corresponding upstream port 23 of switch 20 based on PCIe (Peripheral Component Interconnect Express).

[0055] Furthermore, the hardware system also includes: multiple servers 10 (Sever), such as server 11, server 12, etc., and the multiple servers 10 are connected to the corresponding upstream ports 23 of the switch 20 based on the CXL protocol. In addition, the multiple servers 10 are also connected to the manager 40 via traditional Ethernet. The manager 40 can allocate corresponding memory areas in the memory pool to the multiple servers for use by the multiple servers. Specifically, the first server is one of the multiple servers, and the manager 40 allocates the corresponding memory area in the memory pool to the first server as follows:

[0056] 11) The first server communicates with the manager 40 via Ethernet and sends a memory request to the manager 40 to request the manager 40 to allocate a memory area in the memory pool to the first server. The memory request includes the physical address of the first server (which is the starting physical address) and the requested memory size.

[0057] 12) After receiving the memory request from the first server, the manager 40 performs the following operations: first, based on the region information (such as reliability status, occupancy status, memory size, etc.) of each memory region in the memory pool, it selects a memory region R from the memory pool that is compatible with the requested memory size and available as the target memory region to be allocated to the first server; then, it establishes a mapping relationship between the physical address of the first server and the address information of the memory region R and adds it to a locally stored memory region allocation table for storage; and edits the address translation table in the switch 20, such as through a PCIe interface, to add a new entry to the address translation table. This new entry records the mapping relationship between the physical address of the first server and the address information of the memory region R. The address information of the memory region R includes: the device identifier and address offset of the memory device D to which the memory region R belongs, and the address offset points to the memory region R in the memory device. Thereafter, the manager 40 sends a corresponding memory allocation success response message to the first server via Ethernet. The response message may include the address information of the memory region R allocated to the first server, notifying the first server that it can now access the corresponding memory region R in the memory pool.

[0058] Regarding how the manager 40 allocates corresponding memory areas in the memory pool to other servers in the plurality of servers except the first server, please refer to the descriptions in 11) to 12) above, which will not be repeated here.

[0059] It should be noted that each entry in the address translation table, in addition to recording the mapping between the physical address of the corresponding server and the address information of the corresponding memory region, also records other information, such as memory size (e.g., the memory size of the memory region, the memory size of the memory device to which the memory region belongs), the data migration status of the memory region, etc. In the address translation table, the data migration status of a memory region is initially set to "not being migrated" by default. When the switch 20 performs data migration on this memory region, the data migration status of the memory region may be updated according to the data migration progress, for example, to "migrating" or "completed". Figure 2 An example of an address translation table is shown.

[0060] Based on the above, the manager 40 is configured to: in response to a memory request from a first server, select an appropriate target memory region from all memory regions in the memory pool and allocate it to the first server based on the region information of all memory regions in the memory pool; add a first entry to the address translation table in the switch 20 based on the target memory region allocated to the first server, recording a mapping relationship between the physical address of the first server, the address information of the target memory region allocated to the first server, and the data migration status of the target memory region; and send a response message containing the memory region allocation result to the first server, so that the first server can access the corresponding target memory region in the memory pool based on the response message.

[0061] The switch 20 includes an address translation table, which contains multiple entries. One entry is used to record the mapping relationship between the physical address of a server 10, the address information of a memory area, and the data migration status. The memory area in this entry is allocated to the server by the manager in response to a memory request from a server. Based on the area information of all memory areas in the memory pool, the manager selects a memory area from the memory pool that is compatible with the memory request. The address information of a memory area includes the device identifier (such as the device port ID) of the memory device to which the memory area belongs and an address offset, and the address offset points to the memory area.

[0062] Continuing with the above description of the first server, after the memory allocation is completed, the first server can subsequently access the memory area R allocated to it by the manager 40. The specific access process can be as follows:

[0063] 21) The first server sends an access request (a read or write request) to the switch 20. The access address carried in the access request is within the address range of the memory area R originally allocated to it by the manager 40.

[0064] 22) After receiving the access request sent by the first server, the switch 20 will search the local address translation table for the address information of the memory area R corresponding to the first server, and then determine the device identifier and address offset of the corresponding memory device D based on the address information of the memory area R found; then, based on the device identifier and address offset of the memory device D, the access request will be forwarded to the memory device D.

[0065] 23) The memory controller in the memory device D performs corresponding read and write operations in response to the received access request, and returns the read and write operation results to the first server via the switch 20.

[0066] Because the memory devices in the memory pool have multiple memory areas, different memory areas can be allocated to different servers. In other words, a single memory device in the memory pool can be used by multiple servers simultaneously. This results in a wide range of server failure blast radiuses when a memory error occurs in the memory device. To address this issue, the present application implements an online data migration solution for the memory areas in the memory pool through manager 40 and switch 20 when an error occurs in a memory area in the memory pool. During the migration process, user applications are completely unaware of the migration process, and migration does not require user application participation. Therefore, migration implementation does not require any user applications, which has certain benefits for related use cases.

[0067] Specifically, when a memory error occurs in a memory area in the memory pool, the process of online data migration of the corresponding memory area is implemented by the manager 40 and the switch 20 as follows:

[0068] (1) Manager 40

[0069] Whenever a memory error occurs in a memory area in the memory pool, for example, a memory error occurs in the first memory area in the memory pool, where the first memory area belongs to one of the multiple memory areas included in the first memory device in the memory pool, the first memory device will send an interrupt request to the manager 40 through any interrupt mechanism included in PCIe, so as to report the memory error information of the first memory area to the manager 40 (specifically, the processor in the manager 40) through the interrupt request. The PCIe interrupt mechanisms include: MSI (Message Signaled Interrupt) and MSI-X (Message Signaled Interrupt eXtended). The MSI interrupt mechanism supports up to 32 interrupt requests and requires continuous interrupt vectors. The MSI-X interrupt mechanism can support more interrupt requests and does not require continuous interrupt vectors.

[0070] Furthermore, in response to an interrupt request sent by the first memory device, the manager 40 activates its interrupt service and begins processing memory error information for the first memory device. Specifically, the manager 40 determines whether the accumulated memory error information received from the first memory region meets a migration condition (i.e., a migration criterion). This migration condition is vendor-specific. For example, meeting the migration condition may include, but is not limited to: the error type being an uncorrectable error (e.g., a hard error caused by physical damage to the memory device itself), the number of consecutive memory errors reaching a set threshold, the duration of the memory errors reaching a set threshold, etc. Once the migration condition is determined to be met, it indicates that data migration is required for the first memory region. The manager 40 then initiates the migration process and, based on the memory size of the first memory region, selects an available second memory region from the memory pool that matches the memory size of the first memory region. After the selection is complete, the manager 40 sends a migration request (req) (also known as a migration instruction) to the switch 20 (specifically, the migration engine within the switch), causing the switch 20 to migrate the data in the first memory region to the second memory region in accordance with the migration request. The specific implementation of the switch 20 migrating the data in the first memory region in accordance with the migration request will be described in detail below and is not further elaborated here. The first memory area is also referred to as the old memory area or the source memory area, and the second memory area is also referred to as the new memory area or the destination memory area.

[0071] Furthermore, after the manager 40 receives the migration completion response returned by the switch 20, it will update the local memory allocation table to update the address information of the first memory area in the memory allocation table to the address information of the second memory area, and mark the first memory area as unreliable to avoid the first memory area being allocated in the future.

[0072] Figure 3 A schematic diagram of the workflow of the manager 40 in memory data migration is shown.

[0073] (2) Switch 20

[0074] The switch 20 includes an address translation table 21 and a migration engine 22. For details about the address translation table 21, please refer to the relevant content in other embodiments of this application. During the memory data migration process, the switch 20 plays an important role: the migration engine 22 in the switch 20 is responsible for migrating data from the old memory area to the new memory area.

[0075] See Figure 1 The structure of the migration engine 22 in the switch 20 shown in FIG. 2 includes: a migration request queue 221, a replication engine 223, and a bitmap module 224.

[0076] The migration request queue 221 is a FIFO (First Input First Output) queue for storing the migration requests received from the manager 40. When the corresponding migration is completed for a migration request, the migration request will be removed from the migration request queue.

[0077] The replication engine 223 is responsible for migrating data from the old memory area to the new memory area, wherein the migration method adopted may be a replication method. To minimize the performance impact on the server, the data migration process is completed at the page level granularity. When using this migration method, the page bitmap contained in the bitmap module 224 is used to record the pages that have been migrated (i.e., the data pages described below).

[0078] Specifically, see Figure 4 The workflow diagram of the replication engine 223 shown in FIG. 1 is based on the example memory provided for the manager 40 in section (I). A migration request req is stored in the migration request queue. The migration request req is a request to migrate data in the first memory area to the second memory area. Then, after the replication engine 223 initiates a new data migration process in response to the migration request req, it executes the following steps:

[0079] Step 1) Reset the page bitmap in the bitmap module 224 to an appropriate length based on the memory size of the first memory area (the old memory area to which data migration is required). For example, the bitmap length (referred to as length) of the page bitmap after reset is 20.

[0080] It should be noted that the page bitmap is a bitmap. Its bitmap length reflects the number of bits contained in the page bitmap. Each bit is typically represented by 0 and 1 to record the two states of the corresponding target object. For example, if the target object is page data, 0 and 1 can be used to record the following two states of the page data: not migrated and migrated.

[0081] Step 2) sequentially copying multiple data pages in the first memory area to the second memory area (the target area for data migration, i.e., the new memory area), wherein the multiple data pages can be obtained by dividing the data in the second memory area according to a certain page size using memory paging technology. When a data page is copied, the value of the bit corresponding to the data page in the page bitmap is set to a set value, such as 1, to indicate that the data page has been migrated and access to the data page should enter the new memory area.

[0082] After the copy engine 223 completes copying all data pages in the first memory region, the migration engine 22 updates the corresponding entry in the local address translation table 21 of the switch 20, replacing the address information of the first memory region recorded in the entry with the address information of the second memory region. Furthermore, the migration engine 22 sends a migration completion response message to the manager 40, so that the manager 40 can initiate an update of the local memory allocation table to replace the address information of the first memory region recorded in the memory allocation table with the address information of the second memory region.

[0083] Based on the above description of the manager 40 and the switch 20, the functions of the manager 40 and the switch 20 may include the following:

[0084] The manager 40 is configured to receive memory error information sent by a first memory device and, upon determining, based on the memory error information, that data migration of a first memory area in the first memory device is required, select an available second memory area from a memory pool; and, based on area information of the second memory area, send a migration request to a switch (specifically, to a migration engine in the switch); wherein the migration request is configured to request migration of data in the first memory area to the available second memory area, and the first memory device is one of a plurality of memory devices in the memory pool.

[0085] The switch 20 is configured to: in response to the migration request, divide the data in the first memory area into pages to obtain a plurality of data pages; determine a page bitmap for the first memory area, wherein the page bitmap assigns a bit to each of the plurality of data pages, and the bit is used to record the migration status of the corresponding data page; migrate the plurality of data pages to the second memory area in sequence, and use the page bitmap to record the migration status of the plurality of data pages during the migration process.

[0086] The switch 20 includes a migration engine 22, which is used to execute content related to migrating data in the first memory area to the second memory area. In specific implementation, the migration engine 22 includes a migration request queue 221 and a replication engine 223. The migration request queue 221 is used to store the migration request sent by the manager received by the migration engine. The replication engine 223 is used to execute the migration of data in the first memory area to the second memory area, specifically, it is used to execute the following content: divide the data in the first memory area into pages to obtain multiple data pages; determine a page bitmap for the first memory area; migrate the multiple data pages to the second memory area in sequence, and use the page bitmap to record the migration status of the multiple data pages during the migration process. Among them, the migration engine 22 also includes a bitmap module 224, which has a page bitmap; and when the copy engine 223 is used to determine a page bitmap for the first memory area, it is specifically used to: reset the page bitmap in the bitmap module 224 according to the memory size of the first memory area to obtain the reset page bitmap, and the reset page bitmap is a page bitmap determined for the first memory area.

[0087] In addition to the aforementioned functions, the switch 20 also has another important function: during the memory data migration process, the switch 20 itself will continue to process the server's access request (read or write request) to the old memory area.

[0088] Figure 5 FIG2 shows a schematic diagram of the workflow of the switch 20 processing the access request of the server. Figure 5 , the switch 20 receives an access request from a server, wherein the access address carried in the access request is within the address range of the memory area corresponding to the server; then, in response to the access request, it will determine, in combination with the locally stored address translation table, whether the memory area corresponding to the server is in the data migration process. If so, the switch 20 forwards the access request to the migration engine 22 therein for processing; if not, the switch 20 itself processes the access request in a normal manner (i.e., directly forwards the access request to the memory device to which the memory area corresponding to the server belongs for processing).

[0089] It should be noted that: in response to the access request from the server, the switch 20 can find the target entry related to the server from the address translation table according to the physical address of the server. The target entry records the mapping relationship between the physical address of the server, the address information of the memory area corresponding to the server, and the data migration status. Therefore, based on the mapping relationship recorded in the target entry, the data migration status of the memory area corresponding to the server can be determined. If the data migration status is migrating, the memory area corresponding to the server is in the process of data migration. If the data migration status is not migrating, the memory area corresponding to the server is not in the process of data migration.

[0090] After receiving the access request forwarded by the switch 20, the migration engine 22 processes it using its access request processing module. Specifically, the migration engine 22 also includes an access request processing module 222, also known as a host (e.g., server) request handler, which processes the server's access request, where the requested access address belongs to an address range that points to a memory area that is currently undergoing data migration.

[0091] Figure 6 FIG. 1 shows a flow chart of how the access request processing module processes the access request of the server. Figure 6 When the access request processing module receives an access request from a server forwarded by switch 20, it first adapts the request based on the migration status of the target data page pointed to by the requested access address. For example, if the target data has been migrated, the access request is directed to the new memory area where the migrated target data page is located. If the target data page is currently being migrated, the access request is directed to the new memory area after the migration is complete. If the target data page has not yet been migrated, the access request is directed to the old memory area where the target data page was originally located.

[0092] It should be noted that the migration status of the target data page can be determined based on the data page migration status information recorded in the page bitmap corresponding to the address range to which the access address belongs (i.e., the page bitmap of the old memory area). For example, assuming that the i-th bit in the page bitmap is the bit allocated for the target data page, then: if the value of the i-th bit is a set value (such as 1), it indicates that the target data page has completed migration; if the value of the previous bit before the i-th bit (i.e., the i-1th bit) is set to the set value and the value of the i-th bit is 0, it indicates that the data page sorted before the target data page has completed migration, and the current target data page is in the process of migration. In other cases, it indicates that the target data has not yet been migrated.

[0093] Based on the above combination Figure 5 and Figure 6Regarding the related content described, if the first service is one of multiple servers and its corresponding memory area is the first memory area, the switch 20 is also used to: upon receiving an access request sent by the first server to the first memory area, determine whether the first memory area is in the data migration process; if so, send the access request to the migration engine within itself, so that the migration engine uses the access request processing module therein to process the access request; if not, forward the access request directly to the first memory device to which the first memory area belongs for processing.

[0094] The access request processing module processes the received access request including: upon receiving an access request from the first server to the first memory area, determining the target data page requested for access, the target data page being one of the multiple data pages in the first memory area; determining the migration status of the target data page based on the migration status information of the multiple data pages recorded in the page bitmap corresponding to the first memory area; and performing adaptive processing on the access request based on the migration status of the target data page. The processing includes: if the migration status of the target data page is not migrated, forwarding the access request to the first memory device to which the first memory area belongs; if the migration status of the target data page is migrating, retaining the access request and forwarding the access request to the second memory device to which the second memory area belongs after the migration of the target data page is completed; if the migration status of the target data page is completed migration, forwarding the access request to the second memory device to which the second memory area belongs.

[0095] In summary, the technical solution provided by the embodiment of the present application is that the switch is connected to multiple memory devices in the memory pool based on the interconnection protocol, and each memory device has multiple memory areas. When a memory error occurs in the first memory area in the memory pool, the switch divides the data in the first memory area by page and migrates the multiple data pages obtained by the division to the available second memory area in sequence, and during the migration process, a page bitmap determined for the first memory area is also used to record the migration status of the multiple data pages. It can be seen that in the memory data scenario based on the interconnection protocol, this solution can realize the online migration of data in one or more memory areas in the memory pool when an error occurs, which is conducive to solving large-scale server failures caused by memory problems. In addition, during the migration process, page-level granularity is used to migrate data in the first memory area page by page, and the server's access to the first memory area is continued to be processed during the migration process. Specifically, if an access request to the first memory area is received from the first server, the migration status of the target data page requested to be accessed can be determined based on the migration status of multiple data pages in the first memory area recorded in the page bitmap of the first memory area, and then adaptive forwarding processing can be performed on the access request of the first server based on the migration status of the target data page. This solution will not prevent the server from continuing to access a certain memory area during the process of migrating data in the memory area. Obviously, this is beneficial to reducing the performance impact of the server.

[0096] This application also provides several method embodiments applied to the hardware system architecture provided above. The details are as follows:

[0097] Figure 7 A schematic diagram of a data migration method provided by the present application is shown. Figure 1 The switch 20 shown in FIG. 1 is connected to multiple memory devices in the memory pool based on an interconnection protocol (such as the CXL protocol), each memory device having multiple memory areas. In addition, the switch 20 is also connected to a manager 40.

[0098] like Figure 7 , the data migration method includes the following steps:

[0099] S101: In response to a migration request triggered for a first memory area in the memory pool, divide data in the first memory area into pages to obtain a plurality of data pages;

[0100] S102: Determine a page bitmap for the first memory area, wherein a bit is allocated to each of the plurality of data pages in the page bitmap, and the bit is used to indicate a migration status of the corresponding data page;

[0101] S103: Migrate the multiple data pages to the second memory area in the memory pool in sequence, and use the page bitmap to record the migration status of the multiple data pages during the migration process.

[0102] In S101 above, the migration request is sent by the manager when it determines that data migration is required for the first memory area. For example, when it determines that a memory error in the first memory area meets the preset migration conditions, the manager sends the corresponding migration request to the switch. Therefore, before step S101, the following steps are also included:

[0103] S100, receiving a migration request sent by a manager;

[0104] The migration request is sent by the manager to the switch when determining that data migration is required for the first memory area where a memory error occurs, to request the switch to migrate the data in the first memory area to the available second memory area.

[0105] The manager communicates with multiple memory devices in the memory pool via Ethernet. The first memory region is one of multiple memory regions of the first memory device, and the first memory device is one of the multiple memory devices. The manager may send a migration request when it determines, based on memory error information received from the first memory device regarding the first memory region, that the first memory region meets preset migration conditions. For a detailed description of the manager sending a migration request to the switch, please refer to the relevant content in other embodiments of this application and will not be repeated here.

[0106] In the above S101, a paging technology may be used to divide the data in the first memory area using a specified page size as a unit to obtain a plurality of data pages of the same size.

[0107] In a specific implementation, the above-mentioned S102 “determining a page bitmap for the first memory area” may include:

[0108] S1021. Obtaining area information of the first memory area (such as memory size, reliability status, etc.)

[0109] S1022: Determine a bitmap length reflecting the number of bits based on the memory size included in the area information of the first memory area;

[0110] S1023. Generate a page bitmap for the first memory area according to the bitmap length.

[0111] For the specific implementation of the above S1021 to S1023, please refer to the relevant content in other embodiments of this application.

[0112] In a specific implementation, the step of “recording the migration status of the plurality of data pages using the page bitmap during the migration process” in step 103 may include:

[0113] S1031 . When any one of the plurality of data pages has completed migration, the value of the bit corresponding to the data page in the page bitmap is set to a set value, where the set value indicates that the migration of the data page has been completed.

[0114] Furthermore, the method provided in this embodiment also includes:

[0115] S104: upon receiving an access request for the first memory area from the first server, determining whether the first memory area is in a data migration process;

[0116] S105, if yes, determining the migration status of the target data page in the first memory area requested for access based on the migration status information of the multiple data pages recorded in the page bitmap; and performing adaptive forwarding processing on the access request based on the migration status of the target data page;

[0117] S106: If not, forward the access request to the first memory device to which the first memory area belongs.

[0118] In a specific achievable technical solution, the step of “determining whether the first memory area is in the data migration process” in S104 may include:

[0119] S1041. Search, based on the physical address of the first server, a local address translation table for a first entry related to the first server. The first entry records a mapping relationship between the physical address of the first server, address information of the first memory region, and a data migration status. The address information includes a device identifier and an address offset of the first memory device. The address offset points to the first memory region.

[0120] S1042: If the data migration status of the first memory area in the first entry is in the migrating state, determine that the first memory area is in the data migration process.

[0121] S1043: If the data migration status of the first memory area in the first entry is not in migration, determine that the first memory logical area is not in the data migration process.

[0122] In S105 above, while the first memory area is in the process of data migration, the switch 20 sends the received access request to the access request processing module within its migration engine for processing. That is, step S106 is performed by the access request processing module within the switch. The target data page is one of multiple data pages within the first memory area, which can be determined by the access request processing module based on the access address carried in the access request, which falls within the address range of the first memory area.

[0123] And, in a feasible technical solution, the "performing adaptive forwarding processing on the access request according to the migration status of the target data page" in the above S105 includes: if the migration status of the target data page is not migrated, forwarding the access request to the first memory device; if the migration status of the target data page is migrating, retaining the access request and forwarding the access request to the second memory device belonging to the second memory area after the migration of the target data page is completed; if the migration status of the target data page is completed migration, forwarding the access request to the second memory device.

[0124] For the specific implementation description of the above steps in this embodiment, please refer to the relevant content in other embodiments. In addition, in addition to the above steps, the method provided in the embodiment of the present application may also include other steps. For the other steps that may be included and the specific implementation description, please refer to the relevant content in other embodiments, which will not be repeated here.

[0125] Figure 8 A flow chart of another data migration method provided by the present application is shown. Figure 1 The manager 40 shown in FIG. 1 is in communication with the switch 20. Figure 7 , the data migration method includes the following steps:

[0126] S201: Receive memory error information sent by a first memory device; wherein the first memory device is one of multiple memory devices in a memory pool, and each of the multiple memory devices has multiple memory areas;

[0127] S202: When it is determined, based on the memory error information, that data migration needs to be performed on the first memory area in the first memory device, selecting an adaptive and available second memory area from the memory pool;

[0128] S203: Send a migration request to the switch to request the switch to migrate the data in the first memory area to the second memory area;

[0129] S204: upon receiving a migration completion response from the switch, marking the first memory area as unreliable;

[0130] The switch is communicatively connected to the multiple memory devices based on an interconnection protocol; and the switch divides the data in the first memory area into multiple data pages by page, migrates the multiple data pages to the second memory area in sequence, and uses a page bitmap corresponding to the first memory area to record the migration status of the multiple data pages during the migration process.

[0131] For the specific implementation description of the above steps in this embodiment, please refer to the relevant content in other embodiments. In addition, in addition to the above steps, the method provided in the embodiment of the present application may also include other steps. For the other steps that may be included and the specific implementation description, please refer to the relevant content in other embodiments, which will not be repeated here.

[0132] Figure 9 A schematic diagram of a process flow of an access processing method provided by the present application is shown. Figure 1 The switch 20 shown in FIG. 1 is more specifically an access request processing module in the switch 20. The switch 20 is connected to multiple servers 10 in communication based on an interconnection protocol (such as the CXL protocol). Figure 9 , the access processing method includes the following steps:

[0133] S301: When a first server receives a request for access to a first memory area during data migration (e.g., migration to an available second memory area) in a first memory area where a memory error occurs, determining a target data page for the access request; the target data page is one of multiple data pages in the first memory area.

[0134] S302: Obtain a page bitmap corresponding to the first memory area; wherein the page bitmap records migration status information of the multiple data pages;

[0135] S303, determining the migration status of the target data page according to the migration status information recorded in the page bitmap;

[0136] S304: Perform adaptive forwarding processing on the access request according to the migration status of the target data page.

[0137] The first memory area and the second memory area are memory areas in a memory pool, the memory pool includes multiple memory devices, and each memory device has multiple memory areas; the switch is communicatively connected to the multiple memory devices based on an interconnection protocol.

[0138] For the specific implementation description of the above steps in this embodiment, please refer to the relevant content in other embodiments. In addition, in addition to the above steps, the method provided in the embodiment of the present application may also include other steps. For the other steps that may be included and the specific implementation description, please refer to the relevant content in other embodiments, which will not be repeated here.

[0139] Figure 10 FIG. 1 shows a schematic diagram of the structure of an electronic device provided by an embodiment of the present application. Figure 10 As shown, the electronic device includes: a memory 41 and a processor 42. The memory 41 can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic disk or optical disk. Specifically,

[0140] The memory 41 is used to store programs;

[0141] The processor 42 is coupled to the memory 41 and is used to execute the program stored in the memory for performing the steps or functions in the methods provided in the embodiments of the present application.

[0142] Further, if Figure 10 The electronic device also includes other components such as a communication component 43, a power component 44 and an audio component 45. Figure 10 Only some components are shown schematically, which does not mean that the electronic device only includes Figure 10 Components shown.

[0143] The electronic equipment is as follows Figure 1 The switch 20 based on the interconnection protocol shown in the figure is a manager 40 connected to the switch. When the electronic device is the switch, the electronic device further includes a migration engine, and the processor and the migration engine cooperate to realize the combination Figure 7 Steps in the data migration method provided, or used to achieve the combination Figure 9 The steps in the access processing method provided. For the specific structure of the migration engine, please refer to the relevant content in other embodiments of this application. When the electronic device is the manager, it is used to implement the combination Figure 8 Steps in the provided data migration method.

[0144] Based on the above, the present application also provides a switch, which is connected to multiple memory devices in a memory pool based on an interconnection protocol, and each memory device has multiple memory areas. Figure 1 and Figure 10 As shown,

[0145] In one embodiment, the switch 20 includes a migration engine 22. The migration engine includes a migration request queue 221 and a replication engine 223; wherein,

[0146] A migration request queue 221 is used to store migration requests sent by the manager and received by the migration engine, wherein the migration request is used to request migration of data in a first memory area where a memory error occurs in the memory pool to an available second memory area;

[0147] The replication engine 223, in response to the migration request, divides the data in the first memory area into pages to obtain multiple data pages; determines a page bitmap for the first memory area, wherein the page bitmap allocates a bit to each of the multiple data pages, and the bit is used to record the migration status of the corresponding data page; migrates the multiple data pages to the second memory area in sequence, and uses the page bitmap to record the migration status of the multiple data pages during the migration process.

[0148] Furthermore, when the copy engine 223 is used to determine a page bitmap for the first memory area, it is specifically used to: determine a bitmap length reflecting the number of bits based on the memory size of the first memory area; and generate a page bitmap for the first memory area based on the bitmap length.

[0149] Furthermore, the migration also includes: a bitmap module 224, having a page bitmap; and the copy engine 223, when used to generate a page bitmap for the first memory area according to the bitmap length, is specifically used to: reset the page bitmap in the bitmap module according to the bitmap length to obtain the reset page bitmap; the reset page bitmap is the page bitmap generated for the first memory area.

[0150] Furthermore, when the copy engine 223 is used to record the migration status of the multiple data pages using the page bitmap during the migration process, it is specifically used to: when any one of the multiple data pages completes the migration, set the value of the bit corresponding to the any one data page in the page bitmap to a set value, and the set value indicates that the migration of any one data page has been completed.

[0151] Furthermore, the switch further includes: a processor; and the migration engine further includes an access request processing module 222. The processor includes a determination module and a sending module. The determination module is configured to: upon receiving an access request sent by the first server for the first memory area, determine whether the first memory area is in a data migration process; and the sending module is configured to: if the first memory area is in a data migration process, send the access request to the access request processing module 222 in the migration engine; and if the first memory area is not in a data migration process, forward the access request to the first memory device to which the first memory area belongs.

[0152] and the access request processing module 222 is configured to, in response to the received access request, determine the migration status of the target data page in the first memory area requested for access based on the migration status information of the multiple data pages recorded in the page bitmap; and perform adaptive forwarding processing on the access request based on the migration status of the target data page;

[0153] Furthermore, when used to determine whether the first memory area is in the process of data migration, the above-mentioned determination module is specifically used to: search for a first entry related to the first server in a local address translation table based on the physical address of the first server; the first entry records the mapping relationship between the physical address of the first server, the address information of the first memory area, and the data migration status, the address information including the device identifier and address offset of the first memory device, and the address offset pointing to the first memory area; if the data migration status of the first memory area in the first entry is "in migration", then it is determined that the first memory area is in the process of data migration. If the data migration status of the first memory area in the first entry is "not in migration", then it is determined that the first memory logical area is not in the process of data migration.

[0154] Furthermore, the access request processing module 222, when used to perform adaptive forwarding processing on the access request according to the migration status of the target data page, is used to: if the migration status of the target data page is not migrated, forward the access request to the first memory device; if the migration status of the target data page is migrating, retain the access request and forward the access request to the second memory device belonging to the second memory area after the migration of the target data page is completed; if the migration status of the target data page is completed migration, forward the access request to the second memory device.

[0155] For a detailed description of the functions of each module in the switch provided in this embodiment, please refer to the Figure 1Related content or combination of the hardware system embodiment provided Figure 7 Provided method embodiments.

[0156] In another embodiment, the switch includes: a migration engine, wherein the migration engine includes a replication engine 223 and an access request processing module 222. The replication engine 223 is used to migrate data in a first memory area where a memory error occurs. The access request processing module 222 is used to: when the replication engine 223 is migrating data in the first memory area where a memory error occurs, upon receiving an access request from a first server to the first memory area, determine the target data page requested to be accessed; the target data page is one of multiple data pages in the first memory area; obtain a page bitmap corresponding to the first memory area; wherein the page bitmap records migration status information of the multiple data pages; determine the migration status of the target data page based on the migration status information recorded in the page bitmap; and perform adaptive forwarding processing on the access request based on the migration status of the target data page. The first memory area is a memory area in a memory pool, the memory pool includes multiple memory devices, and each memory device has multiple memory areas; the switch is communicatively connected to the multiple memory devices based on an interconnection protocol.

[0157] For a detailed description of the functions of each module in the switch provided in this embodiment, please refer to the Figure 1 Related content or combination of the hardware system embodiment provided Figure 7 In addition, in addition to the modules given above, the switch may also include other modules. For details on the specific implementation of other modules and corresponding functions, please refer to the relevant content in other embodiments of this application, which will not be repeated here.

[0158] The present application also provides a manager, wherein a data migration device is deployed in the manager, and the data migration device includes: a receiving module, a selecting module, a sending module and a marking module; wherein,

[0159] a receiving module, configured to receive memory error information sent by a first memory device; wherein the first memory device is one of a plurality of memory devices in a memory pool, each of the plurality of memory devices having a plurality of memory areas;

[0160] a selection module configured to select an available second memory area from the memory pool when determining, based on the memory error information, that data migration needs to be performed on the first memory area in the first memory device;

[0161] a sending module, configured to send a migration request to the switch, requesting the switch to migrate the data in the first memory area to the second memory area;

[0162] a marking module, configured to mark the first memory area as unreliable upon receiving a migration completion response fed back by the switch;

[0163] The switch is communicatively connected to the multiple memory devices based on an interconnection protocol; and the switch divides the data in the first memory area into multiple data pages by page, migrates the multiple data pages to the second memory area in sequence, and uses a page bitmap corresponding to the first memory area to record the migration status of the multiple data pages during the migration process.

[0164] For a detailed description of the functions of each module in the data migration device provided in this embodiment, please refer to the relevant content in other embodiments of this application.

[0165] An embodiment of the present application further provides a computer-readable storage medium, in which a computer program is stored. When the computer program is executed by a computer, the method steps provided in the above embodiments can be implemented.

[0166] An embodiment of the present application further provides a computer program product, comprising a computer program. When the computer program is executed by a processor, the processor is enabled to implement the method steps or functions provided in the above embodiments.

[0167] Through the description of the above embodiments, those skilled in the art can clearly understand that each embodiment can be implemented by means of software plus a necessary general hardware platform, or of course, by means of hardware. Based on this understanding, the essence of the above technical solution or the part that contributes to the prior art can be embodied in the form of a software product. The computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, a magnetic disk, an optical disk, etc., and includes a number of instructions for enabling a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment or certain parts of the embodiments.

[0168] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present application.

Claims

1. A data migration method, characterized in that: The method is applied to a switch, wherein the switch is communicatively connected with a plurality of memory devices in a memory pool based on an interconnection protocol, and one of the memory devices has a plurality of memory areas; the method comprises: In response to a migration request triggered for a first memory area in the memory pool, dividing the data in the first memory area into pages to obtain a plurality of data pages; Determine a page bitmap for the first memory area, wherein the page bitmap allocates a bit to each of the plurality of data pages, the bit being used to record a migration status of the corresponding data page; The multiple data pages are sequentially migrated to the second memory area in the memory pool, and during the migration process, the migration status of the multiple data pages is recorded using the page bitmap.

2. The method according to claim 1, characterized in that Determining a page bitmap for the first memory area includes: Determining a bitmap length reflecting the number of bits according to a memory size of the first memory area; A page bitmap is generated for the first memory area according to the bitmap length.

3. The method according to claim 1, characterized in that The step of recording the migration status of the plurality of data pages using the page bitmap during the migration process includes: When any one of the plurality of data pages has completed migration, the value of the bit corresponding to the data page in the page bitmap is set to a set value, where the set value indicates that the migration of the data page has been completed.

4. The method according to any one of claims 1 to 3, characterized in that Also includes: Upon receiving an access request for the first memory area sent by the first server, determining whether the first memory area is in a data migration process; If yes, determining the migration status of the target data page in the first memory area requested to be accessed according to the migration status information of the multiple data pages recorded in the page bitmap; and performing adaptive forwarding processing on the access request according to the migration status of the target data page; If not, forward the access request to the first memory device to which the first memory area belongs.

5. The method according to claim 4, characterized in that Determining whether the first memory area is in a data migration process includes: searching, based on the physical address of the first server, a first entry related to the first server in a local address translation table; the first entry records a mapping relationship between the physical address of the first server, address information of the first memory region, and a data migration status; the address information includes a device identifier and an address offset of the first memory device, and the address offset points to the first memory region; If the data migration status of the first memory area in the first entry is in the migrating state, determining that the first memory area is in the data migration process; If the data migration status of the first memory area in the first entry is not in migration, it is determined that the first memory logical area is not in the data migration process.

6. The method according to claim 4, characterized in that Performing adaptive forwarding processing on the access request according to the migration status of the target data page, including: If the migration status of the target data page is not migrated, forwarding the access request to the first memory device; If the migration status of the target data page is migrating, retaining the access request and forwarding the access request to the second memory device to which the second memory area belongs after the migration of the target data page is completed; If the migration status of the target data page is migration completed, the access request is forwarded to the second memory device.

7. The method according to any one of claims 1 to 3, characterized in that Also includes: receiving the migration request sent by the manager; The migration request is sent by the manager to the switch when determining that data migration is required for the first memory area where a memory error occurs, to request the switch to migrate the data in the first memory area to the available second memory area.

8. A data migration method, characterized in that: Applied to a manager, the method includes: Receive memory error information sent by a first memory device; wherein the first memory device is one of multiple memory devices in a memory pool, and each of the multiple memory devices has multiple memory areas; When it is determined according to the memory error information that data migration needs to be performed on the first memory area in the first memory device, selecting an available second memory area from the memory pool; Sending a migration request to the switch to request the switch to migrate the data in the first memory area to the second memory area; Upon receiving a migration completion response fed back by the switch, marking the first memory area as unreliable; The switch is communicatively connected to the multiple memory devices based on an interconnection protocol; and the switch divides the data in the first memory area into multiple data pages by page, migrates the multiple data pages to the second memory area in sequence, and uses a page bitmap corresponding to the first memory area to record the migration status of the multiple data pages during the migration process.

9. An access processing method, characterized in that: Applied to a switch, the method includes: When a first server receives an access request to a first memory area during data migration in a first memory area where a memory error occurs, determining a target data page of the access request; the target data page is one of a plurality of data pages in the first memory area; Obtaining a page bitmap corresponding to the first memory area; wherein the page bitmap records migration status information of the multiple data pages; determining a migration status of the target data page according to the migration status information recorded in the page bitmap; performing adaptive forwarding processing on the access request according to the migration status of the target data page; The first memory area is a memory area in a memory pool, the memory pool includes multiple memory devices, and each memory device has multiple memory areas; the switch is communicatively connected with the multiple memory devices based on an interconnection protocol.

10. A data migration system, characterized in that: include: A memory pool, which contains multiple memory devices, each of which has multiple memory areas; The first memory device is one of the plurality of memory devices; a manager, configured to receive memory error information sent by the first memory device, and select an available second memory area from the memory pool when determining, based on the memory error information, that data migration is required for the first memory area in the first memory device; Sending a migration request to the switch to request the switch to migrate the data in the first memory area to an available second memory area; a switch connected to the manager and further communicating with each memory device in the memory pool based on an interconnection protocol, configured to: in response to the migration request, partition the data in the first memory area by page to obtain a plurality of data pages; and determine a page bitmap for the first memory area, wherein the page bitmap assigns a bit to each of the plurality of data pages, the bit being used to record a migration status of the corresponding data page; The multiple data pages are sequentially migrated to the second memory area, and during the migration process, the migration status of the multiple data pages is recorded using the page bitmap.

11. The system according to claim 10, wherein: Also includes: a plurality of servers, the plurality of servers being in communication with the manager and also being in communication with the switch based on an interconnection protocol; the first server being one of the plurality of servers; and The manager is further configured to respond to a memory application request from the first server, select an adapted target memory area from all memory areas in the memory pool and allocate it to the first server based on the area information of all memory areas in the memory pool; and send a response message containing a memory area allocation result to the first server so that the first server can access the corresponding target memory area in the memory pool according to the response message.

12. The system according to claim 11, wherein: The target memory area is the first memory area; The switch is further configured to: during the data migration process in the first memory area, if an access request to the first memory area from the first server is received, determine a target data page requested for access, the target data page being one of the multiple data pages; and determine a migration status of the target data page based on migration status information of the multiple data pages recorded in the page bitmap corresponding to the first memory area; According to the migration status of the target data page, adaptive forwarding processing is performed on the access request.

13. An electronic device, characterized in that: include: memory and a processor; wherein, The memory is used to store programs; The processor is coupled to the memory and is configured to execute the program stored in the memory to implement the steps of the data migration method according to any one of claims 1 to 7 or claim 8, or to implement the steps of the access processing method according to claim 9; Wherein, the electronic device is a switch based on an interconnection protocol or a manager connected to the switch; when the electronic device is the switch, it further includes a migration engine, and the processor and the migration engine cooperate to implement the steps of the data migration method according to any one of claims 1 to 7, or to implement the steps of the access processing method according to claim 9; When the electronic device is the manager, it is used to implement the steps in the data migration method described in claim 8.

14. A computer-readable storage medium, characterized in that The computer-readable storage medium stores a computer program; when the computer program is executed by a computer, it can implement the steps of the data migration method described in any one of claims 1 to 7 or claim 8, or be used to implement the steps of the access processing method described in claim 9.

15. A computer program product comprising a computer program, which, when executed by a processor, enables the processor to implement the steps of the data migration method described in any one of claims 1 to 7 or claim 8, or to implement the steps of the access processing method described in claim 9.

Citation Information

Patent Citations

  • Virtual storage migration method and system and virtual machine monitor

    CN102073462A

  • Memory data migration method and device, storage medium and electronic device

    CN116483740A

Cited By

  • Storage control system and storage control method

    CN120892218A

  • A storage control system and a storage control method

    CN120892218B

  • Interconnection sharing method without ECC / CRC memory based on CXL protocol and computer system

    CN121560592A