User-mode paravirtualized data path acceleration method, device, cluster, and medium
By creating a user-space paravirtualized data path acceleration device in the data plane development kit and using post-domain socket channels, the problem of IO interruption when the application crashes or is upgraded is solved, and the communication between the virtual machine and the data processing device is realized. Highly reliable communication improves user experience.
Patent Information
- Application Number
- CN202410758966.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-13
- Publication Date
- 2024-09-20
- Estimated Expiration
- 2044-06-13
AI Technical Summary
When the application crashes or is upgraded in the data plane development kit, the virtual machine senses IO interruption, resulting in poor user experience.
By creating user-space paravirtualized data path acceleration devices in the data plane development kit and using back-domain socket channels to send file description information to the monitor, ensure that the monitor remains referenced and avoids IO when the application crashes or is upgraded. Interrupt.
It realizes that IO interruption is not detected when the data plane development kit crashes or is upgraded, which improves the reliability and user experience of the virtual machine and ensures that the communication between the virtual machine and the data processing equipment is not interrupted.
Smart Images

Figure CN118331687B
Abstract
Description
Technical Field
[0001] The present application relates to the field of computers, and in particular to a user-mode semi-virtualized data path acceleration method, device, cluster, and medium. Background Art
[0002] Virtio Data Path Acceleration (vDPA) is a data path acceleration technology used in virtualized environments to improve the performance and efficiency of virtual machines' access to the host's physical devices. By abstracting the data path acceleration function from the host's physical devices and making them devices directly accessible to the virtual machines, vDPA reduces the communication overhead between the virtual machines and the host's physical devices and improves the efficiency and performance of data transmission.
[0003] Paravirtualized data path acceleration is a hardware offload solution with the control plane based on the virtual host (vhost) protocol and the data plane based on the virtual input and output (virtio) protocol. The virtual host protocol is a protocol used in a virtualized environment to improve the performance and efficiency of virtual machines' access to the host's physical devices. Specifically, the virtual host protocol allows virtual machines to communicate directly with the host's physical devices, bypassing the packet processing of virtualization software (such as the hypervisor), thereby reducing data transmission latency and improving network performance. The virtual input and output (virtio) protocol defines a set of virtual device specifications that enable efficient data transmission between virtual machines and the host's physical devices. By using the virtual input and output protocol, virtual machines can communicate directly with the host's physical devices without going through an additional intermediate layer, thereby improving the performance and efficiency of virtual machines. Therefore, the emergence of paravirtualized data path acceleration technology allows virtual machines to pass-throuth to physical devices, while using virtual host technology to support hot migration of virtual machines.
[0004] Paravirtualized data path acceleration may include user-mode paravirtualized data path acceleration. User-mode paravirtualized data path acceleration may be developed based on the Data Plane Development Kit (DPDK), using the vhost-user protocol to interact with the simulator (e.g., qemu) to complete control plane negotiation of virtual input and output. The DPDK is a user-mode driver that is easy to develop, debug, and upgrade, so it has more users than kernel-mode paravirtualized data path acceleration.
[0005] However, when an application in the data plane development kit crashes or is upgraded, the virtual machine will sense the input / output (IO) interruption, resulting in a poor user experience. Summary of the invention
[0006] The present application provides a user-mode paravirtualized data path acceleration method, device, cluster, and medium, which can prevent IO interruption from being perceived when an application in a data plane development kit crashes or is upgraded.
[0007] In a first aspect, a user-state paravirtualized data path acceleration method is provided, which is applied to a user-state paravirtualized data path acceleration system, wherein the user-state paravirtualized data path acceleration system comprises: a data processing device and a host machine, wherein the data processing device is used to connect to the host machine through a peripheral component interconnection extension; the host machine is used to run one or more virtual machines and provide user-state paravirtualized data path acceleration for the virtual machines to access the data processing device, wherein the user-state paravirtualized data path acceleration comprises data plane direct communication based on a virtual input and output protocol and control plane negotiation based on a virtual host protocol between the virtual machine and the data processing device, the host machine comprises: a data plane development kit and a data plane development kit monitor, and the method comprises:
[0008] Creating a first user-state paravirtualized data path acceleration device in the data plane development kit, wherein the first user-state paravirtualized data path acceleration device has first file description information;
[0009] creating a back-domain socket channel between the data plane development kit and the data plane development kit monitor;
[0010] Sending the first file description information to the data plane development kit monitor through the back-end socket channel for reference;
[0011] When the data plane development kit crashes, the data plane development kit monitor maintains a reference to the file description information.
[0012] In some possible designs, the method further includes:
[0013] Creating a second user-state paravirtualized data path acceleration device in the data plane development kit, wherein the second user-state paravirtualized data path acceleration device has second file description information;
[0014] Sending the first file description information to the data plane development kit monitor through the back-end socket channel for reference includes:
[0015] The first file description information and the second file description information are sent to the data plane development kit monitor through the back-domain socket channel for reference, wherein the value of the first file descriptor is different from the value of the second file descriptor.
[0016] In some possible designs, the host machine further includes an emulator, wherein the emulator is used to run the virtual machine, a virtual input and output driver is provided in the virtual machine, the data plane development kit includes a paravirtualized data path acceleration driver, the paravirtualized data path acceleration driver includes a first paravirtualized data path acceleration driver and a second paravirtualized data path acceleration driver, the first paravirtualized data path acceleration driver corresponds to the first user-state paravirtualized data path acceleration device, the second paravirtualized data path acceleration driver corresponds to the second user-state paravirtualized data path acceleration device, and the method further includes:
[0017] Creating a first front-domain socket channel corresponding to the first user-state paravirtualized data path acceleration device between the virtual machine of the simulator and the first user-state paravirtualized data path acceleration driver of the data plane development kit, wherein the first front-domain socket channel is used to implement communication between the virtual machine and the first user-state paravirtualized data path acceleration driver;
[0018] A second front-domain socket channel corresponding to the second user-state paravirtualized data path acceleration device is created between the simulator and the second user-state paravirtualized data path acceleration driver of the data plane development kit, wherein the second front-domain socket channel is used to implement communication between the virtual machine and the second user-state paravirtualized data path acceleration driver.
[0019] In some possible designs, the data processing device is used to provide one or more peripheral component interconnect expansion devices, the host machine also includes a virtual function input output-peripheral component interconnect, and the control plane negotiation based on the virtual host protocol between the virtual machine and the data processing device is achieved through mutual negotiation between the virtual input output driver, the paravirtualized data path acceleration driver, the virtual function input output-peripheral component interconnect and the peripheral component interconnect expansion device.
[0020] In some possible designs, the data plane development kit includes a first container and a second container, the first container includes a first group, the second container includes a second group, the first user-state semi-virtualized data path acceleration device is set in the first group, and the second user-state semi-virtualized data path acceleration device is set in the second group.
[0021] In some possible designs, the first file description information is used to indicate one or more of the first container, the first group, and the first user-mode paravirtualized data path acceleration device.
[0022] In some possible designs, the data plane development kit monitor is used to restart the data plane development kit monitor through a system service after the data plane development kit monitor crashes.
[0023] In some possible designs, communication between the virtual machine and the data processing device will not be interrupted if at least one of the data plane development kit and the data plane development kit monitor does not crash.
[0024] In some possible designs, the method further includes:
[0025] The data plane development kit is deleted, and a new data plane development kit is installed again to upgrade the data plane development kit.
[0026] In a second aspect, a computer device is provided, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the method according to any one of the first aspects when executing the computer program.
[0027] According to a third aspect, a computer device cluster is provided, the computer device cluster comprising a plurality of computer devices, wherein one of the computer devices comprises a memory, a processor and a computer program stored in the memory and executable on the processor, and the processor implements the method according to any one of the first aspects when executing the computer program.
[0028] According to a fourth aspect, a computer-readable storage medium is provided, wherein the computer-readable storage medium stores computer instructions, and when the computer instructions are executed on a computer device, the computer device executes the method according to any one of the first aspects. BRIEF DESCRIPTION OF THE DRAWINGS
[0029] In order to more clearly illustrate the technical solutions in the embodiments of the present invention or the background technology, the drawings required for use in the embodiments of the present invention or the background technology will be described below.
[0030] Figure 1 It is a structural diagram of a user-mode paravirtualized data path acceleration system provided by the present application;
[0031] Figure 2 It is a hardware structure diagram of a processor provided by this application;
[0032] Figure 3 It is a flowchart of a file descriptor synchronization method provided by the present application;
[0033] Figure 4 It is a structural schematic diagram of a computing device provided by this application. DETAILED DESCRIPTION
[0034] The embodiments of the present invention are described below in conjunction with the accompanying drawings in the embodiments of the present invention. The terms used in the implementation mode of the present invention are only used to explain the specific embodiments of the present invention, and are not intended to limit the present invention.
[0035] See also Figure 1 , Figure 1 Schematic diagram of a user-mode semi-virtualized data path acceleration system provided by the present application. Figure 1 As shown, the user-mode paravirtualized data path acceleration system of the present application may include a host machine 110 and a data processing device 120 .
[0036] The host machine 110 can be described in detail from two aspects: hardware structure and software structure.
[0037] In terms of hardware structure, the host machine 110 includes a first processor 210 and a memory 220. The first processor 210 is connected to the memory 220 via a double data rate (DDR) bus 230. Here, different memories 220 may use different data buses to communicate with the first processor 210, so the double data rate bus 230 may also be replaced by other types of data buses, and the embodiment of the present application does not limit the bus type.
[0038] The first processor 210 is the computing core and control core of the host machine 110. The first processor 210 may include one or more cores 211. The first processor 210 may be a very large scale integrated circuit. An operating system and other software programs are installed in the first processor 210, so that the first processor 210 can access the memory 220. It is understandable that in the embodiment of the present invention, the core 211 in the first processor 210 may be, for example, a central processing unit (CPU) or other specific integrated circuits (ASIC). The first processor 210 may also be other general-purpose processors, digital signal processors (DSP), application specific integrated circuits (ASIC), field programmable gate arrays (FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components, etc. Figure 2 Only one first processor 210 is taken as an example. In actual applications, the host machine 110 may also include multiple first processors 210.
[0039] The memory 220 is the main memory of the host machine 110. The memory 220 is usually used to store various running software in the operating system, input and output data, and information exchanged with external memory. In order to improve the access speed of the first processor 210, the memory 220 needs to have the advantage of fast access speed. In the traditional computer system architecture, dynamic random access memory (DRAM) is usually used as the memory 220. The first processor 210 can access the memory 220 at high speed through the memory controller, and perform read and write operations on any storage unit in the memory 220. In addition to the dynamic random access memory, the memory 220 can also be other random access memories, such as static random access memory (SRAM). In addition, the memory 220 can also be a read-only memory (ROM). As for the read-only memory, for example, it can be a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), etc. This embodiment does not limit the number and type of memory 220. In addition, the memory 220 can be configured to have a power-saving function. The power-saving function means that when the system loses power and then powers on again, the data stored in the memory will not be lost. The memory 220 with the power-saving function is called a non-volatile memory.
[0040] In addition, the host machine 110 may also include a baseboard management controller (Baseboard Management Controller, BMC) 240. The baseboard management controller 240 can upgrade the firmware of the device, manage the operating status of the device, and troubleshoot the faults. The first processor 210 can access the baseboard management controller 240 through a PCIe bus or a bus such as USB, I2C, etc. The baseboard management controller 240 can also be connected to at least one sensor. The status data of the computer device is obtained through the sensor, wherein the status data includes: temperature data, current data, voltage data, etc. The type of status data is not specifically limited in this application. The baseboard management controller 240 communicates with the first processor 210 through a peripheral component interconnection extension (Peripheral Component Interconnect Express, PCIe) bus or other types of buses, for example, the acquired status data is passed to the first processor 210 for processing. The baseboard management controller 240 can also control the power circuit or clock circuit in the host machine 110. In short, the baseboard management controller 240 can manage the host machine 110 in the above manner. However, the baseboard management controller 240 is only an optional device. In some implementations, the first processor 210 may communicate directly with the sensor to directly manage and maintain the computer device. Figure 2 Only some components of the processor are exemplified. In practical applications, the components of the processor may include more components, which are not specifically limited here.
[0041] From a software perspective, the host machine 110 may include a simulator 111 , a data plane development kit 112 , and a virtual function input output-peripheral component interconnect (vfio-pci) 113 .
[0042] The simulator 111 may be a Quick EMUlator (QEMU). QEMU may be used as a virtual machine monitor, allowing multiple virtual machines to be run simultaneously on a physical host. These virtual machines may run different operating systems, such as Linux, Windows, etc. QEMU implements isolation and management of virtual machines through virtualization technology, allowing users to implement multiple virtual environments on a single physical host.
[0043] One or more virtual machines (VMs) 115 may run in the simulator 111. A virtual machine 115 is a complete computer system simulated in software, which can simulate a hardware platform and run operating systems and applications on it. A virtual machine enables multiple operating systems to run simultaneously on a physical machine, with each operating system operating in its own virtual machine environment, isolated from each other, but sharing the resources of the physical machine (such as CPU, memory, hard disk space, and I / O devices).
[0044] A virtual input / output driver (virtio driver) 116 may be run in the virtual machine 115. The virtual input / output driver 116 is a driver for communicating with virtual devices in a virtualized environment. In a virtualized environment, a virtual machine (VM) needs to communicate with a virtualized host machine in order to access network, storage, and other devices. In order to achieve such communication, a virtual device and a corresponding device driver are usually required. The virtual input / output driver is a general driver provided for virtual devices, which can establish an efficient communication channel between the virtual machine and the host.
[0045] Data Plane Development Kit 112 is an open source data plane development toolkit designed to help network applications achieve high-performance packet processing on general-purpose processors. It provides a set of optimized user-mode network libraries and drivers that can maximize the performance of modern multi-core processors, thereby achieving high-throughput and low-latency packet processing in areas such as software-defined networking (SDN) and network function virtualization (NFV).
[0046] The paravirtualized data path acceleration driver 117 is a device driver for supporting paravirtualized data path acceleration technology. The role of the paravirtualized data path acceleration driver is to allow virtual machines or containers in a virtualized environment to directly access hardware devices that support paravirtualized data path acceleration technology and utilize the network acceleration functions provided by them. These drivers are usually provided by hardware vendors or open source communities and are compatible with common virtualization platforms (such as KVM, Xen, and VMware). Paravirtualized data path acceleration technology aims to improve network performance in a virtualized environment by transferring the processing tasks of data packets from the software stack in the virtual machine or container to dedicated hardware devices (such as network cards). This technology can reduce the CPU load in a virtualized environment, reduce the latency of packet processing, and improve network throughput.
[0047] The virtual function input output-peripheral component interconnect 113 is used to implement the virtualization of devices and directly assign them to virtual machines for use. It is part of the virtual function input / output (Virtual Function I / O, VFIO) framework, which allows user space applications to directly control devices, thereby providing lower virtualization overhead and better performance. The virtual function input output-peripheral component interconnect allows users to assign physical devices (usually PCI devices) directly to virtual machines, which means that the virtual machine can fully access the functions of the device without going through the host operating system. Using the virtual function input output-peripheral component interconnect, users can tell the VFIO framework which devices to assign to the virtual machine by configuring the corresponding device identifiers. Then, QEMU maps the device to the address space of the virtual machine so that the virtual machine can directly access the device. This direct access method generally provides better performance and functional support than traditional virtualization methods (such as through virtualized device emulators).
[0048] The data processing device 120 may include a network card (Network Interface Card) and a data processing unit (Data Processing Unit, DPU). Among them, the network card, also known as a network adapter or network interface controller, is a computer hardware device used to connect a computer to a local area network (LAN) or a wide area network (WAN). The network card is responsible for data transmission between the computer and the network, and provides physical connection and data communication functions between the computer and the network. Network cards are usually installed on the motherboard of the host computer, or connected to the computer through an external interface (such as USB, PCIe). They have one or more network interfaces (usually Ethernet ports) for plugging in network cables (such as Ethernet cables). DPU is the abbreviation of data processing unit, which is a dedicated hardware accelerator designed to handle data-intensive tasks in data centers. DPU is usually used with general-purpose processors such as CPUs, GPUs, and FPGAs to accelerate the processing of data center workloads.
[0049] One or more peripheral component interconnect expansion devices 121 may be provided in the data processing device 120. The peripheral component interconnect expansion device 121 is an external device or component connected to the PCIe bus. PCIe is a high-speed serial expansion bus standard used to connect various peripheral devices inside a computer, such as a graphics card, a network card, a storage controller, a sound card, etc. A PCIe device is connected to the host computer 110 via a PCIe slot or a slot integrated in the host computer 110. The peripheral component interconnect expansion device 121 may be a device simulated by the network card data processing device 120.
[0050] Here, the paravirtualized data path acceleration driver 117 and the simulator 111 can communicate through a domain socket of a virtual host-user protocol, for example, a Unix domain socket (Unit Domain Socket, UDS) channel. Among them, the UDS channel is a mechanism for inter-process communication on the same computer. Unlike traditional network sockets, Unix domain sockets do not involve a network protocol stack, but directly create a special type of file in the file system of the operating system, through which processes can communicate. Unix domain sockets usually exist in the file system in the form of a file path, for example, / tmp / my_socket. A process can create, connect, send and receive data by calling system functions, just like operating a network socket. Because there is no overhead of the network protocol stack, Unix domain sockets usually have higher performance and lower latency than network sockets. Among them, the number of UDS channels between the simulator 111 and the data plane development kit 112 and the number of paravirtualized data path acceleration devices in the data plane development kit 112 are the same. For example, assuming that there are two paravirtualized data path acceleration devices in the data plane development kit 112, a first user state paravirtualized data path acceleration device and a second user state paravirtualized data path acceleration device, then the number of domain socket channels between the simulator 111 and the data plane development kit 112 can be two, a first domain socket channel and a second domain socket channel. The first domain socket channel corresponds to the first user state paravirtualized data path acceleration device, and the second domain socket channel corresponds to the second user state paravirtualized data path acceleration device.
[0051] The data plane development kit monitor 118 may be a lightweight application, and the data plane development kit monitor 118 and the data plane development kit 112 may be managed by a system (systemd) service. The system service may be used for operations such as start, stop, restart, and status check. In other words, in the event that the data plane development kit 112 and the data plane development kit monitor 118 crash, the data plane development kit 112 and the data plane development kit monitor 118 may be restarted by the system (systemd) service.
[0052] exist Figure 1 Based on the user-mode paravirtualized data path acceleration system shown in FIG. Figure 3 As shown, the present application provides a flowchart of a file descriptor (FD) synchronization method. Figure 3 As shown, the FD synchronization method of the present application includes the following steps:
[0053] S101: Create a first user-mode paravirtualized data path acceleration device in a data plane development kit.
[0054] In a specific implementation, the first user-mode paravirtualized data path acceleration device may be created in the following manner:
[0055] (1) Loading Virtual Function Input Output Peripheral Component Interconnect. First, you can use the modprobe command to load the Virtual Function Input Output Peripheral Component Interconnect driver. For example, the protocol uses the following command modprobe vfio-pci to load the Virtual Function Input Output Peripheral Component Interconnect.
[0056] (2) Binding the first user-state paravirtualized data path acceleration device to the virtual function input output-peripheral component interconnect: Binding the first user-state paravirtualized data path acceleration device to the virtual function input output-peripheral component interconnect may be implemented by adding the PCI address of the first user-state paravirtualized data path acceleration device to the binding list of the virtual function input output-peripheral component interconnect. The implementation method may include any one of the following:
[0057] (a) Use the echo command to write the PCI address of the first user-mode paravirtualized data path acceleration device into the / sys / bus / pci / drivers / vfio-pci / bind file.
[0058] (b) Use the --bind parameter in the dpdk-devbind.py tool to bind the first user-mode paravirtualized data path acceleration device to the virtual function IO-Peripheral Component Interconnect.
[0059] (3) Creating a first container. The container is used to manage the paravirtualized data path acceleration device. For example, when there are multiple paravirtualized data path acceleration devices, some of the paravirtualized data path acceleration devices can be set in the first container, and the other paravirtualized data path acceleration devices can be set in the second container. Continuing with the above example, the first user-mode paravirtualized data path acceleration device can be set in the first container, so it is necessary to create the first container.
[0060] (4) Creating a first group of the first container. The paravirtualized data path acceleration devices in the container are usually organized into one or more groups. A group is a logical entity used to centrally manage a group of related paravirtualized data path acceleration devices. In the data plane development kit application, one or more groups can be created as needed. For example, a part of the paravirtualized data path acceleration devices in the first container are set in the first group, and another part of the paravirtualized data path acceleration devices in the first container are set in the second group. Continuing with the above example, the first user-mode paravirtualized data path acceleration device can be set in the first group of the first container.
[0061] (5) Creating a first user-mode paravirtualized data path acceleration device. After the container and the group are created, a first user-mode paravirtualized data path acceleration device can be created in the first container and the first group.
[0062] S102: Create a first front-domain socket channel corresponding to a first user-mode paravirtualized data path acceleration device between the data plane development kit and the simulator.
[0063] The first domain socket channel is the domain socket channel for communication between the data plane development kit and the simulator. The domain socket channel is a mechanism for inter-process communication on the same computer. Unlike traditional network sockets, Unix domain sockets do not involve the network protocol stack, but directly create a special type of file in the file system of the operating system, through which processes can communicate. Unix domain sockets usually exist in the file system in the form of file paths, for example, / tmp / my_socket. Processes can create, connect, send and receive data by calling system functions, just like operating network sockets. Because there is no overhead involved in the network protocol stack, Unix domain sockets usually have higher performance and lower latency than network sockets. First, you need to create a Unix domain socket in the file system. A Unix domain socket is actually a file, so it can be created using a system call similar to the socket() system call (in C language) or the corresponding library function (in high-level languages). When creating a socket, you need to specify the communication protocol as AF_Unix.
[0064] The process of creating a first front-domain socket channel corresponding to the first user-mode paravirtualized data path acceleration device between the data plane development kit and the simulator is as follows:
[0065] (1) Create the first socket file. First, you need to determine the location and name of the first socket file. The first socket file usually exists in the form of a file system path and can be created anywhere in the file system.
[0066] (2) Bind the first socket. After creating the first socket, it needs to be bound to a specific file path. This is done through the bind() system call, specifying the path of the first socket file. If successful, the first socket will be associated with the specified file path.
[0067] (3) Communicate. Once the connection is established or the first socket is ready for communication, data can be sent and received through the first socket.
[0068] S103: Create a second user-mode paravirtualized data path acceleration device in the data plane development kit.
[0069] In a specific implementation, the second user-mode paravirtualized data path acceleration device may be created in the following manner:
[0070] (1) Binding the second user-state paravirtualized data path acceleration device to the virtual function input output-peripheral component interconnect driver: Binding the second user-state paravirtualized data path acceleration device to the virtual function input output-peripheral component interconnect driver may be implemented by adding the PCI address of the second user-state paravirtualized data path acceleration device to the binding list of the virtual function input output-peripheral component interconnect. The implementation method may include any one of the following:
[0071] (a) Use the echo command to write the PCI address of the second user-mode paravirtualized data path acceleration device into the / sys / bus / pci / drivers / vfio-pci / bind file.
[0072] (b) Use the --bind parameter in the dpdk-devbind.py tool to bind the second user-mode paravirtualized data path acceleration device to the virtual function IO-Peripheral Component Interconnect.
[0073] (2) Creating a second container. Continuing with the above example, the second user-mode paravirtualized data path acceleration device can be set in the second container, so it is necessary to create a second container.
[0074] (3) Creating a first group of the second container. Continuing with the above example, the second user-mode paravirtualized data path acceleration device can be set in the first group of the second container.
[0075] (4) Creating a second user-state paravirtualized data path acceleration device. After the container and the group are created, a second user-state paravirtualized data path acceleration device can be created in the first group of the second container.
[0076] S104: Create a second front-domain socket channel corresponding to the second user-mode paravirtualized data path acceleration device between the data plane development kit and the simulator.
[0077] The second front-domain socket channel is a domain socket channel for communication between the data plane development kit and the simulator.
[0078] The process of creating a second front-domain socket channel corresponding to the second user-mode paravirtualized data path acceleration device between the data plane development kit and the simulator is as follows:
[0079] (1) Create the second socket file. First, you need to determine the location and name of the second socket file. The second socket file usually exists in the form of a file system path and can be created anywhere in the file system.
[0080] (2) Bind the second socket. After creating the second socket, it needs to be bound to a specific file path. This is done through the bind() system call, specifying the path of the second socket file. If successful, the second socket will be associated with the specified file path.
[0081] (3) Communicate. Once the connection is established or the second socket is ready for communication, data can be sent and received through the second socket.
[0082] S105: Create a back-domain socket channel between the data plane development kit and the data plane development kit monitor.
[0083] The back domain socket channel is the domain socket channel for communication between the Data Plane Development Kit and the Data Plane Development Kit Monitor.
[0084] S106: The data plane development kit obtains the first file description information and the second file description information.
[0085] The first file description information may be a file descriptor (FD), etc. The first file description information may be an integer value used to identify resources related to the first user-mode paravirtualized data path acceleration device, such as a container, a group, a paravirtualized data path acceleration device, etc. The value range of FD is usually a non-negative integer starting from 0, where when the value of the file descriptor is 0, it can be called standard input (stdin), when the value of the file descriptor is 1, it can be called standard output (stdout), and when the value of the file descriptor is 2, it can be called standard error (stderr). File descriptors are used to perform various operations, including reading, writing, and closing files. For example, through file descriptors, system calls (such as read, write, close) can be used to interact with files, or network sockets can be used for network communication.
[0086] The second file description information may be a file descriptor (FD), etc. The second file description information may be an integer value, used to identify resources related to the second user-mode paravirtualized data path acceleration device, such as a container, a group, a paravirtualized data path acceleration device, etc.
[0087] S107: The data plane development kit sends the first file description information and the second file description information to the data plane development kit monitor for reference through the back-domain socket channel.
[0088] Understandably, Figure 3 The FD synchronization method shown is only described with two paravirtualized data path acceleration devices. In actual applications, the number of paravirtualized data path acceleration devices may be one or more, which is not specifically limited here.
[0089] By the above method, when the data plane development kit crashes, as long as the data plane development kit monitor is still there, the first file descriptor and the second file descriptor are still referenced by the process, and the simulator 111 will not detect that the socket communication between the paravirtualized data path acceleration driver 117 and the simulator 111 is disconnected, and the mapping relationship of the virtual function input and output-dma remap maintained by the peripheral component interconnection will not be released, so there will be no IO interruption between the virtual machine 115 and the peripheral component interconnection expansion device 121. Then, it is only necessary to wait for the data plane development kit to restart. As long as the data plane development kit and the monitor do not crash at the same time, the virtual machine will not be affected. Moreover, the function implemented by the data plane development kit monitor is simple and single, and the probability of the data plane development kit monitor crashing is almost 0, so the probability of the data plane development kit and the data plane development kit monitor crashing at the same time is even lower. Therefore, the above scheme realizes the high reliability of the paravirtualized data path acceleration driver. When the data plane development kit is upgraded, the old application can be directly uninstalled, and then the new application can be reinstalled. There is no need to migrate the virtual machine before upgrading the data plane development kit.
[0090] Figure 4 4 is a schematic diagram of the structure of a computing device provided in an embodiment of the present application, and the computing device 400 includes: one or more second processors 410, a communication interface 420 and a memory 430. The second processor 410, the communication interface 420 and the memory 430 are interconnected via a bus 440. Optionally, the computing device 400 may also include an input / output interface 450, and the input / output interface 450 is connected to an input / output device for receiving parameters set by a user, etc. The computing device 400 can be used to implement some or all of the functions of the device embodiment or system embodiment in the above-mentioned embodiment of the present application; the second processor 410 can also be used to implement some or all of the operating steps of the method embodiment in the above-mentioned embodiment of the present application. For example, the specific implementation of the various operations performed by the computing device 400 can refer to the specific details in the above-mentioned embodiments, such as the second processor 410 is used to perform some or all of the steps in the above-mentioned method embodiment or some or all of the operations in the above-mentioned method embodiment. For another example, in an embodiment of the present application, the computing device 400 may be used to implement part or all of the functions of one or more components in the above-mentioned device embodiment. In addition, the communication interface 420 may be specifically used to perform the communication functions necessary to implement the functions of these devices and components, and the second processor 410 may be specifically used to perform the processing functions necessary to implement the functions of these devices and components.
[0091] It should be understood that Figure 4The computing device 400 may include one or more second processors 410, and the multiple second processors 410 may provide processing capabilities in a coordinated manner in a parallel connection manner, a serial connection manner, a serial-parallel connection manner, or any connection manner, or the multiple second processors 410 may constitute a processor sequence or a processor array, or the multiple second processors 410 may be divided into a main processor and an auxiliary processor, or the multiple second processors 410 may have different architectures such as a heterogeneous computing architecture. In addition, Figure 4 The computing device 400 shown in the figure, and the related structural description and functional description are exemplary and non-limiting. In some exemplary embodiments, the computing device 400 may include Figure 4 More or fewer components may be shown, or some components may be combined or separated, or may have a different arrangement of components.
[0092] The second processor 410 may have a variety of specific implementation forms, for example, the second processor 410 may include a central processing unit (CPU), a graphic processing unit (GPU), a neural-network processing unit (NPU), a tensor processing unit (TPU) or a data processing unit (DPU) and a combination thereof, which is not specifically limited in the embodiments of the present application. The second processor 410 may also be a single-core processor or a multi-core processor. The second processor 410 may be a combination of a CPU and a hardware chip. The above-mentioned hardware chip may be an application-specific integrated circuit (ASIC), a programmable logic device (PLD) or a combination thereof. The above-mentioned PLD may be a complex programmable logic device (CPLD), a field-programmable gate array (FPGA), a generic array logic (GAL) or any combination thereof. The second processor 410 may also be implemented using a logic device with built-in processing logic alone, such as an FPGA or a digital signal processor (DSP). The communication interface 420 may be a wired interface or a wireless interface for communicating with other modules or devices. The wired interface may be an Ethernet interface, a local interconnect network (LIN), etc., and the wireless interface may be a cellular network interface or a wireless local area network interface, etc.
[0093] The memory 430 may be a non-volatile memory, such as a read-only memory (ROM), a programmable ROM (PROM), an erasable PROM (EPROM), an electrically erasable programmable read-only memory (EEPROM), or a flash memory. The memory 430 may also be a volatile memory, which may be a random access memory (RAM) used as an external cache. By way of example but not limitation, many forms of RAM are available, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDR SDRAM), enhanced SDRAM (ESDRAM), synchronous link DRAM (SLDRAM), and direct rambus RAM (DR RAM). The memory 430 may also be used to store program codes and data, so that the second processor 410 calls the program codes stored in the memory 430 to execute part or all of the operation steps in the above method embodiment, or to execute the corresponding functions in the above device embodiment. Figure 4 Show more or fewer components, or have different component configurations.
[0094] The bus 440 may be a peripheral component interconnect express (PCIe) bus, an extended industry standard architecture (EISA) bus, a unified bus (Ubus or UB), a compute express link (CXL), a cache coherent interconnect for accelerators (CCIX), etc. The bus 440 may be divided into an address bus, a data bus, a control bus, etc. In addition to the data bus, the bus 440 may also include a power bus, a control bus, and a status signal bus, etc. However, for the sake of clarity, Figure 4 Only one thick line is used in the diagram, but this does not mean that there is only one bus or only one type of bus.
[0095] The present application also provides a computing device cluster, which may include multiple computing devices as described above, wherein the computing devices are described in Figure 4 and related descriptions.
[0096] The method and device provided in the embodiments of the present application are based on the same inventive concept. Since the principles of solving the problems in the methods and devices are similar, the embodiments, implementation methods, examples or implementation methods of the methods and devices can refer to each other, and the repeated parts will not be repeated. The embodiments of the present application also provide a system, which includes multiple computing devices, and the structure of each computing device can refer to the structure of the computing device described above. The functions or operations that can be implemented by the system can refer to the specific implementation steps in the above method embodiments and / or the specific functions described in the above device embodiments, which will not be repeated here.
[0097] The present application also provides a computer-readable storage medium, in which computer instructions are stored. When the computer instructions are executed on a computer device (such as one or more processors), the method steps in the above method embodiment can be implemented. The specific implementation of the processor of the computer-readable storage medium in executing the above method steps can refer to the specific operations described in the above method embodiment and / or the specific functions described in the above device embodiment, which will not be repeated here.
[0098] It should be understood by those skilled in the art that the embodiments of the present application may be provided as methods, systems, or computer program products. The present application may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. The embodiments of the present application may be implemented in whole or in part by software, hardware, firmware, or any other combination. When implemented using software, the above embodiments may be implemented in whole or in part in the form of a computer program product. The present application may take the form of a computer program product implemented on one or more computer-usable storage media containing computer-usable program codes. The computer program product includes one or more computer instructions. When the computer program instructions are loaded or executed on a computer, the process or function described in the embodiments of the present application is generated in whole or in part. The computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. Computer instructions may be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, computer instructions may be transmitted from one website, computer, server, or data center to another website, computer, server, or data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line) or wireless (e.g., infrared, wireless, microwave, etc.) means. Computer-readable storage media can be any available medium that can be accessed by a computer or a data storage device such as a server or data center that contains one or more available media. Available media can be magnetic media (such as floppy disks, hard disks, tapes), optical media, or semiconductor media. Semiconductor media can be solid-state hard disks, random access memory, flash memory, read-only memory, erasable programmable read-only memory, electrically erasable programmable read-only memory, registers, or any other form of suitable storage media.
[0099] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. Each process and / or block in the flowchart and / or block diagram, as well as the combination of the processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 These computer program instructions can also be stored in a computer-readable memory that can guide a computer or other programmable data processing device to work in a specific way, so that the instructions stored in the computer-readable memory produce a product including an instruction device, which implements the functions specified in the process. Figure 1A process or multiple processes and / or boxes Figure 1 These computer program instructions can also be loaded onto a computer or other programmable data processing device, so that a series of operation steps are executed on the computer or other programmable device to produce a computer-implemented process, so that the instructions executed on the computer or other programmable device provide for implementing the process in the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.
[0100] In the above embodiments, the descriptions of each embodiment have their own emphasis. For parts that are not described in detail in a certain embodiment, please refer to the relevant descriptions of other embodiments. Obviously, those skilled in the art can make various changes and modifications to the embodiments of the present application without departing from the spirit and scope of the embodiments of the present application. The steps in the method of the embodiment of the present application can be adjusted in order, merged or deleted according to actual needs; the modules in the system of the embodiment of the present application can be divided, merged or deleted according to actual needs. If these modifications and variations of the embodiments of the present application fall within the scope of the claims of the present application and their equivalent technologies, the present application is also intended to include these modifications and variations.
Claims
1. A user-mode paravirtualized data path acceleration method, characterized in that: The invention is applied to a user-state paravirtualized data path acceleration system, the user-state paravirtualized data path acceleration system comprising: a data processing device and a host machine, the data processing device being used to connect to the host machine through a peripheral component interconnection extension; the host machine being used to run one or more virtual machines and provide user-state paravirtualized data path acceleration for the virtual machines to access the data processing device, wherein the user-state paravirtualized data path acceleration comprises data plane direct communication based on a virtual input and output protocol and control plane negotiation based on a virtual host protocol between the virtual machine and the data processing device, the host machine comprising: a data plane development kit and a data plane development kit monitor, and the method comprising: Creating a first user-state paravirtualized data path acceleration device in the data plane development kit, wherein the first user-state paravirtualized data path acceleration device has first file description information, and the first file description information is an integer; creating a back-domain socket channel between the data plane development kit and the data plane development kit monitor; Sending the first file description information to the data plane development kit monitor through the back-end socket channel for reference; When the data plane development kit crashes, the data plane development kit monitor maintains a reference to the file description information; The method further comprises: Creating a second user-state paravirtualized data path acceleration device in the data plane development kit, wherein the second user-state paravirtualized data path acceleration device has second file description information; Sending the first file description information to the data plane development kit monitor through the back-end socket channel for reference includes: Sending the first file description information and the second file description information to the data plane development kit monitor through the back-domain socket channel for reference, wherein the value of the first file description information is different from the value of the second file description information; The data plane development kit includes a first container and a second container, the first container includes a first group, the second container includes a second group, the first user-state paravirtualized data path acceleration device is arranged in the first group, and the second user-state paravirtualized data path acceleration device is arranged in the second group; The first file description information is used to indicate one or more of the first container, the first group, and the first user-mode paravirtualized data path acceleration device; In the case that at least one of the data plane development kit and the data plane development kit monitor does not crash, the communication between the virtual machine and the data processing device will not be interrupted.
2. The method according to claim 1, characterized in that The host machine further includes an emulator, wherein the emulator is used to run the virtual machine, a virtual input and output driver is provided in the virtual machine, the data plane development kit includes a paravirtualized data path acceleration driver, the paravirtualized data path acceleration driver includes a first paravirtualized data path acceleration driver and a second paravirtualized data path acceleration driver, the first paravirtualized data path acceleration driver corresponds to the first user state paravirtualized data path acceleration device, the second paravirtualized data path acceleration driver corresponds to the second user state paravirtualized data path acceleration device, and the method further includes: Creating a first front-domain socket channel corresponding to the first user-state paravirtualized data path acceleration device between the virtual machine of the simulator and the first user-state paravirtualized data path acceleration driver of the data plane development kit, wherein the first front-domain socket channel is used to implement communication between the virtual machine and the first user-state paravirtualized data path acceleration driver; A second front-domain socket channel corresponding to the second user-state paravirtualized data path acceleration device is created between the simulator and the second user-state paravirtualized data path acceleration driver of the data plane development kit, wherein the second front-domain socket channel is used to implement communication between the virtual machine and the second user-state paravirtualized data path acceleration driver.
3. The method according to claim 2, characterized in that The data processing device is used to provide one or more peripheral component interconnection expansion devices, and the host machine also includes a virtual function input output-peripheral component interconnection. The control plane negotiation based on the virtual host protocol between the virtual machine and the data processing device is achieved through mutual negotiation between the virtual input output driver, the paravirtualized data path acceleration driver, the virtual function input output-peripheral component interconnection and the peripheral component interconnection expansion device.
4. The method according to any one of claims 1 to 3, characterized in that: The data plane development kit monitor is used to restart the data plane development kit monitor through a system service after the data plane development kit monitor crashes.
5. The method according to any one of claims 1 to 3, characterized in that: In the case that at least one of the data plane development kit and the data plane development kit monitor does not crash, the communication between the virtual machine and the data processing device will not be interrupted.
6. The method according to any one of claims 1 to 3, characterized in that: The method further comprises: The data plane development kit is deleted, and a new data plane development kit is installed again to upgrade the data plane development kit.
7. A computer device, characterized in that: The computer device comprises a memory, a processor, and a computer program stored in the memory and executable on the processor, and the processor implements the method according to any one of claims 1 to 6 when executing the computer program.
8. A computer equipment cluster, characterized in that: The computer device cluster includes a plurality of computer devices, one of which includes a memory, a processor, and a computer program stored in the memory and executable on the processor, and the processor implements the method according to any one of claims 1 to 6 when executing the computer program.
9. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer instructions, which, when executed on a computer device, cause the computer device to perform the method according to any one of claims 1 to 6.
Citation Information
Patent Citations
Virtual host machine user back-end upgrading method supporting virtualization hardware acceleration
CN116257276A
Vhost-user reconnection method and system based on proxy service
CN117640747A
Accelerating Networking by Multiplexing Driver Data Paths
US20240004679A1
System and method for configuring service appliances as virtual line cards in a network environment
US9246702B1
