Memory data transmission method, system and server
By configuring the virtual machine memory address in the source and destination FPGAs and directly copying the data, the problem of low copy efficiency in pure software methods is solved, efficient memory data transmission is achieved, the live migration time is shortened, and the virtual machine service quality is improved. .
Patent Information
- Application Number
- CN201910765290.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2019-08-19
- Publication Date
- 2024-10-01
- Estimated Expiration
- 2039-08-19
AI Technical Summary
In the existing technology, copying memory data through pure software is inefficient and takes up a lot of resources, resulting in extended live migration time and reduced virtual machine service quality.
By configuring the virtual machine memory address in the FPGA of the source and destination ends, and copying the data directly through the FPGA, multiple copies and protocol stack parsing processes are avoided.
It improves memory data transmission efficiency, reduces resource usage, shortens live migration time, and improves the real-time performance and service quality of virtual machine migration.
Smart Images

Figure CN112395040B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of data transmission, and in particular to a method and system for memory data transmission, a source server and a destination server. Background Art
[0002] The current hot migration iterative copy is done in a pure software way, using the host network card to send data. In this process, the memory data needs to be copied from the user space to the kernel space and sent out through the kernel network protocol stack. After the destination network card receives the data, it must be unpacked by the kernel protocol stack and then copied to the user space. Multiple memory copies and protocol stack parsing consume CPU computing power and increase the data transmission time. The increase in the data transmission time for each round of iterative copying will also cause more dirty pages to be generated, exacerbating the time consumption of hot migration and the decline in the quality of virtual machine service. As a result, the memory data copy time becomes longer, the efficiency is reduced, and there is a problem of high resource usage.
[0003] To address the above-mentioned problems, no effective solution has been proposed yet. Summary of the invention
[0004] The embodiments of the present invention provide a memory data transmission method and system, a source server and a destination server, so as to at least solve the technical problems of low efficiency and high resource usage in the method of copying memory data by pure software in the related art.
[0005] According to one aspect of an embodiment of the present invention, a memory data transmission method is provided, comprising: a source end configures a source address to a source end FPGA through a source end first driver, wherein the source address is a virtual machine memory virtual address of memory data to be transmitted in the source end virtual machine; the source end sends the source address to a destination end, so that the destination end determines a destination address of the memory data to be transmitted in the destination end virtual machine through the destination end first driver, and configures the destination address to the destination end FPGA, wherein the destination address is a virtual machine memory virtual address of the memory data to be transmitted in the destination end virtual machine; the source end directly copies the memory data from the source address to the destination address through the source end FPGA and the destination end FPGA.
[0006] According to another aspect of an embodiment of the present invention, a memory data transmission method is also provided, including: a destination end receives a source address sent by a source end, wherein the source address is a virtual machine memory virtual address of memory data to be transmitted in a source end virtual machine, and the source address is configured in a source end FPGA through a first source end driver; the destination end converts the source address into a destination address through the first destination end driver, and configures the destination address to the destination end FPGA, wherein the destination address is a virtual machine memory virtual address of the memory data to be transmitted in the destination end virtual machine; the destination end directly copies the memory data from the source address to the destination address through the source end FPGA and the destination end FPGA.
[0007] According to another aspect of an embodiment of the present invention, a memory data transmission method is also provided, including: the source end configures a source address to a source end FPGA through a first source end driver, wherein the source address is a virtual machine memory virtual address of memory data to be transmitted in the source end virtual machine; the source end sends the source address to a destination end; the destination end converts the source address to a destination address through a first destination end driver, and configures the destination address to a destination end FPGA, wherein the destination address is a virtual machine memory virtual address of the memory data to be transmitted in the destination end virtual machine; the source end initiates data copying to the destination end, and directly copies the memory data from the source address to the destination address through the source end FPGA and the destination end FPGA.
[0008] According to another aspect of an embodiment of the present invention, a memory data transmission method is also provided, including: a source-end FPGA receives a source address configured by a first source-end driver, wherein the source address is a virtual address of a virtual machine memory of memory data to be transmitted in a source-end virtual machine; when a destination address of the memory data to be transmitted in a destination-end virtual machine is configured to the destination-end FPGA, the source-end FPGA communicates with the destination-end FPGA to directly copy the memory data from the source address to the destination address, wherein the destination address is a virtual address of a virtual machine memory of the memory data to be transmitted in the destination-end virtual machine.
[0009] According to another aspect of an embodiment of the present invention, a memory data transmission method is also provided, including: a destination FPGA receives a destination address configured by a first destination driver, wherein the destination address is a virtual address of a virtual machine memory of memory data to be transmitted in a destination virtual machine, and the destination address is obtained by converting a source address, and the source address is a virtual address of a virtual machine memory of the memory data to be transmitted in a source virtual machine, and the source address is configured in the source FPGA through the first source driver; the destination FPGA communicates with the source FPGA to directly copy the memory data from the source address to the destination address.
[0010] According to another aspect of an embodiment of the present invention, a source server is also provided, including: a configuration module, used to configure a source address to a source FPGA through a first source driver, wherein the source address is a virtual address of a virtual machine memory of memory data to be transmitted in the source virtual machine; a sending module, used to send the source address to a destination, and used for the destination to determine a destination address of the memory data to be transmitted in the destination virtual machine through the first destination driver, and configure the destination address to the destination FPGA, wherein the destination address is a virtual address of a virtual machine memory of the memory data to be transmitted in the destination virtual machine; a first copy module, used to directly copy the memory data from the source address to the destination address through the source FPGA and the destination FPGA.
[0011] According to another aspect of an embodiment of the present invention, a destination server is also provided, including: a first receiving module, used to receive a source address sent by a source end, wherein the source address is a virtual address of a virtual machine memory of memory data to be transmitted in a source virtual machine, and the source address is configured in a source FPGA through a first driver on the source end; a conversion module, used to convert the source address into a destination address through a first driver on the destination end, and configure the destination address to the destination FPGA, wherein the destination address is a virtual address of a virtual machine memory of the memory data to be transmitted in the destination virtual machine; and a second copy module, used to directly copy the memory data from the source address to the destination address through the source FPGA and the destination FPGA.
[0012] According to another aspect of an embodiment of the present invention, a memory data transmission system is also provided, including: a source end and a destination end, wherein the source end is configured with a source end FPGA, and the destination end is configured with a destination end FPGA, the source end is used to configure a source address to the source end FPGA through a first source end driver, and send the source address to the destination end, wherein the source address is a virtual machine memory virtual address of the memory data to be transmitted in the source end virtual machine; the destination end is used to convert the source address to a destination address through a first destination end driver, and configure the destination address to the destination end FPGA, wherein the destination address is a virtual machine memory virtual address of the memory data to be transmitted in the destination end virtual machine; the source end is also used to initiate data copying to the destination end, and directly copy the memory data from the source address to the destination address through the source end FPGA and the destination end FPGA.
[0013] According to another aspect of an embodiment of the present invention, a memory data transmission device is also provided, including: a second receiving module, used for the source-end FPGA to receive the source address configured by the first driver of the source end, wherein the source address is the virtual address of the virtual machine memory of the memory data to be transmitted in the source-end virtual machine; a third copy module, used for the source-end FPGA to communicate with the destination-end FPGA when the destination address of the memory data to be transmitted in the destination-end virtual machine is configured to the destination-end FPGA, and directly copy the memory data from the source address to the destination address, wherein the destination address is the virtual address of the virtual machine memory of the memory data to be transmitted in the destination-end virtual machine.
[0014] According to another aspect of an embodiment of the present invention, a memory data transmission device is also provided, including: a third receiving module, used for the destination FPGA to receive the destination address configured by the destination first driver, wherein the destination address is the virtual address of the virtual machine memory of the memory data to be transmitted in the destination virtual machine, and the destination address is obtained by converting the source address, and the source address is the virtual address of the virtual machine memory of the memory data to be transmitted in the source virtual machine, and the source address is configured in the source FPGA through the source first driver; a fourth copy module, used for the destination FPGA to communicate with the source FPGA, and directly copy the memory data from the source address to the destination address.
[0015] According to another aspect of an embodiment of the present invention, a storage medium is further provided, wherein the storage medium includes a stored program, wherein when the program is running, the device where the storage medium is located is controlled to execute any one of the above-mentioned memory data transmission methods.
[0016] In an embodiment of the present invention, the source end configures the source address to the source end FPGA through the source end first driver, wherein the source address is the virtual address of the virtual machine memory of the memory data to be transmitted in the source end virtual machine; the source end sends the source address to the destination end, so that the destination end determines the destination address of the memory data to be transmitted in the destination end virtual machine through the destination end first driver, and configures the destination address to the destination end FPGA, wherein the destination address is the virtual address of the virtual machine memory of the memory data to be transmitted in the destination end virtual machine; the source end directly copies the memory data from the source address to the destination address through the source end FPGA and the destination end FPGA, and achieves the purpose of directly transferring the memory data from the source end to the destination end through the field programmable gate arrays at the source end and the destination end, thereby achieving the technical effect of directly transferring the memory data from the source end to the destination end using the hardware logic of the field programmable gate array, without the need for multiple copies at the source end and the process of multiple copies at the destination end, thereby effectively solving the technical problem of low efficiency and high resource occupation in the method of copying memory data in the related art by pure software. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] The drawings described herein are used to provide a further understanding of the present invention and constitute a part of this application. The exemplary embodiments of the present invention and their descriptions are used to explain the present invention and do not constitute an improper limitation of the present invention. In the drawings:
[0018] Figure 1 A hardware structure block diagram of a computer terminal (or mobile device) for implementing a memory data transmission method is shown;
[0019] Figure 2 is a flow chart of a memory data transmission method according to embodiment 1 of the present invention;
[0020] Figure 3 is a flow chart of another memory data transmission method according to embodiment 2 of the present invention;
[0021] Figure 4 is a flow chart of another memory data transmission method according to embodiment 3 of the present invention;
[0022] Figure 5 is a flow chart of another memory data transmission method according to embodiment 4 of the present invention;
[0023] Figure 6 is a flow chart of another memory data transmission method according to embodiment 5 of the present invention;
[0024] Figure 7 is a schematic diagram of a traditional hot migration memory transmission method according to Embodiment 6 of the present invention;
[0025] Figure 8 is a schematic diagram of a point-to-point hot migration memory transmission method based on FPGA according to Embodiment 6 of the present invention;
[0026] Fig. 9 is a schematic diagram of a method for applying FPGA-based point-to-point traditional hot migration memory transmission to a system architecture according to Embodiment 6 of the present invention;
[0027] Fig.10 is a schematic diagram of a source server according to Embodiment 7 of the present invention;
[0028] Fig.11 is a schematic diagram of a destination server according to Embodiment 8 of the present invention;
[0029] Fig.12 is a schematic diagram of a memory data transmission system according to Embodiment 9 of the present invention;
[0030] Fig.13is a schematic diagram of a memory data transmission device according to embodiment 10 of the present invention;
[0031] Fig.14 is a schematic diagram of a memory data transmission device according to Embodiment 11 of the present invention;
[0032] Fig.15 It is a structural block diagram of a computer terminal according to embodiment 12 of the present invention. DETAILED DESCRIPTION
[0033] In order to enable those skilled in the art to better understand the scheme of the present invention, the technical scheme in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present invention.
[0034] It should be noted that the terms "first", "second", etc. in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units that are clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0035] First, some nouns or terms that appear in the description of the embodiments of the present application are subject to the following explanations:
[0036] RDMA: Remote Direct Memory Access, traditional hot migration memory iterative copy: directly transmit memory data through Ethernet packets, called remote direct data access, is created to solve the delay of server-side data processing in network transmission. RDMA transfers data directly to the computer's storage area through the network, quickly transferring data from one system to the remote system memory, and the transmission process does not require the participation of the operating system, so it does not need to occupy too much CPU processing power. It eliminates the overhead of memory copy and context switching, thereby freeing up memory bandwidth and CPU cycles to improve application system performance.
[0037] Hot migration memory iterative copy: In order to reduce the interruption time of virtual machine service, the virtual machine is still running during the memory copy process, so new dirty pages will be generated. The newly generated dirty pages need to initiate a new round of copy transmission to the destination. This continuous copying of dirty pages is called iterative copying, until the number of dirty pages can be transmitted to the destination within an acceptable time. At this time, the virtual machine is stopped and the last copy is performed.
[0038] FPGA: Field-Programmable Gate Array, which is a field-programmable gate array, is a product further developed on the basis of programmable devices such as PAL, GAL, CPLD, etc. It is a digital integrated circuit that can change and configure the internal connection structure and logic units through software to complete the established design functions.
[0039] FIFO: First Input First Output, first-in first-out memory, is a first-in first-out dual-port buffer. The first data that enters it is the first to be removed. Among them, one port is the input port of the memory, and the other port is the output port of the memory. It has two main structures: trigger-oriented structure and zero-oriented transfer structure. The trigger-oriented FIFO is composed of a register array, and the zero-oriented transfer structure FIFO is composed of a dual-button RAM with read and write address pointers.
[0040] Example 1
[0041] According to an embodiment of the present invention, a method embodiment of a memory data transmission method is also provided. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and although a logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that shown here.
[0042] The method embodiment provided in the first embodiment of the present application can be executed in a mobile terminal, a computer terminal or a similar computing device. Figure 1 The hardware structure block diagram of a computer terminal (or mobile device) for implementing a memory data transmission method is shown. Figure 1As shown, the computer terminal 10 (or mobile device 10) may include one or more (102a, 102b, ..., 102n are used to illustrate) processors 102 (the processor 102 may include but is not limited to a processing device such as a microprocessor MCU or a programmable logic device FPGA), and a memory 104 for storing data. In addition, it may also include: a transmission module, a display, an input / output interface (I / O interface), a universal serial bus (USB) port (which may be included as one of the ports of the I / O interface), a network interface, a power supply and / or a camera. It can be understood by those skilled in the art that Figure 1 The structure shown is only for illustration and does not limit the structure of the above electronic device. Figure 1 More or fewer components as shown, or with Figure 1 Different configurations are shown.
[0043] It should be noted that the one or more processors 102 and / or other data processing circuits described above may generally be referred to herein as "data processing circuits". The data processing circuits may be embodied in whole or in part as software, hardware, firmware, or any other combination thereof. In addition, the data processing circuit may be a single independent processing module, or may be incorporated in whole or in part into any of the other components in the computer terminal 10 (or mobile device). As described in the embodiments of the present application, the data processing circuit acts as a processor control (e.g., selection of a variable resistor terminal path connected to an interface).
[0044] The memory 104 can be used to store software programs and modules of application software, such as program instructions / data storage devices corresponding to the memory data transmission method in the embodiment of the present invention. The processor 102 executes various functional applications and data processing by running the software programs and modules stored in the memory 104, that is, the memory data transmission method of the above-mentioned application program is realized. The memory 104 may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some examples, the memory 104 may further include a memory remotely arranged relative to the processor 102, and these remote memories may be connected to the computer terminal 10 via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
[0045] The transmission module is used to receive or send data via a network. The specific example of the network may include a wireless network provided by a communication provider of the computer terminal 10. In one example, the transmission module includes a network adapter (Network Interface Controller, NIC), which can be connected to other network devices through a base station so as to communicate with the Internet. In one example, the transmission module can be a radio frequency (Radio Frequency, RF) module, which is used to communicate with the Internet wirelessly.
[0046] The display may be, for example, a touch screen liquid crystal display (LCD) that enables a user to interact with a user interface of the computer terminal 10 (or mobile device).
[0047] Figure 1 The hardware structure block diagram shown can be used not only as an exemplary block diagram of the above-mentioned computer terminal 10 (or mobile device), but also as an exemplary block diagram of the above-mentioned server. In an optional embodiment, Figure 2 The block diagram shows the use of the above Figure 1 The computer terminal 10 (or mobile device) shown is used as an embodiment, such as a sending end, a receiving end, etc. Figure 2 As shown, the computer terminal 10 (or mobile device) can be connected to one or more servers, such as a security server, a resource server, a game server, etc., via a data network connection or electronic connection. In an optional embodiment, the above-mentioned computer terminal 10 (or mobile device) can be any mobile computing device, etc. The data network connection can be a local area network connection, a wide area network connection, an Internet connection, or other types of data network connections. The computer terminal 10 (or mobile device) can be executed to connect to a network service performed by a server (e.g., a security server) or a group of servers. A network server is a network-based user service, such as a social network, cloud resources, email, online payment or other online applications.
[0048] During the hot migration of a virtual machine, the memory of the virtual machine needs to be copied from the source server to the destination server. The memory copy and transmission speed directly affect the total time of virtual machine migration and the service interruption time (the last copy), both of which will affect the user experience. In addition, the long migration time makes it impossible to ensure the real-time migration, which is also an important factor affecting the widespread use of hot migration technology in cloud computing resource scheduling. Therefore, the optimization of copy transmission between the source and destination is the key to improving the performance and availability of hot migration technology.
[0049] RDMA technology was created to solve the delay of server-side data processing in network transmission. RDMA transfers data directly to the computer's storage area through the network, quickly transferring data from one system to the remote system memory, and the transmission process does not require the participation of the operating system, so it does not need to occupy too much CPU processing power. It eliminates the overhead of memory copying and context switching, thereby freeing up memory bandwidth and CPU cycles to improve application system performance.
[0050] Using RDMA technology can optimize memory transfer speed, but it only accelerates data transmission on general Ethernet networks. It cannot be used in environments where Ethernet is not applicable. Moreover, RDMA technology depends on a network card that supports RDMA, otherwise it cannot be used. In some server architectures where traditional RDMA technology cannot be used, there is no traditional network connection between the computing node and the control node, and the virtual machine is on the computing node. The computing node is connected to the control node through a private channel, which does not have RDMA capabilities and requires the use of other hardware or software (at the expense of CPU computing power) to achieve memory compression and decompression during the iterative copy process.
[0051] Under the above operating environment, this application provides Figure 2 The memory data transfer method shown. Figure 2 is a flow chart of a memory data transmission method according to embodiment 1 of the present invention. Figure 2 As shown, the method includes the following steps.
[0052] Step S202: The source end configures a source address to the source end FPGA through a first source end driver, wherein the source address is a virtual address of a virtual machine memory of memory data to be transmitted in a virtual machine at the source end;
[0053] As an optional embodiment, the above-mentioned source end can be a source end server, a source end storage, a source end device, or a source end module for performing memory data storage, etc.
[0054] As an optional embodiment, the structure of the virtual space of the virtual machine at the source end depends on the operating system at the source end. Different operating systems may have different virtual spaces. For example, the virtual space at the source end may include a source user space and a source kernel space. The source user space may be accessed by users. The memory data is stored in the source user space and may be accessed by users so that the service users can provide corresponding services. The source kernel space is inaccessible to users, but the source kernel space may interact with the source user space, which is equivalent to the source user space and the source kernel space interacting with each other inside the source end.
[0055] As an optional embodiment, the above-mentioned source address is the address of the memory data to be transmitted stored in the virtual space of the source virtual machine, and the memory data can be obtained through the address to perform operations such as transmission call.
[0056] As an optional embodiment, the source-end virtual machine may be set in the source end, for example, in the source-end user space of the source-end server, for use by the user. In the event of a failure of the source-end server, the source-end user space of the source-end server cannot be accessed by the user, and the memory data of the virtual machine in the source-end user space of the source-end server needs to be migrated to the memory virtual space of the virtual machine in the destination-end user space of the destination-end server that can be accessed by the user, so as to reduce the interruption time of the source-end server, thereby improving the user experience.
[0057] As an optional embodiment, the source FPGA is also a source field programmable gate array. The source FPGA can change and configure the internal connection structure and logic units through software means to complete the digital integrated circuit with the predetermined design function. The source FPGA directly uses the FPGA hardware resources to realize data hardware compression and transmission, reduce the data size of the source address of the source memory data, reduce the bandwidth occupied by transmitting the source address, and thus improve the bandwidth utilization.
[0058] As an optional embodiment, in the above-mentioned source-end FPGA processing process, the CPU of the source-end server needs to participate. The above-mentioned source-end FPGA can be an external device. When the system performs migration configuration, a related driver is required, for example, the above-mentioned first driver. The above-mentioned first driver can drive the above-mentioned source-end FPGA in the kernel space, or it can drive the above-mentioned source-end FPGA in the user space.
[0059] Step S204, the source end sends the source address to the destination end, so that the destination end determines the destination address of the memory data to be transmitted in the destination end virtual machine through the first driver of the destination end, and configures the destination address to the destination end FPGA, wherein the destination address is the virtual address of the virtual machine memory of the memory data to be transmitted in the destination end virtual machine;
[0060] As an optional embodiment, the source end processes the source address through the source end FPGA, for example, compresses it, and sends the processed source address of the memory data to the destination end.
[0061] As an optional embodiment, the above-mentioned destination may be a destination server, a destination storage, a destination device, or a destination module for storing memory data, etc.
[0062] As an optional embodiment, the destination end may have the same structure as the source end. The structure of the virtual space of the virtual machine of the destination end depends on the operating system of the destination end. Different operating systems may have different virtual spaces. For example, the virtual space of the destination end may include a destination user space and a destination kernel space. The destination user space may be accessed by users. The memory data is stored in the destination user space and may be accessed by users so that the service users can provide corresponding services. The destination kernel space is inaccessible to users, but the destination kernel space can exchange data with the destination user space, which is equivalent to the destination user space and the destination kernel space being able to exchange data inside the destination.
[0063] As an optional embodiment, the destination FPGA is also a destination field editable gate array, and the source FPGA establishes a spatial data connection with the source kernel to obtain the source address of the memory data output from the host memory virtual address, and processes the source address, for example, translates the source address into the corresponding virtual address of the virtual machine memory, and sends it to the destination FPGA. The destination FPGA can decompress the data compressed by the source FPGA, thereby obtaining the source address of the memory data. The memory data can be obtained through the source address.
[0064] As an optional embodiment, the above-mentioned destination FPGA is connected to the above-mentioned destination kernel space data. After the above-mentioned destination FPGA obtains the source address of the above-mentioned processed memory data, it reversely processes the data, for example, converts the above-mentioned virtual machine memory virtual address into the corresponding source address. It should be noted that during the conversion process, the virtual address of the virtual machine memory of the source address of the above-mentioned memory data can be converted into the destination host machine memory virtual address of the destination virtual machine of the above-mentioned source address, and the destination host machine memory virtual address is sent to the above-mentioned destination kernel space, and the above-mentioned destination kernel space sends the destination address of the above-mentioned memory data to the destination user space, and the user can restore access to the internal storage data in the destination user space.
[0065] As an optional embodiment, a destination virtual machine may be set in the destination user space to store the memory data. The structure of the destination may be the same as that of the source so as to achieve the purpose of replacing the source with the destination for user access.
[0066] Step S206: The source end directly copies the memory data from the source address to the destination address through the source end FPGA and the destination end FPGA.
[0067] As an optional embodiment, the source FPGA and the destination FPGA may be transmitted via Ethernet or via a custom data transmission channel.
[0068] As an optional embodiment, the memory data of the virtual machine in the user space of the source end can be copied from the source address to the destination address through the source end FPGA and the destination end FPGA.
[0069] As an optional embodiment, the source end copies the memory data from the source address to the destination address, and the memory data can also be backed up. The above memory data is stored at both the source address and the destination address, thereby backing up the above memory data. Among the above source address and destination address, any address can successfully retrieve and access the above memory data.
[0070] As an optional embodiment, the above steps can be applied to the hot migration of virtual machines, and point-to-point access can be performed from the source server to the destination server for hot migration of virtual machines. Compared with the data access method of hot migration of virtual machines in the related art, it has a significant acceleration effect. In addition, the above steps can also be applied to other cross-server data interaction access tasks, and point-to-point data transmission between different servers and / or different addresses can be performed. Compared with direct transmission and other methods in the related art, it has the effect of improving data transmission efficiency and reducing resource occupation.
[0071] Through the above steps, the source end configures the source address to the source end FPGA through the source end first driver, wherein the source address is the virtual address of the virtual machine memory of the memory data to be transmitted in the source end virtual machine; the source end sends the source address to the destination end, so that the destination end determines the destination address of the memory data to be transmitted in the destination end virtual machine through the destination end first driver, and configures the destination address to the destination end FPGA, wherein the destination address is the virtual address of the virtual machine memory of the memory data to be transmitted in the destination end virtual machine; the source end directly copies the memory data from the source address to the destination address through the source end FPGA and the destination end FPGA, and achieves the purpose of directly transferring the memory data from the source end to the destination end through the hardware logic at the source end and the destination end FPGA, thereby realizing the technical effect of directly transferring the memory data from the source end to the destination end using the hardware logic of the FPGA, without the need for multiple copies at the source end and multiple copies at the destination end, thereby effectively solving the technical problems of low efficiency and high resource occupation in the method of copying memory data by pure software in the related technology.
[0072] As an optional embodiment, the above method also includes: the source end also sends the data length of the memory data and / or the source end identifier used to identify the source end to the destination end, wherein the data length is used by the destination end to apply for memory space for the memory data, and the source end identifier is used by the destination end to verify the source end.
[0073] As an optional embodiment, when the source end transmits the memory data to the destination end, the length of the memory data can be sent to the destination end at the same time. After receiving the memory data and the data length of the memory data, the destination end applies for memory space that can store the memory data in the virtual machine of the destination end user space according to the data length, to prevent the memory data from being unable to be stored in a suitable space after being transferred to the virtual machine, resulting in the failure or damage of the memory data.
[0074] As an optional embodiment, the above-mentioned source end identifier is used to identify the identity of the above-mentioned source end. The destination end can verify the identity of the source end through the above-mentioned source end identifier. When the identity authentication of the source end is passed, the destination end receives the data transmission of the source end to prevent the source end that does not correspond to the destination end or other data ends from sending data to the destination end, resulting in the data of the source end corresponding to the destination end cannot be migrated.
[0075] As an optional embodiment, the source end directly copies the memory data from the source address to the destination address through the source end FPGA and the destination end FPGA, including: the source end compresses the memory data copied from the source address through the source end FPGA to obtain compressed data, wherein the destination end FPGA decompresses the copied compressed data and stores it in the destination address. By compressing the data at the source end before transmission, and performing corresponding decompression at the destination end after transmission, the amount of data in the transmission process is reduced to a certain extent, thereby saving transmission resources to a certain extent and improving transmission efficiency.
[0076] As an optional embodiment, the data transmission between the source FPGA and the destination FPGA may also be encrypted and decrypted, or other data processing methods.
[0077] As an optional embodiment, the data channel between the source FPGA and the destination FPGA includes at least one of the following: a predetermined ring network channel, wherein the predetermined ring network channel is a communication protocol implemented by the source FPGA and the destination FPGA in hardware form and directly connected to the network or Ethernet channel through a physical link.
[0078] As an optional embodiment, the source FPGA and the destination FPGA transmit memory data through a data channel. The data channel may be a predetermined ring network channel, or an Ethernet channel, etc. The data channel has a communication protocol with the source FPGA and the destination FPGA to ensure normal communication of data. The predetermined ring network channel may be a communication protocol implemented in hardware with the source FPGA and the destination FPGA, and access the network through a physical link.
[0079] As an optional embodiment, when the data channel between the source FPGA and the destination FPGA is an Ethernet channel, the source end directly copies the memory data from the source address to the destination address, including: the source end drives the source FPGA to fill the memory data from the source address into the source buffer through the source second driver, and retrieves the memory data from the source buffer and sends it to the destination buffer through the Ethernet network card; wherein the destination end drives the destination FPGA to retrieve the memory data from the destination buffer through the destination second driver, and stores the retrieved memory data into the destination address.
[0080] As an optional embodiment, in some special server architectures, for example, the server architecture cannot support the traditional RDMA data transmission mode, the source FPGA and the destination FPGA can communicate through Ethernet. Specifically, the source FPGA fills the memory data into the buffer through the source second driver, and transmits the memory data to the destination through the buffer, the network card and Ethernet. The destination has the same structure as the source, and the destination network card receives the data. The destination network card fills the received data into the destination buffer, and transmits the data to the destination FPGA through the destination second driver.
[0081] As an optional embodiment, the second driver is similar to the first driver, and the second driver can drive the source FPGA in the kernel space or in the user space. The source network card and the source FPGA can be connected to the same hardware or separately set on two different hardware.
[0082] As an optional embodiment, the source buffer and the destination buffer are first-in-first-out queues, and the size of each blank storage space in the first-in-first-out queue is determined according to the maximum transmission unit of the Ethernet.
[0083] As an optional embodiment, the source buffer may be a source first-in first-out queue, i.e., a source FIFO, and the size of each blank storage space in the FIFO queue depends on the size of the maximum transmission unit of the Ethernet. The larger the maximum transmission unit of the Ethernet, the larger the blank storage space (i.e., storage unit) of the FIFO can be set to; the smaller the maximum transmission unit of the Ethernet, the smaller the blank storage space of the FIFO can be set to.
[0084] As an optional embodiment, after the source end directly copies the memory data from the source address to the destination address through the source end FPGA and the destination end FPGA, it also includes: the source end clears the data configured in the source end FPGA, and sends a first notification message to the destination end to notify the destination end to clear the data configured in the destination end FPGA.
[0085] As an optional embodiment, after the above-mentioned source end successfully copies the memory data to the destination end, in order to prevent data leakage and reduce the system burden, the data configured in the source end FPGA is deleted, and a first notification message is sent to instruct the destination end to delete the data configured in the destination end FPGA. After receiving the above-mentioned first notification message, the destination end deletes the data configured in the destination end FPGA.
[0086] Example 2
[0087] According to another aspect of an embodiment of the present invention, a memory data transmission method is also provided. Figure 3 is a flow chart of another memory data transmission method according to Embodiment 2 of the present invention. Figure 3 As shown, the method includes:
[0088] Step S302, the destination end receives the source address sent by the source end, wherein the source address is a virtual address of a virtual machine memory of memory data to be transmitted in the source end virtual machine, and the source address is configured in the source end FPGA through a first driver of the source end;
[0089] Step S304, the destination end converts the source address into a destination address through the first destination end driver, and configures the destination address to the destination end FPGA, wherein the destination address is a virtual address of the memory data to be transmitted in the virtual machine of the destination end;
[0090] Step S306: The destination end directly copies the memory data from the source address to the destination address through the source end FPGA and the destination end FPGA.
[0091] As an optional embodiment, before the destination receives the source address sent by the source, the source sends the source address to the destination. The source address may be processed by the source, and the source virtual machine may be a virtual machine in the source.
[0092] As an optional embodiment, the above-mentioned first driver at the destination end can be the same as the first driver at the source end. The above-mentioned first driver at the source end is used to configure the memory data to the source FPGA. The above-mentioned first driver at the destination end is used to convert the source address of the memory data of the destination FPGA into the destination address, and the user can access the memory data through the destination address.
[0093] Through the above steps, the destination end receives the source address sent by the source end, wherein the source address is the virtual address of the virtual machine memory of the memory data to be transmitted in the virtual machine of the source end, and the source address is configured in the source end FPGA through the first driver of the source end; the destination end converts the source address into the destination address through the first driver of the destination end, and configures the destination address to the destination end FPGA, wherein the destination address is the virtual address of the virtual machine memory of the memory data to be transmitted in the virtual machine of the destination end; the destination end directly copies the memory data from the source address to the destination address through the source end FPGA and the destination end FPGA, and achieves the purpose of directly transferring the memory data from the source end to the destination end through the hardware logic at the source end and the destination end FPGA, thereby realizing the technical effect of directly transferring the memory data from the source end to the destination end using the hardware logic of the FPGA, without the need for multiple copies at the source end and the process of multiple copies at the destination end, thereby effectively solving the technical problems of low efficiency and high resource occupation in the method of copying memory data by pure software in the related technology.
[0094] As an optional embodiment, the above method also includes: the destination end also receives the data length of the memory data sent by the source end and / or the source end identifier used to identify the source end; the destination end applies for memory space for the memory data according to the data length, and verifies the source end according to the source end identifier.
[0095] As an optional embodiment, the destination end directly copies memory data from the source address to the destination address through the source end FPGA and the destination end FPGA, including: the destination end monitors the data length of the data that has been copied during the copying process; and when it is monitored that the data length of the copied data exceeds the data length of the memory data to be transmitted sent by the source end, a second notification message is sent to the source end to notify the source end to stop copying the data.
[0096] As an optional embodiment, when the data sent by the source end includes the length of the memory data, the transmitted memory data is monitored in real time. When the length of the memory data reaches the above length, it is considered that the memory data copy is completed, and a second notification message is sent to the source end to instruct the source end to stop copying the data. After receiving the second notification message, the source end stops copying the data.
[0097] As an optional embodiment, the destination end directly copies memory data from the source address to the destination address through the source end FPGA and the destination end FPGA, including: the destination end receives compressed data sent by the source end, wherein the compressed data is obtained by compressing the memory data copied from the source address through the source end FPGA; the destination end decompresses the compressed data through the destination end FPGA and stores it in the destination address.
[0098] Example 3
[0099] According to another aspect of an embodiment of the present invention, a memory data transmission method is also provided. Figure 4 is a flow chart of another memory data transmission method according to Embodiment 3 of the present invention. Figure 4 As shown, the method includes:
[0100] Step S402: The source end configures a source address to the source end FPGA through a first source end driver, wherein the source address is a virtual address of a virtual machine memory of memory data to be transmitted in a source end virtual machine;
[0101] Step S404, the source end sends the source address to the destination end;
[0102] Step S406, the destination end converts the source address into a destination address through the destination end first driver, and configures the destination address to the destination end FPGA, wherein the destination address is a virtual address of the memory data in the virtual machine of the destination end;
[0103] Step S408: the source end initiates data copying to the destination end, and directly copies the memory data from the source address to the destination address through the source end FPGA and the destination end FPGA.
[0104] Through the above steps, the source end configures the source address to the source end FPGA through the first source end driver, wherein the source address is the virtual address of the virtual machine memory of the memory data to be transmitted in the source end virtual machine; the source end sends the source address to the destination end; the destination end converts the source address to the destination address through the first destination end driver, and configures the destination address to the destination end FPGA, wherein the destination address is the virtual address of the virtual machine memory of the memory data in the destination end virtual machine; the source end initiates data copying to the destination end, and directly copies the memory data from the source address to the destination address through the source end FPGA and the destination end FPGA, and achieves the purpose of directly transferring the memory data from the source end to the destination end through the hardware logic at the source end and the destination end FPGA, thereby achieving the technical effect of directly transmitting the memory data from the source end to the destination end using the hardware logic of the FPGA, without the need to perform multiple copies at the source end and the process of performing multiple copies at the destination end, thereby effectively solving the technical problems of low efficiency and high resource occupation in the method of copying memory data by pure software in the related technology.
[0105] As an optional embodiment, the above method also includes: the source end also sends the data length of the memory data and / or the source end identifier used to identify the source end to the destination end; the destination end applies for memory space for the memory data according to the data length, and verifies the source end according to the source end identifier.
[0106] As an optional embodiment, the source end initiates data copying to the destination end, and directly copies the memory data from the source address to the destination address through the source end FPGA and the destination end FPGA, including: the source end compresses the memory data copied from the source address through the source end FPGA to obtain compressed data; the destination end FPGA decompresses the compressed data and stores it in the destination address.
[0107] As an optional embodiment, the data channel between the source FPGA and the destination FPGA includes at least one of the following: a predetermined ring network channel, wherein the predetermined ring network channel is a communication protocol implemented by the source FPGA and the destination FPGA in hardware form and directly connected to the network through a physical link; an Ethernet channel.
[0108] As an optional embodiment, when the data channel between the source FPGA and the destination FPGA is an Ethernet channel, the source end directly copies the memory data from the source address to the destination address, including: the source end drives the source end FPGA to fill the memory data from the source address into the source end buffer through the source end second driver, and retrieves the memory data from the source end buffer and sends it to the destination end buffer through the Ethernet network card; the destination end drives the destination end FPGA to retrieve the memory data from the destination end buffer through the destination end second driver, and stores the retrieved memory data into the destination address.
[0109] As an optional embodiment, the source buffer and the destination buffer are first-in-first-out queues, and the size of each blank storage space in the first-in-first-out queue is determined according to the maximum transmission unit of the Ethernet.
[0110] As an optional embodiment, after initiating data copy from the source end to the destination end, directly copying the memory data from the source address to the destination address through the source end FPGA and the destination end FPGA, it also includes: the source end clears the data configured in the source end FPGA, and sends a first notification message to the destination end; the destination end clears the data configured in the destination end FPGA according to the first notification message.
[0111] As an optional embodiment, the source end initiates data copying to the destination end, and directly copies the memory data from the source address to the destination address through the source end FPGA and the destination end FPGA, including: the destination end monitors the data length of the data that has been copied during the copying process; and when it is monitored that the data length of the copied data exceeds the data length of the memory data to be transmitted sent by the source end, the destination end sends a second notification message to the source end; the source end stops data copying according to the second notification message.
[0112] Example 4
[0113] According to another aspect of an embodiment of the present invention, a memory data transmission method is also provided. Figure 5 is a flow chart of another memory data transmission method according to Embodiment 4 of the present invention. Figure 5 As shown, the method includes:
[0114] Step S502, the source-end FPGA receives a source address configured by the first driver at the source end, wherein the source address is a virtual address of a virtual machine memory of memory data to be transmitted in the source-end virtual machine;
[0115] Step S504, when the destination address of the memory data to be transmitted in the destination virtual machine is configured to the destination FPGA, the source FPGA communicates with the destination FPGA and directly copies the memory data from the source address to the destination address, wherein the destination address is the virtual address of the virtual machine memory of the memory data to be transmitted in the destination virtual machine.
[0116] Through the above steps, the source end configures the source address to the source end FPGA through the first source end driver, wherein the source address is the virtual address of the virtual machine memory of the memory data to be transmitted in the source end virtual machine; the source end sends the source address to the destination end; the destination end converts the source address to the destination address through the first destination end driver, and configures the destination address to the destination end FPGA, wherein the destination address is the virtual address of the virtual machine memory of the memory data in the destination end virtual machine; the source end initiates data copying to the destination end, and directly copies the memory data from the source address to the destination address through the source end FPGA and the destination end FPGA, and achieves the purpose of directly transferring the memory data from the source end to the destination end through the hardware logic at the source end and the destination end FPGA, thereby achieving the technical effect of directly transmitting the memory data from the source end to the destination end using the hardware logic of the FPGA, without the need to perform multiple copies at the source end and the process of performing multiple copies at the destination end, thereby effectively solving the technical problems of low efficiency and high resource occupation in the method of copying memory data by pure software in the related technology.
[0117] As an optional embodiment, the source FPGA communicates with the destination FPGA to directly copy memory data from the source address to the destination address, including: the source FPGA compresses the memory data copied from the source address to obtain compressed data, which is used by the destination FPGA to decompress the compressed data and store it in the destination address.
[0118] As an optional embodiment, when the data channel between the source FPGA and the destination FPGA is an Ethernet channel, the source FPGA communicates with the destination FPGA to directly copy memory data from the source address to the destination address, including: the source FPGA fills the memory data from the source address into the source buffer based on the driver of the source second driver; the source FPGA retrieves the memory data from the source buffer and sends it to the destination buffer through the Ethernet network card, so that the destination FPGA retrieves the memory data from the destination buffer based on the driver of the destination second driver, and stores the retrieved memory data into the destination address.
[0119] Example 5
[0120] According to another aspect of an embodiment of the present invention, a memory data transmission method is also provided. Figure 6 is a flow chart of another memory data transmission method according to Embodiment 5 of the present invention. Figure 6 As shown, the method includes:
[0121] Step S602, the destination FPGA receives the destination address configured by the destination first driver, wherein the destination address is a virtual address of the memory data to be transmitted in the destination virtual machine, and the destination address is obtained by converting the source address, and the source address is a virtual address of the memory data to be transmitted in the source virtual machine, and the source address is configured in the source FPGA by the source first driver;
[0122] Step S604: The destination FPGA communicates with the source FPGA to directly copy the memory data from the source address to the destination address.
[0123] Through the above steps, the source end configures the source address to the source end FPGA through the first source end driver, wherein the source address is the virtual address of the virtual machine memory of the memory data to be transmitted in the source end virtual machine; the source end sends the source address to the destination end; the destination end converts the source address to the destination address through the first destination end driver, and configures the destination address to the destination end FPGA, wherein the destination address is the virtual address of the virtual machine memory of the memory data in the destination end virtual machine; the source end initiates data copying to the destination end, and directly copies the memory data from the source address to the destination address through the source end FPGA and the destination end FPGA, and achieves the purpose of directly transferring the memory data from the source end to the destination end through the hardware logic at the source end and the destination end FPGA, thereby achieving the technical effect of directly transmitting the memory data from the source end to the destination end using the hardware logic of the FPGA, without the need to perform multiple copies at the source end and the process of performing multiple copies at the destination end, thereby effectively solving the technical problems of low efficiency and high resource occupation in the method of copying memory data by pure software in the related technology.
[0124] As an optional embodiment, when the data channel between the source FPGA and the destination FPGA is an Ethernet channel, the destination FPGA communicates with the source FPGA, and directly copies the memory data from the source address to the destination address, including: the destination FPGA receives the memory data taken out from the source buffer and sent through the Ethernet network card, and stores it in the destination buffer, wherein the memory data is filled into the source buffer from the source address through the driver of the source second driver; the destination FPGA takes out the memory data from the destination buffer through the driver of the destination second driver, and stores the taken out memory data into the destination address.
[0125] Example 6
[0126] According to another aspect of an embodiment of the present invention, a virtual machine hot migration memory data transmission solution based on FPGA is also provided, and the solution is described in detail below.
[0127] Figure 7 is a schematic diagram of a conventional hot migration memory transmission method according to Embodiment 6 of the present invention, such as Figure 7 As shown in the figure, in each memory iterative copy, the virtual machine memory data is first copied from the user space of the source server to the kernel buffer, processed by the network protocol stack, and then sent out through the network card; the receiving end also needs to go through data copying and protocol stack processing. These processes will consume CPU computing power and increase data transmission time.
[0128] Figure 8 is a schematic diagram of a point-to-point hot migration memory transmission method based on FPGA according to Embodiment 6 of the present invention, such as Figure 8As shown in the figure, FPGA implements the PCI protocol and becomes a PCI device on the server. A driver for the device needs to be integrated into the server kernel. The specific point-to-point memory transmission process is as follows:
[0129] Before each iterative copy, the source FPGA device driver sets the io bus address IOVA of the memory data or the physical address HPA of the physical machine and the destination ID (if the two ends need to be transmitted via Ethernet, the ID can be the destination IP) to the FPGA. The above-mentioned IOMMU is a chip on the north bridge, which can convert the DMA (direct memory access, Direct Memory Access) address in the device into the physical address of the host machine. The above-mentioned DMA address is also the io bus address, iova. The DMA of the device can correctly access the system memory. The io bus address may have an identical mapping with the HPA, or it may have a different mapping relationship. The host machine memory virtual address (HVA, host virtual adress) will be translated into the corresponding physical address by the IOMMU during device DMA. FPGA can be regarded as a peripheral device, so the system needs to have a related driver when performing migration configuration, but the driver can drive the above-mentioned FPGA in the kernel space or in the user space. In this solution, as an optional implementation method, such as Figure 8 As shown, the driver is set in the kernel space, and both the source FPGA and the destination FPGA are set in the kernel space.
[0130] The source sends a notification message to the destination, which includes the guest physical address (GPA) of the virtual machine memory to be transmitted, the data length and the source ID (for verification). The destination converts the virtual machine memory physical address to the host memory virtual address (HVA) corresponding to the destination through the FPGA driver, and makes the necessary memory page request according to the data length. The memory virtual address is configured to the FPGA together with the source ID and data length as the destination address of the data copy.
[0131] The source initiates the copy, and the FPGAs at both ends communicate data, directly copying the data from the source address to the destination address. During the copy process, the source FPGA can choose to compress the data, while the destination FPGA decompresses the data. The destination also needs to perform source verification and record the length of the copied data. Once it is found that the length of the copied data exceeds the preset data length, the copy will be stopped and the source will be notified.
[0132] After the copy is completed, the source end clears the data configuration in the FPGA (memory address, data size and destination ID) and sends a notification message to the destination end. After receiving the notification, the destination end also clears the FPGA configuration (memory address, data size and source ID).
[0133] The channel between the FPGAs at both ends can be a custom data transmission channel or Ethernet.
[0134] The custom channel can be a token ring network based on FPGA ID, etc. FPGA implements the communication protocol in hardware form and directly connects to the network through a physical link.
[0135] In the above server architecture, data can be transmitted between FPGAs via Ethernet. At this time, it is necessary to introduce an FPGA driver (driver B) in the control node and use the software FIFO queue for data buffering. Fig. 9 is a schematic diagram of a method for applying FPGA-based point-to-point traditional hot migration memory transmission to a server architecture according to Embodiment 6 of the present invention, such as Fig. 9 As shown:
[0136] Before data transmission, driver B will set the size of each entry in the FIFO according to the network MTU (Maximum Transmission Unit) size.
[0137] During data transmission, driver B fills the data into the tail of the FIFO queue in sequence.
[0138] At the same time, driver B takes data from the head of the FIFO queue and sends it through the network card (through the control node protocol stack or the network card itself supports TOE (TCP offload engine)).
[0139] The size of the FIFO queue can be pre-configured. Once the FIFO is full, driver B will notify the FPGA to suspend copying. When there is space in the FIFO, driver B will notify the FPGA to continue copying.
[0140] The destination driver B puts the data received from the network into the tail of the FIFO, and takes out the data from the head of the FIFO and sends it to the FPGA to complete the copy.
[0141] This implementation method is a memory data transmission method based on FPGA designed specifically for hot migration of virtual machines; FPGA implements hot migration memory compression and decompression; and a method for FPGAs at both ends of the server architecture to communicate via Ethernet.
[0142] It should be noted that, for the above-mentioned method embodiments, for the sake of simplicity, they are all described as a series of action combinations, but those skilled in the art should know that the present invention is not limited by the described action sequence, because according to the present invention, certain steps can be performed in other sequences or simultaneously. Secondly, those skilled in the art should also know that the embodiments described in the specification are all preferred embodiments, and the actions and modules involved are not necessarily required by the present invention.
[0143] Through the description of the above implementation methods, those skilled in the art can clearly understand that the method according to the above embodiment can be implemented by means of software plus a necessary general hardware platform, and of course can also be implemented by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present invention, or the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, a magnetic disk, or an optical disk), and includes a number of instructions for enabling a terminal device (which can be a mobile phone, a computer, a server, or a network device, etc.) to execute the methods described in each embodiment of the present invention.
[0144] Example 7
[0145] According to an embodiment of the present invention, there is also provided a source server for implementing the memory data transmission method described in the above embodiment 1. Fig.10 is a schematic diagram of a source server according to Embodiment 7 of the present invention, such as Fig.10 As shown, the device includes: a configuration module 1002, a sending module 1004 and a first copy module 1006. The device is described in detail below.
[0146] A configuration module 1002 is used to configure a source address to a source-end FPGA through a first source-end driver, wherein the source address is a virtual machine memory physical address of memory data to be transmitted in the source-end virtual machine; a sending module 1004 is connected to the above-mentioned configuration module 1002, and is used to send the source address to a destination end, so that the destination end determines a destination address of memory data to be transmitted in the destination-end virtual machine through the first destination-end driver, and configures the destination address to the destination-end FPGA, wherein the destination address is a virtual machine memory physical address of memory data to be transmitted in the destination-end virtual machine; a first copy module 1006 is connected to the above-mentioned sending module 1004, and is used to directly copy memory data from the source address to the destination address through the source-end FPGA and the destination-end FPGA.
[0147] It should be noted that the configuration module 1002, the sending module 1004 and the first copy module 1006 correspond to steps S202 to S206 in Example 1, and the three modules and the corresponding steps implement the same examples and application scenarios, but are not limited to the contents disclosed in the above-mentioned Example 1. It should be noted that the above-mentioned modules, as part of the device, can be run in the computer terminal 10 provided in Example 1.
[0148] Example 8
[0149] According to an embodiment of the present invention, a destination server for implementing the memory data transmission method described in the above embodiment 2 is also provided. Fig.11 It is a schematic diagram of a destination server according to Embodiment 8 of the present invention. As shown in FIG11 , the device includes: a first receiving module 1102 , a conversion module 1104 and a second copy module 1106 . The device is described in detail below.
[0150] The first receiving module 1102 is used to receive the source address sent by the source end, wherein the source address is the virtual machine memory physical address of the memory data to be transmitted in the source virtual machine, and the source address is configured in the source FPGA through the first driver of the source end; the conversion module 1104 is connected to the above-mentioned first receiving module 1102, and is used to convert the source address into the destination address through the first driver of the destination end, and configure the destination address to the destination FPGA, wherein the destination address is the virtual machine memory physical address of the memory data to be transmitted in the destination virtual machine; the second copy module 1106 is connected to the above-mentioned conversion module 1104, and is used to directly copy the memory data from the source address to the destination address through the source FPGA and the destination FPGA.
[0151] It should be noted that the first receiving module 1102, the conversion module 1104 and the second copy module 1106 correspond to steps S302 to S306 in Example 2, and the three modules and the corresponding steps implement the same examples and application scenarios, but are not limited to the contents disclosed in the above-mentioned Example 2. It should be noted that the above-mentioned modules as part of the device can be run in the computer terminal 10 provided in Example 1.
[0152] Example 9
[0153] According to an embodiment of the present invention, a memory data transmission system for implementing the memory data transmission method described in the above embodiment 3 is also provided. Fig.12 is a schematic diagram of a data transmission system according to Embodiment 9 of the present invention. Fig.12 As shown, the device includes: a source end 1202 and a destination end 1204. The device is described in detail below.
[0154] A source end 1202 and a destination end 1204, wherein the source end 1202 is configured with a source end FPGA, and the destination end 1204 is configured with a destination end FPGA, the source end 1202 is used to configure a source address to the source end FPGA through a first source end driver, and send the source address to the destination end, wherein the source address is a virtual machine memory physical address of memory data to be transmitted in the source end virtual machine; the destination end 1204 is used to convert the source address to a destination address through a first destination end driver, and configure the destination address to the destination end FPGA, wherein the destination address is a virtual machine memory physical address of memory data to be transmitted in the destination end virtual machine; the source end 1202 is also used to initiate data copying to the destination end, and directly copy memory data from the source address to the destination address through the source end FPGA and the destination end FPGA.
[0155] It should be noted that the above source end 1202 and the destination end 1204 correspond to steps S402 to S408 in Example 3, and the instances and application scenarios implemented by the two ends and the corresponding steps are the same, but are not limited to the contents disclosed in the above Example 3. It should be noted that the above module as part of the device can be run in the computer terminal 10 provided in Example 1.
[0156] Example 10
[0157] According to an embodiment of the present invention, a destination server for implementing the memory data transmission method described in the above embodiment 2 is also provided. Fig.13 is a schematic diagram of a memory data transmission device according to Embodiment 10 of the present invention. Fig.13 As shown, the device includes: a second receiving module 1302 and a third copying module 1304. The device is described in detail below.
[0158] The second receiving module 1302 is used for the source-end FPGA to receive the source address configured by the first driver of the source end, wherein the source address is the virtual address of the virtual machine memory of the memory data to be transmitted in the source-end virtual machine; the third copying module 1304 is connected to the above-mentioned second receiving module 1302, and is used for the source-end FPGA to communicate with the destination-end FPGA when the destination address of the memory data to be transmitted in the destination-end virtual machine is configured to the destination-end FPGA, and directly copy the memory data from the source address to the destination address, wherein the destination address is the virtual address of the virtual machine memory of the memory data to be transmitted in the destination-end virtual machine.
[0159] It should be noted that the second receiving module 1302 and the third copying module 1304 correspond to steps S502 to S504 in Example 4, and the three modules and the corresponding steps implement the same examples and application scenarios, but are not limited to the contents disclosed in the above-mentioned Example 4. It should be noted that the above-mentioned modules, as part of the device, can be run in the computer terminal 10 provided in Example 1.
[0160] Embodiment 11
[0161] According to an embodiment of the present invention, a destination server for implementing the memory data transmission method described in the above embodiment 2 is also provided. Fig.14 is a schematic diagram of a memory data transmission device according to Embodiment 11 of the present invention, Fig.14 As shown, the device includes: a third receiving module 1402 and a fourth copying module 1404. The device is described in detail below.
[0162] The third receiving module 1402 is used for the destination FPGA to receive the destination address configured by the first driver of the destination end, wherein the destination address is the virtual address of the virtual machine memory of the memory data to be transmitted in the destination virtual machine, and the destination address is obtained by converting the source address, and the source address is the virtual address of the virtual machine memory of the memory data to be transmitted in the source virtual machine, and the source address is configured in the source FPGA through the first driver of the source end; the fourth copy module 1404 is connected to the above-mentioned third receiving module 1402, and is used for the destination FPGA to communicate with the source FPGA, and directly copies the memory data from the source address to the destination address.
[0163] It should be noted that the third receiving module 1402 and the fourth copying module 1404 correspond to steps S602 to S604 in Example 5, and the three modules and the corresponding steps implement the same examples and application scenarios, but are not limited to the contents disclosed in the above-mentioned Example 5. It should be noted that the above-mentioned modules, as part of the device, can be run in the computer terminal 10 provided in Example 1.
[0164] Example 12
[0165] The embodiment of the present invention can provide a computer terminal, which can be any computer terminal device in a computer terminal group. Optionally, in this embodiment, the computer terminal can also be replaced by a terminal device such as a mobile terminal.
[0166] Optionally, in this embodiment, the computer terminal may be located in at least one network device among a plurality of network devices of the computer network.
[0167] In this embodiment, the above-mentioned computer terminal can execute the program code of the following steps in the memory data transmission method of the application: the source end configures the source address to the source end FPGA through the source end first driver, wherein the source address is the virtual address of the virtual machine memory of the memory data to be transmitted in the source end virtual machine; the source end sends the source address to the destination end, so that the destination end determines the destination address of the memory data to be transmitted in the destination end virtual machine through the destination end first driver, and configures the destination address to the destination end FPGA, wherein the destination address is the virtual address of the virtual machine memory of the memory data to be transmitted in the destination end virtual machine; the source end directly copies the memory data from the source address to the destination address through the source end FPGA and the destination end FPGA.
[0168] Optionally, Fig.15 1 is a block diagram of a computer terminal according to Embodiment 12 of the present invention. Fig.15 As shown, the computer terminal 150 may include: one or more (only one is shown in the figure) processors 152, a memory 154, and a peripheral interface.
[0169] Among them, the memory can be used to store software programs and modules, such as the program instructions / modules corresponding to the memory data transmission method and device in the embodiment of the present invention. The processor executes various functional applications and data processing by running the software programs and modules stored in the memory, that is, realizing the above-mentioned memory data transmission method. The memory may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some instances, the memory may further include a memory remotely arranged relative to the processor, and these remote memories may be connected to the terminal 150 via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
[0170] The processor can call the information and application stored in the memory through the transmission device to perform the following steps: the source end configures the source address to the source end FPGA through the source end first driver, wherein the source address is the virtual address of the virtual machine memory of the memory data to be transmitted in the source end virtual machine; the source end sends the source address to the destination end, so that the destination end determines the destination address of the memory data to be transmitted in the destination end virtual machine through the destination end first driver, and configures the destination address to the destination end FPGA, wherein the destination address is the virtual address of the virtual machine memory of the memory data to be transmitted in the destination end virtual machine; the source end directly copies the memory data from the source address to the destination address through the source end FPGA and the destination end FPGA.
[0171] Optionally, the processor may also execute the program code of the following steps: the method also includes: the source end also sends the data length of the memory data and / or the source end identifier used to identify the source end to the destination end, wherein the data length is used by the destination end to apply for memory space for the memory data, and the source end identifier is used by the destination end to verify the source end.
[0172] Optionally, the processor may also execute program code of the following steps: the source end directly copies memory data from a source address to a destination address through a source FPGA and a destination FPGA, including: the source end compresses the memory data copied from the source address through the source FPGA to obtain compressed data, wherein the destination FPGA decompresses the copied compressed data and stores it in the destination address.
[0173] Optionally, the processor may also execute program code of the following steps: the data channel between the source FPGA and the destination FPGA includes at least one of the following: a predetermined ring network channel, wherein the predetermined ring network channel is a communication protocol implemented by the source FPGA and the destination FPGA in hardware form and directly connected to the network through a physical link; an Ethernet channel.
[0174] Optionally, the processor may also execute the following program code: when the data channel between the source FPGA and the destination FPGA is an Ethernet channel, the source end directly copies the memory data from the source address to the destination address, including: the source end drives the source FPGA to fill the memory data from the source address into the source buffer through the source second driver, and retrieves the memory data from the source buffer and sends it to the destination buffer through the Ethernet network card; wherein the destination end drives the destination FPGA to retrieve the memory data from the destination buffer through the destination second driver, and stores the retrieved memory data into the destination address.
[0175] Optionally, the processor may also execute program code of the following steps: the source buffer and the destination buffer are first-in-first-out queues, and the size of each blank storage space in the first-in-first-out queue is determined according to the maximum transmission unit of Ethernet.
[0176] Optionally, the processor may also execute the following program code: after directly copying the memory data from the source address to the destination address through the source FPGA and the destination FPGA at the source end, the source end also includes: clearing the data configured in the source FPGA, and sending a first notification message to the destination end to notify the destination end to clear the data configured in the destination FPGA.
[0177] The processor can also call the information and application programs stored in the memory through the transmission device to perform the following steps: the destination end receives the source address sent by the source end, wherein the source address is the virtual address of the virtual machine memory of the memory data to be transmitted in the source end virtual machine, and the source address is configured in the source end FPGA through the first driver of the source end; the destination end converts the source address into the destination address through the first driver of the destination end, and configures the destination address to the destination end FPGA, wherein the destination address is the virtual address of the virtual machine memory of the memory data to be transmitted in the destination end virtual machine; the destination end directly copies the memory data from the source address to the destination address through the source end FPGA and the destination end FPGA.
[0178] Optionally, the processor may also execute the program code of the following steps: the method also includes: the destination end also receives the data length of the memory data sent by the source end and / or the source end identifier used to identify the source end; the destination end applies for memory space for the memory data according to the data length, and verifies the source end according to the source end identifier.
[0179] Optionally, the processor may also execute the program code of the following steps: the destination end directly copies the memory data from the source address to the destination address through the source end FPGA and the destination end FPGA, including: the destination end monitors the data length of the data that has been copied during the copying process; and when it is detected that the data length of the copied data exceeds the data length of the memory data to be transmitted sent by the source end, a second notification message is sent to the source end to notify the source end to stop copying the data.
[0180] Optionally, the processor may also execute the program code of the following steps: the destination end directly copies the memory data from the source address to the destination address through the source end FPGA and the destination end FPGA, including: the destination end receives the compressed data sent by the source end, wherein the compressed data is obtained by compressing the memory data copied from the source address through the source end FPGA; the destination end decompresses the compressed data through the destination end FPGA and stores it in the destination address.
[0181] The processor can also call the information and application programs stored in the memory through the transmission device to perform the following steps: the source end configures the source address to the source end FPGA through the source end first driver, wherein the source address is the virtual address of the virtual machine memory of the memory data to be transmitted in the source end virtual machine; the source end sends the source address to the destination end; the destination end converts the source address to the destination address through the destination end first driver, and configures the destination address to the destination end FPGA, wherein the destination address is the virtual address of the virtual machine memory of the memory data to be transmitted in the destination end virtual machine; the source end initiates data copying to the destination end, and directly copies the memory data from the source address to the destination address through the source end FPGA and the destination end FPGA.
[0182] Optionally, the processor may also execute the program code of the following steps: the method also includes: the source end also sends the data length of the memory data and / or the source end identifier used to identify the source end to the destination end; the destination end applies for memory space for the memory data according to the data length, and verifies the source end according to the source end identifier.
[0183] Optionally, the processor may also execute the following program code: the source end initiates data copying to the destination end, and directly copies the memory data from the source address to the destination address through the source end FPGA and the destination end FPGA, including: the source end compresses the memory data copied from the source address through the source end FPGA to obtain compressed data; the destination end FPGA decompresses the compressed data and stores it in the destination address.
[0184] Optionally, the processor may also execute program code of the following steps: the data channel between the source FPGA and the destination FPGA includes at least one of the following: a predetermined ring network channel, wherein the predetermined ring network channel is a communication protocol implemented by the source FPGA and the destination FPGA in hardware form and directly connected to the network through a physical link; an Ethernet channel.
[0185] Optionally, the processor may also execute the following program code: when the data channel between the source FPGA and the destination FPGA is an Ethernet channel, the source end directly copies the memory data from the source address to the destination address, including: the source end drives the source FPGA through the source second driver to fill the memory data from the source address into the source buffer, and retrieves the memory data from the source buffer and sends it to the destination buffer through the Ethernet network card; the destination end drives the destination FPGA through the destination second driver to retrieve the memory data from the destination buffer, and stores the retrieved memory data into the destination address.
[0186] Optionally, the processor may also execute program code of the following steps: the source buffer and the destination buffer are first-in-first-out queues, and the size of each blank storage space in the first-in-first-out queue is determined according to the maximum transmission unit of Ethernet.
[0187] Optionally, the processor may also execute the following program code: initiating data copy from the source end to the destination end, directly copying the memory data from the source address to the destination address through the source end FPGA and the destination end FPGA, further comprising: the source end clearing the data configured in the source end FPGA, and sending a first notification message to the destination end; the destination end clearing the data configured in the destination end FPGA according to the first notification message.
[0188] Optionally, the processor may also execute program code of the following steps: the source end initiates data copying to the destination end, and directly copies memory data from the source address to the destination address through the source end FPGA and the destination end FPGA, including: the destination end monitors the data length of the data copied during the copying process; and when it is detected that the data length of the copied data exceeds the data length of the memory data to be transmitted sent by the source end, sends a second notification message to the source end; the source end stops data copying according to the second notification message.
[0189] The processor can also call the information and application programs stored in the memory through the transmission device to perform the following steps: the source-end FPGA receives the source address configured by the first source-end driver, wherein the source address is the virtual address of the virtual machine memory of the memory data to be transmitted in the source-end virtual machine; when the destination address of the memory data to be transmitted in the destination-end virtual machine is configured to the destination-end FPGA, the source-end FPGA communicates with the destination-end FPGA to directly copy the memory data from the source address to the destination address, wherein the destination address is the virtual address of the virtual machine memory of the memory data to be transmitted in the destination-end virtual machine.
[0190] Optionally, the processor may also execute the following program code: the source FPGA communicates with the destination FPGA to directly copy memory data from the source address to the destination address, including: the source FPGA compresses the memory data copied from the source address to obtain compressed data, which is used by the destination FPGA to decompress the compressed data and store it in the destination address.
[0191] Optionally, the processor may also execute the following program code: when the data channel between the source FPGA and the destination FPGA is an Ethernet channel, the source FPGA communicates with the destination FPGA to directly copy memory data from the source address to the destination address, including: the source FPGA fills the memory data from the source address into the source buffer based on the driver of the source second driver; the source FPGA retrieves the memory data from the source buffer and sends it to the destination buffer via the Ethernet network card, so that the destination FPGA retrieves the memory data from the destination buffer based on the driver of the destination second driver, and stores the retrieved memory data into the destination address.
[0192] The processor can also call the information and application programs stored in the memory through the transmission device to perform the following steps: the destination FPGA receives the destination address configured by the first driver of the destination, wherein the destination address is the virtual address of the virtual machine memory of the memory data to be transmitted in the destination virtual machine, and the destination address is obtained by converting the source address, and the source address is the virtual address of the virtual machine memory of the memory data to be transmitted in the source virtual machine, and the source address is configured in the source FPGA through the first driver of the source; the destination FPGA communicates with the source FPGA to directly copy the memory data from the source address to the destination address.
[0193] Optionally, the processor may also execute the following program code: when the data channel between the source FPGA and the destination FPGA is an Ethernet channel, the destination FPGA communicates with the source FPGA, and directly copies the memory data from the source address to the destination address, including: the destination FPGA receives the memory data taken out from the source buffer and sent through the Ethernet network card, and stores it in the destination buffer, wherein the memory data is filled into the source buffer from the source address through the driver of the second driver of the source; the destination FPGA takes out the memory data from the destination buffer through the driver of the second driver of the destination, and stores the taken out memory data in the destination address.
[0194] According to an embodiment of the present invention, a scheme of a memory data transmission method is provided. A source end is used to configure a source address to a source end FPGA through a first source end driver, wherein the source address is a virtual machine memory virtual address of memory data to be transmitted in a source end virtual machine; the source end sends the source address to a destination end, so that the destination end determines the destination address of the memory data to be transmitted in the destination end virtual machine through the first destination end driver, and configures the destination address to the destination end FPGA, wherein the destination address is a virtual machine memory virtual address of the memory data to be transmitted in the destination end virtual machine; the source end directly copies the memory data from the source address to the destination address through the source end FPGA and the destination end FPGA, and achieves the purpose of directly transferring the memory data from the source end to the destination end through the hardware logic at the source end and the destination end FPGA, thereby achieving the technical effect of directly transferring the memory data from the source end to the destination end using the hardware logic of the FPGA, without the need to perform multiple copies at the source end and the process of performing multiple copies at the destination end, thereby effectively solving the technical problem of low efficiency and high resource occupation in the method of copying memory data by pure software in the related technology.
[0195] It can be understood by those skilled in the art that Fig.11The structure shown is for illustration only, and the computer terminal may also be a smart phone (such as an Android phone, an iOS phone, etc.), a tablet computer, a handheld computer, a mobile Internet device (Mobile Internet Devices, MID), a PAD, or other terminal devices. Fig.11 The structure of the electronic device is not limited. For example, the computer terminal 110 may also include Fig.11 More or fewer components (such as network interfaces, display devices, etc.) shown in, or having Fig.11 Different configurations are shown.
[0196] A person of ordinary skill in the art can understand that all or part of the steps in the various methods of the above embodiments can be completed by instructing the hardware related to the terminal device through a program, and the program can be stored in a computer-readable storage medium, and the storage medium may include: a flash drive, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, etc.
[0197] Example 8
[0198] The embodiment of the present invention further provides a storage medium. Optionally, in this embodiment, the storage medium can be used to store the program code executed by the memory data transmission method provided in the first embodiment.
[0199] Optionally, in this embodiment, the above storage medium may be located in any computer terminal in a computer terminal group in a computer network, or in any mobile terminal in a mobile terminal group.
[0200] Optionally, in this embodiment, the storage medium is configured to store program codes for executing the following steps: the source end configures the source address to the source end FPGA through the source end first driver, wherein the source address is the virtual address of the virtual machine memory of the memory data to be transmitted in the source end virtual machine; the source end sends the source address to the destination end, so that the destination end determines the destination address of the memory data to be transmitted in the destination end virtual machine through the destination end first driver, and configures the destination address to the destination end FPGA, wherein the destination address is the virtual address of the virtual machine memory of the memory data to be transmitted in the destination end virtual machine; the source end directly copies the memory data from the source address to the destination address through the source end FPGA and the destination end FPGA.
[0201] Optionally, in this embodiment, the storage medium is configured to store program code for executing the following steps: the above method also includes: the source end also sends the data length of the memory data and / or the source end identifier for identifying the source end to the destination end, wherein the data length is used by the destination end to apply for memory space for the memory data, and the source end identifier is used by the destination end to verify the source end.
[0202] Optionally, in this embodiment, the storage medium is configured to store program codes for executing the following steps: the source end directly copies the memory data from the source address to the destination address through the source end FPGA and the destination end FPGA, including: the source end compresses the memory data copied from the source address through the source end FPGA to obtain compressed data, wherein the destination end FPGA decompresses the copied compressed data and stores it in the destination address.
[0203] Optionally, in this embodiment, the storage medium is configured to store program code for executing the following steps: the data channel between the source FPGA and the destination FPGA includes at least one of the following: a predetermined ring network channel, wherein the predetermined ring network channel is a communication protocol implemented by the source FPGA and the destination FPGA in hardware form and directly connected to the network through a physical link; an Ethernet channel.
[0204] Optionally, in this embodiment, the storage medium is configured to store program code for executing the following steps: when the data channel between the source FPGA and the destination FPGA is an Ethernet channel, the source end directly copies the memory data from the source address to the destination address, including: the source end drives the source FPGA through the source second driver to fill the memory data from the source address into the source buffer, and retrieves the memory data from the source buffer and sends it to the destination buffer through the Ethernet network card; wherein the destination end drives the destination FPGA through the destination second driver to retrieve the memory data from the destination buffer, and stores the retrieved memory data into the destination address.
[0205] Optionally, in this embodiment, the storage medium is configured to store program codes for executing the following steps: the source buffer and the destination buffer are first-in-first-out queues, and the size of each blank storage space in the first-in-first-out queue is determined according to the maximum transmission unit of Ethernet.
[0206] Optionally, in this embodiment, the storage medium is configured to store program codes for executing the following steps: after directly copying the memory data from the source address to the destination address through the source FPGA and the destination FPGA at the source end, it also includes: the source end clears the data configured in the source FPGA, and sends a first notification message to the destination end to notify the destination end to clear the data configured in the destination FPGA.
[0207] Optionally, in this embodiment, the storage medium is configured to store program codes for executing the following steps: the destination end receives the source address sent by the source end, wherein the source address is the virtual address of the virtual machine memory of the memory data to be transmitted in the source end virtual machine, and the source address is configured in the source end FPGA through the first driver of the source end; the destination end converts the source address into the destination address through the first driver of the destination end, and configures the destination address to the destination end FPGA, wherein the destination address is the virtual address of the virtual machine memory of the memory data to be transmitted in the destination end virtual machine; the destination end directly copies the memory data from the source address to the destination address through the source end FPGA and the destination end FPGA.
[0208] Optionally, in this embodiment, the storage medium is configured to store program code for executing the following steps: the above method also includes: the destination end also receives the data length of the memory data sent by the source end and / or the source end identifier for identifying the source end; the destination end applies for memory space for the memory data according to the data length, and verifies the source end according to the source end identifier.
[0209] Optionally, in this embodiment, the storage medium is configured to store program code for executing the following steps: the destination end directly copies the memory data from the source address to the destination address through the source end FPGA and the destination end FPGA, including: the destination end monitors the data length of the data that has been copied during the copying process; and when it is monitored that the data length of the copied data exceeds the data length of the memory data to be transmitted sent by the source end, a second notification message is sent to the source end to notify the source end to stop copying the data.
[0210] Optionally, in this embodiment, the storage medium is configured to store program codes for executing the following steps: the destination end directly copies memory data from a source address to a destination address through a source end FPGA and a destination end FPGA, including: the destination end receives compressed data sent by the source end, wherein the compressed data is obtained by compressing memory data copied from the source address through the source end FPGA; the destination end decompresses the compressed data through the destination end FPGA and stores it in the destination address.
[0211] Optionally, in this embodiment, the storage medium is configured to store program codes for executing the following steps: the source end configures the source address to the source end FPGA through the source end first driver, wherein the source address is the virtual address of the virtual machine memory of the memory data to be transmitted in the source end virtual machine; the source end sends the source address to the destination end; the destination end converts the source address to the destination address through the destination end first driver, and configures the destination address to the destination end FPGA, wherein the destination address is the virtual address of the virtual machine memory with the memory data to be transmitted in the destination end virtual machine; the source end initiates data copy to the destination end, and directly copies the memory data from the source address to the destination address through the source end FPGA and the destination end FPGA.
[0212] Optionally, in this embodiment, the storage medium is configured to store program code for executing the following steps: the above method also includes: the source end also sends the data length of the memory data and / or the source end identifier for identifying the source end to the destination end; the destination end applies for memory space for the memory data based on the data length, and verifies the source end based on the source end identifier.
[0213] Optionally, in this embodiment, the storage medium is configured to store program codes for executing the following steps: the source end initiates data copying to the destination end, and directly copies the memory data from the source address to the destination address through the source end FPGA and the destination end FPGA, including: the source end compresses the memory data copied from the source address through the source end FPGA to obtain compressed data; the destination end FPGA decompresses the compressed data and stores it in the destination address.
[0214] Optionally, in this embodiment, the storage medium is configured to store program code for executing the following steps: the data channel between the source FPGA and the destination FPGA includes at least one of the following: a predetermined ring network channel, wherein the predetermined ring network channel is a communication protocol implemented by the source FPGA and the destination FPGA in hardware form and directly connected to the network through a physical link; an Ethernet channel.
[0215] Optionally, in this embodiment, the storage medium is configured to store program codes for executing the following steps: when the data channel between the source FPGA and the destination FPGA is an Ethernet channel, the source end directly copies memory data from the source address to the destination address, including: the source end drives the source FPGA through the source second driver to fill the memory data from the source address into the source buffer, and retrieves the memory data from the source buffer and sends it to the destination buffer through the Ethernet network card; the destination end drives the destination FPGA through the destination second driver to retrieve the memory data from the destination buffer, and stores the retrieved memory data in the destination address.
[0216] Optionally, in this embodiment, the storage medium is configured to store program codes for executing the following steps: the source buffer and the destination buffer are first-in-first-out queues, and the size of each blank storage space in the first-in-first-out queue is determined according to the maximum transmission unit of Ethernet.
[0217] Optionally, in this embodiment, the storage medium is configured to store program codes for executing the following steps: initiating data copy from the source end to the destination end, directly copying the memory data from the source address to the destination address through the source end FPGA and the destination end FPGA, and further including: the source end clearing the data configured in the source end FPGA, and sending a first notification message to the destination end; the destination end clearing the data configured in the destination end FPGA according to the first notification message.
[0218] Optionally, in this embodiment, the storage medium is configured to store program codes for executing the following steps: the source end initiates data copying to the destination end, and directly copies the memory data from the source address to the destination address through the source end FPGA and the destination end FPGA, including: the destination end monitors the data length of the data copied during the copying process; and when it is detected that the data length of the copied data exceeds the data length of the memory data to be transmitted sent by the source end, sends a second notification message to the source end; the source end stops data copying according to the second notification message.
[0219] Optionally, in this embodiment, the storage medium is configured to store program code for executing the following steps: the source-end FPGA receives the source address configured by the source-end first driver, wherein the source address is the virtual address of the virtual machine memory of the memory data to be transmitted in the source-end virtual machine; when the destination address of the memory data to be transmitted in the destination-end virtual machine is configured to the destination-end FPGA, the source-end FPGA communicates with the destination-end FPGA and directly copies the memory data from the source address to the destination address, wherein the destination address is the virtual address of the virtual machine memory of the memory data to be transmitted in the destination-end virtual machine.
[0220] Optionally, in this embodiment, the storage medium is configured to store program codes for executing the following steps: the source FPGA communicates with the destination FPGA to directly copy memory data from the source address to the destination address, including: the source FPGA compresses the memory data copied from the source address to obtain compressed data, which is used by the destination FPGA to decompress the compressed data and store it in the destination address.
[0221] Optionally, in this embodiment, the storage medium is configured to store program code for executing the following steps: when the data channel between the source FPGA and the destination FPGA is an Ethernet channel, the source FPGA communicates with the destination FPGA, and directly copies the memory data from the source address to the destination address, including: the source FPGA fills the memory data from the source address into the source buffer based on the driver of the source second driver; the source FPGA takes out the memory data from the source buffer and sends it to the destination buffer through the Ethernet network card, for the destination FPGA to take out the memory data from the destination buffer based on the driver of the destination second driver, and store the taken memory data into the destination address.
[0222] Optionally, in this embodiment, the storage medium is configured to store program code for executing the following steps: the destination FPGA receives the destination address configured by the destination first driver, wherein the destination address is the virtual address of the virtual machine memory of the memory data to be transmitted in the destination virtual machine, and the destination address is obtained by converting the source address, and the source address is the virtual address of the virtual machine memory of the memory data to be transmitted in the source virtual machine, and the source address is configured in the source FPGA through the source first driver; the destination FPGA communicates with the source FPGA to directly copy the memory data from the source address to the destination address.
[0223] Optionally, in this embodiment, the storage medium is configured to store program code for executing the following steps: when the data channel between the source FPGA and the destination FPGA is an Ethernet channel, the destination FPGA communicates with the source FPGA, and directly copies the memory data from the source address to the destination address, including: the destination FPGA receives the memory data taken out from the source buffer and sent through the Ethernet network card, and stores it in the destination buffer, wherein the memory data is filled into the source buffer from the source address through the driver of the second driver of the source; the destination FPGA takes out the memory data from the destination buffer through the driver of the second driver of the destination, and stores the taken out memory data into the destination address.
[0224] The serial numbers of the above embodiments of the present invention are only for description and do not represent the advantages or disadvantages of the embodiments.
[0225] In the above embodiments of the present invention, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.
[0226] In the several embodiments provided in this application, it should be understood that the disclosed technical content can be implemented in other ways. Among them, the device embodiments described above are only schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of units or modules, which can be electrical or other forms.
[0227] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0228] In addition, each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.
[0229] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions for a computer device (which can be a personal computer, a server or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), mobile hard disk, magnetic disk or optical disk and other media that can store program codes.
[0230] The above is only a preferred embodiment of the present invention. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principle of the present invention. These improvements and modifications should also be regarded as the scope of protection of the present invention.
Claims
1. A memory data transmission method, characterized in that: include: The source end configures the source address to the source end FPGA through the source end first driver, wherein the source address is the virtual address of the virtual machine memory of the memory data to be transmitted in the source end virtual machine; The source end sends the source address to the destination end, so that the destination end determines the destination address of the memory data to be transmitted in the destination end virtual machine through the first driver of the destination end, and configures the destination address to the destination end FPGA, wherein the destination address is the virtual address of the virtual machine memory of the memory data to be transmitted in the destination end virtual machine; The source end directly copies the memory data from the source address to the destination address through the source end FPGA and the destination end FPGA.
2. The method according to claim 1, characterized in that Also includes: The source end also sends the data length of the memory data and / or a source end identifier for identifying the source end to the destination end, wherein the data length is used by the destination end to apply for memory space for the memory data, and the source end identifier is used by the destination end to verify the source end.
3. The method according to claim 1, characterized in that The source end directly copies the memory data from the source address to the destination address through the source end FPGA and the destination end FPGA, including: The source end compresses the memory data copied from the source address through the source end FPGA to obtain compressed data, wherein the destination end FPGA decompresses the copied compressed data and stores it in the destination address.
4. The method according to any one of claims 1 to 3, characterized in that The data channel between the source FPGA and the destination FPGA includes at least one of the following: A predetermined ring network channel, wherein the predetermined ring network channel is a communication protocol implemented by the source FPGA and the destination FPGA in a hardware form and directly connected to the network through a physical link; Ethernet Channel.
5. The method according to claim 4, characterized in that In the case where the data channel between the source FPGA and the destination FPGA is an Ethernet channel, the source end directly copies the memory data from the source address to the destination address including: The source end drives the source end FPGA to fill the memory data from the source address into the source end buffer through the source end second driver, and fetches the memory data from the source end buffer and sends it to the destination end buffer through the Ethernet network card; wherein, the destination end drives the destination end FPGA to fetch the memory data from the destination end buffer through the destination end second driver, and stores the fetched memory data into the destination address.
6. The method according to claim 5, characterized in that The source buffer and the destination buffer are first-in-first-out queues, and the size of each blank storage space in the first-in-first-out queue is determined according to the maximum transmission unit of the Ethernet.
7. The method according to claim 4, characterized in that After the source end directly copies the memory data from the source address to the destination address through the source end FPGA and the destination end FPGA, the method further includes: The source end clears the data configured in the source end FPGA, and sends a first notification message to the destination end, so as to notify the destination end to clear the data configured in the destination end FPGA.
8. A memory data transmission method, characterized in that: include: The destination end receives the source address sent by the source end, wherein the source address is a virtual address of a virtual machine memory of memory data to be transmitted in the source end virtual machine, and the source address is configured in the source end FPGA through the source end first driver; The destination end converts the source address into a destination address through a first destination end driver, and configures the destination address to the destination end FPGA, wherein the destination address is a virtual address of a virtual machine memory of the memory data to be transmitted in a destination end virtual machine; The destination end directly copies the memory data from the source address to the destination address through the source end FPGA and the destination end FPGA.
9. The method according to claim 8, characterized in that Also includes: The destination end also receives the data length of the memory data sent by the source end and / or a source end identifier for identifying the source end; The destination end applies for memory space for the memory data according to the data length, and verifies the source end according to the source end identifier.
10. The method according to claim 9, characterized in that The destination end directly copies the memory data from the source address to the destination address through the source end FPGA and the destination end FPGA, including: The destination end monitors the data length of the data that has been copied during the copying process; and when it is monitored that the data length of the copied data exceeds the data length of the memory data to be transmitted sent by the source end, a second notification message is sent to the source end to notify the source end to stop data copying.
11. The method according to claim 8, characterized in that The destination end directly copies the memory data from the source address to the destination address through the source end FPGA and the destination end FPGA, including: The destination end receives the compressed data sent by the source end, wherein the compressed data is obtained by compressing the memory data copied from the source address by the source end FPGA; The destination end decompresses the compressed data through the destination end FPGA and stores the data into the destination address.
12. A memory data transmission method, characterized in that: include: The source end configures the source address to the source end FPGA through the source end first driver, wherein the source address is the virtual address of the virtual machine memory of the memory data to be transmitted in the source end virtual machine; The source end sends the source address to the destination end; The destination end converts the source address into a destination address through a first destination end driver, and configures the destination address to the destination end FPGA, wherein the destination address is a virtual address of a virtual machine memory of the memory data to be transmitted in the destination end virtual machine; The source end initiates data copying to the destination end, and directly copies the memory data from the source address to the destination address through the source end FPGA and the destination end FPGA.
13. The method according to claim 12, characterized in that Also includes: The source end also sends the data length of the memory data and / or a source end identifier for identifying the source end to the destination end; The destination end applies for memory space for the memory data according to the data length, and verifies the source end according to the source end identifier.
14. The method according to claim 12, characterized in that The source end initiates data copying to the destination end, and directly copies the memory data from the source address to the destination address through the source end FPGA and the destination end FPGA, including: The source end compresses the memory data copied from the source address through the source end FPGA to obtain compressed data; The destination FPGA decompresses the compressed data and stores it into the destination address.
15. The method according to any one of claims 12 to 14, characterized in that The data channel between the source FPGA and the destination FPGA includes at least one of the following: A predetermined ring network channel, wherein the predetermined ring network channel is a communication protocol implemented by the source FPGA and the destination FPGA in a hardware form and directly connected to the network through a physical link; Ethernet Channel.
16. The method according to claim 15, characterized in that In the case where the data channel between the source FPGA and the destination FPGA is an Ethernet channel, the source end directly copies the memory data from the source address to the destination address including: The source end drives the source end FPGA to fill the memory data from the source address into the source end buffer through the source end second driver, and fetches the memory data from the source end buffer and sends it to the destination end buffer through the Ethernet network card; The destination end drives the destination end FPGA to fetch the memory data from the destination end buffer through the destination end second driver, and stores the fetched memory data into the destination address.
17. The method according to claim 16, characterized in that The source buffer and the destination buffer are first-in-first-out queues, and the size of each blank storage space in the first-in-first-out queue is determined according to the maximum transmission unit of the Ethernet.
18. The method according to claim 15, characterized in that After the source end initiates data copying to the destination end, and directly copies the memory data from the source address to the destination address through the source end FPGA and the destination end FPGA, the method further includes: The source end clears the data configured in the source end FPGA, and sends a first notification message to the destination end; The destination end clears the data configured in the destination end FPGA according to the first notification message.
19. The method according to claim 15, characterized in that The source end initiates data copying to the destination end, and directly copies the memory data from the source address to the destination address through the source end FPGA and the destination end FPGA, including: The destination end monitors the data length of the data that has been copied during the copying process; and when it is monitored that the data length of the copied data exceeds the data length of the memory data to be transmitted sent by the source end, sends a second notification message to the source end; The source end stops data copying according to the second notification message.
20. A memory data transmission method, characterized in that: include: The source-end FPGA receives a source address configured by the first source-end driver, wherein the source address is a virtual address of a virtual machine memory of memory data to be transmitted in a source-end virtual machine; When the destination address of the memory data to be transmitted in the destination virtual machine is configured to the destination FPGA, the source FPGA communicates with the destination FPGA to directly copy the memory data from the source address to the destination address, wherein the destination address is the virtual address of the virtual machine memory of the memory data to be transmitted in the destination virtual machine.
21. The method according to claim 20, characterized in that The source FPGA communicates with the destination FPGA, and directly copies the memory data from the source address to the destination address, including: The source-end FPGA compresses the memory data copied from the source address to obtain compressed data, which is used by the destination-end FPGA to decompress the compressed data and store it in the destination address.
22. The method according to claim 20 or 21, characterized in that In the case where the data channel between the source FPGA and the destination FPGA is an Ethernet channel, the source FPGA communicates with the destination FPGA, and directly copying the memory data from the source address to the destination address includes: The source-end FPGA fills the memory data from the source address into the source-end buffer based on the driving of the second source-end driver; The source-end FPGA retrieves the memory data from the source-end buffer and sends it to the destination-end buffer via the Ethernet network card, so that the destination-end FPGA retrieves the memory data from the destination-end buffer based on the driver of the destination-end second driver and stores the retrieved memory data into the destination address.
23. A memory data transmission method, characterized in that: include: The destination FPGA receives a destination address configured by the destination first driver, wherein the destination address is a virtual address of a virtual machine memory of memory data to be transmitted in the destination virtual machine, and the destination address is obtained by converting a source address, and the source address is a virtual address of a virtual machine memory of the memory data to be transmitted in the source virtual machine, and the source address is configured in the source FPGA by the source first driver; The destination FPGA communicates with the source FPGA to directly copy the memory data from the source address to the destination address.
24. The method according to claim 23, characterized in that In the case where the data channel between the source FPGA and the destination FPGA is an Ethernet channel, the destination FPGA communicates with the source FPGA, and directly copying the memory data from the source address to the destination address includes: The destination FPGA receives the memory data taken out from the source buffer and sent through the Ethernet network card, and stores it in the destination buffer, wherein the memory data is filled into the source buffer from the source address by the driver of the second driver of the source end; The destination FPGA retrieves the memory data from the destination buffer through the driver of the destination second driver, and stores the retrieved memory data into the destination address.
25. A source server, characterized in that: include: A configuration module, configured to configure a source address to a source-end FPGA through a first source-end driver, wherein the source address is a virtual address of a virtual machine memory of memory data to be transmitted in a source-end virtual machine; A sending module, used to send the source address to a destination end, for the destination end to determine the destination address of the memory data to be transmitted in the destination end virtual machine through a first driver of the destination end, and configure the destination address to the destination end FPGA, wherein the destination address is a virtual address of the virtual machine memory of the memory data to be transmitted in the destination end virtual machine; The first copy module is used to directly copy the memory data from the source address to the destination address through the source end FPGA and the destination end FPGA.
26. A destination server, characterized in that: include: A first receiving module, configured to receive a source address sent by a source end, wherein the source address is a virtual address of a virtual machine memory of memory data to be transmitted in a virtual machine at the source end, and the source address is configured in the source end FPGA through a first driver at the source end; A conversion module, used to convert the source address into a destination address through a first driver at the destination end, and configure the destination address to the destination end FPGA, wherein the destination address is a virtual address of a virtual machine memory of the memory data to be transmitted in the destination end virtual machine; The second copy module is used to directly copy the memory data from the source address to the destination address through the source end FPGA and the destination end FPGA.
27. A memory data transmission system, characterized in that: include: A source end and a destination end, wherein the source end is configured with a source end FPGA, and the destination end is configured with a destination end FPGA, The source end is used to configure a source address to the source end FPGA through a first source end driver, and send the source address to the destination end, wherein the source address is a virtual address of a virtual machine memory of memory data to be transmitted in a source end virtual machine; The destination end is used to convert the source address into a destination address through a first destination end driver, and configure the destination address to the destination end FPGA, wherein the destination address is a virtual address of the memory data to be transmitted in the virtual machine of the destination end; The source end is also used to initiate data copying to the destination end, and directly copy the memory data from the source address to the destination address through the source end FPGA and the destination end FPGA.
28. A memory data transmission device, characterized in that: include: A second receiving module, configured for the source-end FPGA to receive a source address of the first driver configuration of the source-end, wherein the source address is a virtual address of a virtual machine memory of memory data to be transmitted in a source-end virtual machine; The third copy module is used to communicate with the destination FPGA when the destination address of the memory data to be transmitted in the destination virtual machine is configured to the destination FPGA, and directly copy the memory data from the source address to the destination address, wherein the destination address is the virtual address of the virtual machine memory of the memory data to be transmitted in the destination virtual machine.
29. A memory data transmission device, characterized in that: include: A third receiving module is used for the destination FPGA to receive the destination address configured by the first driver of the destination end, wherein the destination address is the virtual address of the virtual machine memory of the memory data to be transmitted in the destination virtual machine, and the destination address is obtained by converting the source address, and the source address is the virtual address of the virtual machine memory of the memory data to be transmitted in the source virtual machine, and the source address is configured in the source FPGA through the first driver of the source end; The fourth copy module is used for the destination FPGA to communicate with the source FPGA, and directly copies the memory data from the source address to the destination address.
30. A storage medium, characterized in that: The storage medium includes a stored program, wherein when the program is running, the device where the storage medium is located is controlled to execute the memory data transmission method described in any one of claims 1 to 24.
