Data processing method, apparatus, device and system
By defining a software and hardware operation framework structure with hardware resource sharing and business isolation in the data center, the problem of difficulty in achieving hardware resource sharing and business isolation in the existing technology is solved, and the operation cost of the data center is reduced.
Patent Information
- Application Number
- CN202010275614.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-04-09
- Publication Date
- 2025-06-13
- Estimated Expiration
- 2040-04-09
AI Technical Summary
The prior art is difficult to achieve hardware resource sharing and business isolation in data centers at the same time, resulting in high operating costs.
By defining a software and hardware operation framework structure with hardware resource sharing and business isolation in the data center, the virtual machine and task scheduler are used to achieve dynamic allocation and isolation of resources.
It realizes the sharing of hardware resources and isolation of services in the data center at the same time, reducing the overall operating costs of the data center.
Smart Images

Figure CN113312137B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of data processing, and in particular, to a data processing method, apparatus, device, and system. Background Art
[0002] Large Internet companies and cloud service providers operate a variety of large-scale services in the data center, such as AI (Artificial Intelligence), compression, database, multimedia, etc., to provide services for hundreds of millions of users. Since the above services require the use of a large amount of computing, storage, and network resources, the overall operating cost of the data center is very high. It is worth considering that in the above large-scale services, through hardware acceleration, the performance of some services can be improved several times or dozens of times, and the operating cost of the services and the overall operating cost of the data center can be greatly reduced.
[0003] However, using hardware acceleration in the data center requires solving two key problems: sharing and isolation. Among them, regarding the sharing problem, due to the widespread use of high-density designs in the data center, the hardware performance of individual servers and switches is very high. Most individual tenants do not use up the resources of a single server, and virtualization is generally used to share hardware resources to reduce costs. Shared resources are divided into three situations: 1) The hardware resources provide multiple functions, and different services use different functions, only sharing the hardware carrier; 2) Multiple services share the processing capabilities of one or more hardware functions; 3) A mixed scenario of the above two situations 1) and 2). Regarding the isolation situation, the isolation of services in the data center mainly includes two aspects: 1) Resource isolation, that is, different tenants purchase and allocate different resources, and the hardware needs to perform resource cutting to ensure that different tenants can allocate and enjoy the corresponding resources without being occupied and interfered by other users; 2) Security isolation, that is, when tenants share hardware resources, the data of different tenants is transmitted in the hardware, sharing storage and computing resources. The data security of tenants is a basic common requirement, and the management of access control policies for the entire process must be done well to ensure data security isolation between different services.
[0004] As can be seen from the above, the existing data centers do not provide a general software and hardware operation architecture, and it is difficult to achieve both hardware resource sharing and service isolation at the same time.
[0005] In response to the above problems, no effective solution has been proposed yet. Summary of the Invention
[0006] Embodiments of this application provide a data processing method, apparatus, device, and system to at least solve the technical problem that it is difficult for existing data centers to achieve both hardware resource sharing and service isolation at the same time.
[0007] According to one aspect of the embodiments of the present application, a data processing system is provided, including: a host computer running at least one virtual machine, where the virtual machine is configured with a corresponding virtual function in a computing device, and the virtual machine is used to send a task request to the corresponding virtual function, where at least the function required for the task in the virtual machine is included in the task request; the computing device includes a task scheduler, and the task scheduler receives the task request and determines whether the virtual function corresponding to the virtual machine allows the execution of the function required for the task; where, when the virtual function corresponding to the virtual machine allows the execution of the function required for the task, the task scheduler sends the task request to a computing unit for processing.
[0008] According to another aspect of the embodiments of the present application, a data processing method is further provided, including: a computing device receives a task request sent by a virtual machine, where the virtual machine is configured with a corresponding virtual function in the computing device, and at least the function required for the task in the virtual machine is included in the task request; the computing device determines whether the virtual function corresponding to the virtual machine allows the execution of the function required for the task; when the virtual function corresponding to the virtual machine allows the execution of the function required for the task, the computing device processes the task request through a computing unit.
[0009] According to another aspect of the embodiments of the present application, a data processing device is further provided, including: a receiving module for receiving a task request sent by a virtual machine, where the virtual machine is configured with a corresponding virtual function in the computing device, and at least the function required for the task in the virtual machine is included in the task request; a determining module for determining whether the virtual function corresponding to the virtual machine allows the execution of the function required for the task; a processing module for, when the virtual function corresponding to the virtual machine allows the execution of the function required for the task, processing the task request through a computing unit.
[0010] According to another aspect of the embodiments of the present application, a storage medium is further provided, where the storage medium includes a stored program, and when the program runs, it controls the device where the storage medium is located to execute any one of the above data processing methods.
[0011] According to another aspect of the embodiments of the present application, there is also provided a data processing device, including: a processor; and a memory connected to the above-mentioned processor for providing instructions for the above-mentioned processor to process the following processing steps: The computing device receives a task request sent by a virtual machine, where the virtual machine is configured with a corresponding virtual function in the computing device, and the task request at least includes the functions required for the task in the virtual machine; the computing device determines whether the virtual function corresponding to the virtual machine allows the execution of the functions required for the task; in the case where the virtual function corresponding to the virtual machine allows the execution of the functions required for the task, the computing device processes the task request through a computing unit.
[0012] In the embodiments of the present application, a task scheduler in the computing device receives a task request sent by a virtual machine. Among them, at least one of the above-mentioned virtual machines runs on a host computer communicating with the computing device. The virtual machine is configured with a corresponding virtual function in the computing device, and the task request at least includes the functions required for the task in the virtual machine; the task scheduler determines whether the virtual function corresponding to the virtual machine allows the execution of the functions required for the task; in the case where the virtual function corresponding to the virtual machine allows the execution of the functions required for the task, the task scheduler sends the task request to the computing unit for processing.
[0013] It is easy to notice that in the embodiments of the present application, by defining a software and hardware operation framework structure with hardware resource sharing and service isolation, when different virtual machines in the data center share hardware resources, corresponding resources can be allocated and enjoyed, and data security isolation between different services can be ensured.
[0014] Thus, the embodiments of the present application achieve the purpose of simultaneously realizing hardware resource sharing and service isolation for multiple services operating in the data center, thereby achieving the technical effect of reducing the overall operating cost of the data center by using hardware acceleration, and further solving the technical problem that it is difficult for the existing data center to simultaneously realize hardware resource sharing and service isolation. BRIEF DESCRIPTION OF THE DRAWINGS
[0015] The drawings described herein are used to provide a further understanding of the present application, and constitute a part of the present application. The illustrative embodiments of the present application and their descriptions are used to explain the present application, and do not constitute an improper limitation to the present application. In the drawings:
[0016] Figure 1 is a schematic structural diagram of a data processing system according to an embodiment of the present application;
[0017] Figure 2 is a schematic structural diagram of an optional data processing system according to an embodiment of the present application;
[0018] Figure 3 It is a hardware structure block diagram of a computer terminal (or mobile device) for implementing a data processing method according to an embodiment of the present application;
[0019] Figure 4 It is a flowchart of a data processing method according to an embodiment of the present application;
[0020] Figure 5 It is a flowchart of an alternative data processing method according to an embodiment of the present application;
[0021] Figure 6 It is a schematic structural diagram of a data processing device according to an embodiment of the present application;
[0022] Figure 7 It is a schematic structural diagram of a data processing device according to an embodiment of the present application;
[0023] Figure 8 It is a block diagram of another computer terminal according to an embodiment of the present application. Detailed implementation manners
[0024] In order to enable those skilled in the art to better understand the solution of the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present application. Obviously, the described embodiments are only a part of the embodiments of the present application, rather than all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative efforts shall fall within the protection scope of the present application.
[0025] It should be noted that the terms "first", "second", etc. in the specification and claims of the present application and the above-mentioned drawings are used to distinguish similar objects, and do not necessarily need to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged under appropriate circumstances so that the embodiments of the present application described here can be implemented in an order different from those illustrated or described here. In addition, the terms "include" and "have" and any variations thereof are intended to cover non-exclusive inclusion. For example, a process, method, system, product or device that includes a series of steps or units does not necessarily need to be limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or are inherent to these processes, methods, products or devices.
[0026] First, some nouns or terms that appear in the process of describing the embodiments of the present application are applicable to the following explanations:
[0027] CIDX (Consumption ID Pointer): Consumer ID pointer.
[0028] CPU (Central Processing Unit): One of the main devices of a computer, whose main function is to interpret computer instructions and process data in computer software.
[0029] CU (Compute Unit): The computing unit, which is used to execute the application APP tasks described by the task request ReqTD and generate computing results.
[0030] CUshell: The computing control module of the compute unit CU, which is used to control the storage resources accessible by the CU, the operation of tasks, fault isolation, and recovery.
[0031] DMA (Direct Memory Access): Direct Memory Access, which is a memory access technology in computer science. It allows certain hardware subsystems (computer peripherals) inside a computer to directly read and write system memory independently without the intervention of the central processing unit (CPU).
[0032] FPGA (Field Programmable Gate Array): Field Programmable Gate Array.
[0033] IOMMU (Input–output memory management unit): Input / Output Memory Management Unit, a memory management unit in the field of computers that connects an I / O bus with direct memory access capabilities (can DMA) to the main memory. Just as a traditional memory management unit converts virtual addresses visible to the CPU into physical addresses, the IOMMU maps virtual addresses visible to the device (such as device addresses or I / O addresses) to physical addresses. Some IOMMUs also provide memory protection functions to prevent faulty or malicious devices.
[0034] Mngt PF (Management Physical Function): Management Physical Function device, which is a physical function device provided by the SRIOV hardware virtualization mechanism defined by the PCIE protocol.
[0035] Ctrl path: The control path in a computing device, and the modules mounted on this control path can address and read / write each other.
[0036] Datapath: The data path of a computing device, and a large amount of data is transmitted between the modules mounted on this data path.
[0037] PCIE (Peripheral Component Interconnect Express): Peripheral Component Interconnect Express, a high-speed serial computer expansion bus standard.
[0038] PCIE EP (PCIE End Point): The endpoint device in the PCIE system.
[0039] PCIE RC (PCIE Root Complex): The root complex device. In the PCIe system, the RC device is responsible for connecting the processor and memory subsystem to the PCIe switch fabric composed of one or more switch devices.
[0040] DMA engine: The direct memory access engine, which is a hardware device in a computing device used to transfer data between the host memory and the computing device without the participation of the host's central processing unit CPU.
[0041] Host: The host system, which refers to the system that can run tenant applications.
[0042] VMM: The virtual machine monitor, which is used to monitor and manage the operation of the virtual machine VM and generate virtual functions VF with corresponding resource configurations according to the hardware resources purchased by the tenant.
[0043] APP: The tenant's application program.
[0044] VF device: The virtual function device, which is detected by the physical machine as a general PCIE device and is exclusively used by the virtual machine VM through the passthrough mechanism.
[0045] VF Driver: The software that drives the VF device, provides an API access interface to the APP, sends the requests of the APP to the device for execution, and returns the execution results to the APP.
[0046] Queue Pair: The data structure that drives the cache of the task requests sent by the APP and the hardware execution task results. In this model, it includes Req Q and Rsp Q. Among them, Req Q is the queue in the driver that caches the task requests sent by the APP, and Rsp Q is the queue in the driver that caches the hardware execution task results.
[0047] PF (Physical Function): The physical function, which is a PCI function used to support the SR-IOV function. As defined in the SR-IOV specification, the PF contains the SR-IOV function structure for managing the SR-IOV function. This PF is a full-function PCIe function and can be discovered, managed, and processed like any other PCIe device. The PF has fully configured resources and can be used to configure or control PCIe devices.
[0048] PIDX (Produce ID pointer): The producer ID pointer.
[0049] Queue: A queue for storing task request descriptors Req TD and task response descriptors Rsp TD.
[0050] Req TD (Request Task Descriptor): A task request, i.e., a task request descriptor, used to describe the request information of a task.
[0051] Rsp TD (Response Task Descriptor): A task response, i.e., a task response descriptor, used to describe the response information of a task, such as the error code of the task execution result, the length of the output data, the hardware time consumption of the task execution, etc.
[0052] SR-IOV (Single Root IO Virtualization): A hardware-based virtualization solution that can improve performance and scalability. The SR-IOV standard allows efficient sharing of PCIe devices between virtual machines, and it is implemented in hardware to obtain I / O performance comparable to that of the native machine.
[0053] TD (Task Descriptor): Refers to a task descriptor.
[0054] VF (Virtual Function): A virtual function, which is a function associated with a physical function. The virtual function is a lightweight PCIe function that can share one or more physical resources with the physical function and other VFs associated with the same physical function. A VF is only allowed to have configuration resources for its own behavior.
[0055] VM (Virtual Machine): A virtual machine refers to a complete computer system with full hardware system functions simulated by software and running in a completely isolated environment. The virtual machine environment for running tenant applications maps the hardware resources purchased by the tenant to the virtual machine VM through the virtual function VF.
[0056] VMM (Virtual Machine Monitor): A virtual machine monitor that includes end-to-end functions such as planning, deployment, management, and optimization of the virtual infrastructure.
[0057] Example 1
[0058] Before describing the further details of the embodiments of the present application, an embodiment of a data processing system that can be used to implement the principles of the present application will be described with reference to Figure 1 to describe an embodiment of a data processing system that can be used to implement the principles of the present application.
[0059] Figure 1It is a schematic structural diagram of a data processing system according to an embodiment of the present application. For the purpose of description, the drawn structure is only an example of a suitable environment and does not impose any limitations on the scope of use or functions of the present application. Nor should this data processing system be construed as having any dependence or requirement on any component or combination thereof shown in Figure 1 shown.
[0060] The system embodiment provided in Embodiment 1 of the present application can be widely applied to the Internet. By combining the business hardware acceleration requirements of multiple internets and clouds with the operation of the data center, the problems of hardware resource sharing and service isolation are solved.
[0061] As Figure 1 shown, the data processing system includes: a host computer 100 running at least one virtual machine 1001 ( Figure 1 only one is schematically drawn herein). The above virtual machine is configured with a corresponding virtual function in the computing device. The above virtual machine 1001 is used to send a task request to the corresponding virtual function, where at least the function required for the task in the virtual machine is included in the above task request; the above computing device 200 includes a task scheduler 2001, and the above task scheduler receives the above task request and determines whether the virtual function corresponding to the virtual machine allows the execution of the function required for the above task; where, in the case that the virtual function corresponding to the virtual machine allows the execution of the function required for the above task, the above task scheduler sends the above task request to the computing unit for processing.
[0062] In the embodiment of the present application, the above computing device can be deployed in a data center. The task scheduler in the computing device receives a task request sent by a virtual machine. Among them, at least one of the above virtual machines runs on a host computer communicating with the computing device. The above virtual machine is configured with a corresponding virtual function in the above computing device, and at least the function required for the task in the virtual machine is included in the above task request; the above task scheduler determines whether the virtual function corresponding to the virtual machine allows the execution of the function required for the above task; in the case that the virtual function corresponding to the virtual machine allows the execution of the function required for the above task, the above task scheduler sends the above task request to the computing unit for processing.
[0063] It is easy to notice that in the data processing system provided in the embodiment of the present application, by defining a software and hardware operation framework structure with hardware resource sharing and service isolation, different virtual machines in the data center can allocate and enjoy corresponding resources when sharing hardware resources, and can ensure data security isolation between different services.
[0064] Thus, the embodiments of the present application achieve the purpose of simultaneously realizing hardware resource sharing and service isolation for multiple services operating in the data center, thereby achieving the technical effect of reducing the overall operating cost of the data center by using hardware acceleration, and further solving the technical problem that it is difficult for the existing data center to simultaneously realize hardware resource sharing and service isolation.
[0065] Optionally, the computing device is a hardware device for providing acceleration functions in the data center, and the host belongs to the hardware purchased by the tenant. The ratio between the host Host and the computing device device can be purchased according to the needs of the tenant, and can be one-to-one, one-to-many, or many-to-one.
[0066] Optionally, at least one virtual machine runs in the above host, and each virtual machine is correspondingly configured with a corresponding virtual function in the computing device. By sending a task request to the corresponding virtual function in the computing device, the task scheduler in the computing device then determines whether the virtual function corresponding to the virtual machine allows the functions required to execute the tasks in the virtual machine based on the task request. If the judgment result indicates that the virtual function corresponding to the virtual machine allows the functions required to execute the above tasks, the task scheduler sends the task request to the computing unit in the computing device for processing.
[0067] In an alternative embodiment, the above host is installed with a virtual function driver VF driver. The above virtual machine sends a task request to the corresponding virtual function through the virtual function driver. The virtual function driver is used to cache the task request into the task request queue ReqTD Q and notify the above task scheduler; the computing device further includes a direct memory access engine DMA engine, and the task scheduler includes a first first-in-first-out memory. The task scheduler is further used to pull the task request from the task request queue to the first first-in-first-out memory through the direct memory access engine.
[0068] Optionally, after the task response manager Task RspTD manager in the task scheduler responds to the execution of the task by the computing unit CU, according to the completion done signal sent by the access control module CU shell, the task response information RsqTD generated by the access control module CU shell can be read and stored in the second first-in-first-out memory RspTD FIFO. And the computing device controls the direct memory access engine DMA Engine to write the task response information read from the second first-in-first-out memory RspTD FIFO (that is, the task response information in the task response information RsqTD) into the task response queue RspQ of the virtual machine of the host Host.
[0069] In the embodiments of the present application, the shared hardware resources can be divided into computing resources and storage resources. Among them, the computing resources can be divided from two dimensions: the implementation function and processing capacity of the computing units in the computing device, and the storage resources are divided from the memory space dimension of the computing device. Among them, the embodiments of the present application can support computing units with different implementation functions, such as functions like compression, decompression, encryption, decryption, sorting, and so on.
[0070] It should be noted that the software and hardware operation framework structure provided by the embodiments of the present application can also, but is not limited to, run on field-programmable gate array (FPGA) devices and application-specific integrated circuit (ASIC) devices. Among them, the software and hardware operation framework structure needs to be incorporated into the design scheme at the beginning of the design of the ASIC device, so as to run better on the ASIC device subsequently.
[0071] In the embodiments of the present application, by defining a software and hardware operation framework structure with hardware resource sharing and service isolation, for the scenario of multi-tenant hybrid deployment in the data center, the control layer and data layer of task execution are abstracted, and a shared isolation mechanism for multi-tenant task submission, scheduling, and execution is defined. It can achieve the security of task and data isolation for each tenant while sharing hardware resources among multiple tenants.
[0072] It should be noted that the above data center is a physical deployment form of cloud computing. The embodiments of the present application can be, but are not limited to, the data center, that is, the above software and hardware operation framework structure provided by the embodiments of the present application is also applicable to scenarios that require multi-user sharing and isolation in non-data centers.
[0073] Specifically, in terms of resource sharing, for requests of the same function from all tenants, the same-function hardware computing resources can be reused to achieve the sharing of computing resources. The computing control module CU shell controls the occupancy time of the task requests initiated by the host on the hardware computing resources, so as to realize the sharing and management of hardware computing resources. Specifically, through the management of physical function devices Mngt PF, the hardware resources used by tenants can be dynamically scaled and configured to achieve the sharing of global hardware resources.
[0074] Specifically, in terms of service isolation, the execution process of the computing device device is completely controlled by hardware tasks, avoiding the service isolation risks brought by the participation of tenants' application programs. By controlling the memory resource space in the virtual functions that the direct memory access engine can access through the input / output memory management unit IOMMU, it can effectively prevent the direct memory access engine from accessing the memory resource space outside the tenant's permission, and avoid the risk of obtaining tenant data.
[0075] As an alternative embodiment, the data flow in the data processing system is divided into a control plane and a data plane. Among them, the control plane includes: the management physical function device mngt PF, driver, and application APP in the virtual machine monitor VMM, the task request queue ReqTD Q and task response queue RspTD Q of the driver in the virtual machine VM, the control path ctrl path, task scheduler, and computing control module CU shell of the computing unit in the computing device device, etc.; the data plane includes the memory memory and data path module of the computing device device. In addition, the computing unit CU and the direct memory access engine DMA engine interact with both the control plane and the data plane. They are mainly controlled by the control plane and perform calculations and transmissions on the data in the data plane.
[0076] In an alternative embodiment, after the tenant completes the purchase operation of hardware resources, including computing functions, processing capabilities, storage resources, etc., the cloud management system notifies the management physical function application of the virtual machine monitor, configures the computing device through the management physical function device to generate a virtual function containing the corresponding resource configuration information, and synchronizes the configuration information to the task scheduler. And the cloud management system completes the installation of the management driver in the virtual machine by transparently transmitting the virtual function to the tenant's virtual machine, and provides hardware resource services to the virtual machine by providing an API interface to the management application.
[0077] In the above alternative embodiment, the tenants run in their respective virtual machines, send task requests to the allocated virtual functions through the virtual function drivers. The virtual function drivers cache the received task requests in the task request queue and notify the task scheduler. The task scheduler pulls the task requests in the task request queue to the first-in-first-out memory corresponding to the virtual function through the direct memory access engine. And, the task request manager detects whether the configuration information of the virtual machine contains the functions required for the above tasks. If the configuration information of the above virtual machine contains the functions required for the above tasks, it is determined that the virtual function corresponding to the above virtual machine allows the execution of the functions required for the above tasks; otherwise, a first error message is generated and sent to the task request manager, thereby realizing the shared use of hardware computing resources.
[0078] When the functions required to execute the above tasks are allowed, the computing control module sends the task request to the computing unit for calculation and monitors and manages the calculation process of the computing unit. During the calculation process, the computing unit uses the storage resources pre-allocated to the virtual function for calculation. After the calculation is completed, the task response manager writes the task response information output by the calculation into the second first-in-first-out memory of the task scheduler, and then controls the direct memory access engine to push the task response information in the second first-in-first-out memory back to the task response queue in the tenant virtual machine.
[0079] In the embodiment of the present application, only the management physical function device has the permission to generate and modify the hardware resources accessible by the virtual function. The tenant initiates hardware access by submitting a task request to the task request queue of the virtual function driver. The computing device takes over the entire subsequent task execution process, and the tenant does not need to participate anymore, so that the tenant resource access control completely controlled by the computing device can be realized, and the purpose of reducing the operation space for the tenant to break through the isolation mechanism is achieved.
[0080] As an optional embodiment, at the control level, the task scheduler detects the task requests in the first first-in-first-out memory corresponding to each virtual function and checks whether the hardware function of the computing unit for the task request is within the permission list configured for the virtual function. If it is not within the permitted range, an error is returned, thereby achieving functional isolation of the hardware computing resources; and the task scheduler performs task scheduling by counting the processing capabilities consumed by the tasks submitted by the virtual function within the statistical interval. If the above processing exceeds the processing capabilities allowed for the virtual machine, the scheduling is delayed until the next time period. If it does not exceed the processing capabilities allowed for the virtual machine, the scheduling is immediately executed, thereby achieving performance isolation of the hardware computing resources; in addition, the task scheduler submits the requested task to the computing control module, and the computing control module controls the execution process of the requested task on the computing unit. If the execution process of the requested task exceeds the maximum permitted execution process, the execution of the requested task is terminated and an execution error message is returned, achieving performance isolation of the hardware computing resources.
[0081] As another optional embodiment, at the data level, the task scheduler submits the requested task and the configuration information corresponding to the virtual function to the computing control module. The computing control module controls the storage resources accessed by the computing unit when executing the task. If it is detected whether the storage resources accessed by the computing unit during operation belong to the storage resources corresponding to the above virtual machine, the access is refused and the task execution is terminated, thereby achieving isolation of the hardware storage resources at the data level.
[0082] In an optional embodiment, as Figure 2As shown, the above host runs a virtual management application of a virtual machine monitor. After generating a virtual machine on the above host, the above virtual management application configures the above computing device through a management physical function device, generates configuration information, and synchronizes the above configuration information to the above task scheduler, where the above configuration information is used to indicate the virtual function corresponding to the above virtual machine.
[0083] Since the virtual management application of the virtual machine monitor runs in the host, after generating a virtual machine in the host, the virtual machine monitor VMM configures resources through the management physical function device mngt PF at the control plane, configures the virtual functions VF and the corresponding hardware resources for different virtual machines to use, and synchronizes the configuration information to the task scheduler in the computing device.
[0084] Optionally, in an embodiment of the present application, the configuration management function device is used in the sharing and isolation mechanism of the computing device device, and only the management physical function application Mngt APP in the virtual machine monitor VMM has access control authority over it; in the host, by setting the management physical function driver Mngt driver, which is a driver program for driving the management physical function device Mngt PF to work in the virtual machine monitor VMM, to provide an access control API interface to the management physical function application Mngt APP in the virtual machine monitor VMM; the above management physical function application Mngt APP is a management application running in the virtual machine monitor VMM, which is used to control the configuration management of the sharing and isolation mechanism of the computing device device, and can generate virtual functions VF with corresponding resource configurations according to the resources purchased by the tenant.
[0085] In an alternative embodiment, as Figure 2 shown, the above task scheduler further includes a task request manager, and the above task request manager is used to detect whether the configuration information of the above virtual machine contains the functions required by the above task. If the configuration information of the above virtual machine contains the functions required by the above task, it is determined that the virtual function corresponding to the above virtual machine allows the execution of the functions required by the above task.
[0086] In the embodiment of the present application, the task scheduler checks whether the task request sent by the tenant of the host conforms to the pre-generated configuration information. For example, the task request manager in the task scheduler detects whether the configuration information of the above virtual machine contains the functions required by the above task. If the configuration information of the above virtual machine contains the functions required by the above task, it is determined that the virtual function corresponding to the above virtual machine allows the execution of the functions required by the above task, so as to achieve the purpose of controlling the functions and performance of the hardware computing resources available to the tenant of the host, and realizing the functional isolation and performance isolation of the hardware computing resources.
[0087] In an alternative embodiment, as Figure 2 shown, the above host computer is installed with a virtual function driver, and the above virtual machine sends a task request to the corresponding virtual function through the virtual function driver. The above virtual function driver is used to cache the above task request into a task request queue and notify the above task scheduler; the above computing device further includes a direct memory access engine, the above task scheduler includes a first first-in-first-out memory, and the above task scheduler is further used to pull the above task request from the task request queue to the above first first-in-first-out memory through the above direct memory access engine.
[0088] In the above alternative embodiment, the above task scheduler includes a first first-in-first-out memory ReqTD FIFO, a task request manager ReqTD manager, a second first-in-first-out memory RspTD FIFO, and a task response manager TaskRspTD manager. Specifically, the above first first-in-first-out memory ReqTD FIFO corresponds to the virtual function VF one by one, and is used to pull the task request ReqTD from the corresponding virtual function VF through the direct memory access engine, following the first-in-first-out policy; the above second first-in-first-out memory RspTD FIFO corresponds to the virtual function VF one by one, and is used to cache the task response information RsqTD to be pushed back to the corresponding virtual function VF by the direct memory access engine DMA engine, following the first-in-first-out policy.
[0089] Optionally, in the embodiment of the present application, the task request manager ReqTD manager is used to pull the task request ReqTD. By tracking the consumer ID pointer CIDX and the producer ID pointer PIDX in the task request queue ReqTD Q of each virtual function VF in the host computer host, when there is a valid task request ReqTD, it controls the direct memory access engine DMAEngine to initiate a direct memory access DMA operation, and transfers the task request ReqTD in the task request queue ReqTD Q to the first first-in-first-out memory ReqTD FIFO corresponding to the virtual function VF.
[0090] In an alternative embodiment, the above task scheduler is further used to obtain the processing power consumed by the above virtual function within a preset statistical interval. If the above processing power exceeds the processing power allowed to be used by the above virtual machine, it waits until the next time period, and then pulls the above task request from the task request queue to the above first first-in-first-out memory through the above direct memory access engine.
[0091] At the control level, the task scheduler performs task scheduling by statistically analyzing the processing power consumed by the tasks submitted by the virtual function within the statistical interval. If it detects that the processing power exceeds the processing power allowed for the virtual machine, the scheduling is deferred to the next time period. If it does not exceed the processing power allowed for the virtual machine, the scheduling is immediately performed, that is, the direct memory access engine pulls the above task request from the task request queue to the above first-in-first-out memory.
[0092] Specifically, the computing device can parse the task request to obtain the input data information and the storage resource information, and migrate the input data from the input data buffer of the virtual machine indicated by the input data information to the storage resource indicated by the storage resource information; when writing the task response information to the task response queue, the computing device can parse the task request to obtain the output data information; and output the task response information from the storage resource of the computing device to the task response queue of the virtual machine, and after detecting that the address legality of the output data passes, output the output data to the output data buffer indicated by the output data information, thereby achieving isolation of the hardware computing resources in terms of performance.
[0093] In an alternative embodiment, as Figure 2 shown, the above system further includes an input / output memory management unit, and the input / output memory management unit is used to control the direct memory access engine to only allow access to the target storage resource in the host, where the target storage resource is the storage resource corresponding to the virtual function of the virtual machine in the host.
[0094] Optionally, the storage resources in the computing device can be divided into multiple independent storage areas for use according to the storage resources of the virtual machine purchased by the tenant. The input / output memory management unit (IOMMU) controls the direct memory access engine to only allow access to the target storage resource in the host, avoiding the direct memory access engine obtaining data resources outside the permission, and ensuring the data security of the tenant when sharing hardware resources.
[0095] In an alternative embodiment of the present application, the computing device parses the received task request ReqTD, and according to the input data Input Data and the storage resource Device memory information described in the task request ReqTD, controls the DMA Engine to perform a direct memory access (DMA) operation through the CU shell, and migrates the input data Input Data from the task request queue of the input data buffer in the host to the storage resource device memory described in the task request ReqTD.
[0096] In an alternative embodiment, still as Figure 2 shown, the above computing device further includes a computing control module corresponding to the computing unit. The computing control module is configured to receive a task request allocated by the task request manager, transmit the task request to the computing unit, and monitor the computing process of the computing unit.
[0097] Optionally, the above computing control module CU shell is used to control the storage resources accessible by the computing unit CU to implement data isolation, and can also control the running of tasks, fault isolation, and recovery.
[0098] In the embodiment of the present application, the computing control module CU shell receives the task request allocated by the task request manager and transmits it to the computing unit, and controls the occupation time of the task request for the hardware computing resources in the computing device, so as to implement the shared management and control of the hardware computing resources. Among them, all tenants' task requests for the same virtual function can reuse the hardware computing resources of the same function to achieve the sharing of computing resources.
[0099] In an alternative embodiment, still as Figure 2 shown, the above computing device further includes: storage resources corresponding to the above virtual machine. The computing control module is further configured to monitor whether the storage resources accessed during the operation of the computing unit belong to the storage resources corresponding to the virtual machine. If the judgment result is negative, a first error message is generated.
[0100] In the embodiment of the present application, the busy and idle state of the computing unit CU can be monitored through the computing control module. Then, after reading a task request ReqTD from the first-in, first-out memory ReqTD FIFO, it is distributed to the access control module CU shell of the idle computing unit through the control path, and the hardware storage resources accessible by the virtual function VF to which this task request ReqTD belongs are synchronized.
[0101] After the computing device receives the ReqTD sent by the task request manager ReqTD manager and the hardware storage resources accessible by the VF to which it belongs, the ReqTD is sent to the computing unit CU for execution. The computing control module monitors whether the storage resources accessed during the operation of CU are within the range accessible by the VF to which the ReqTD belongs. If it exceeds, the access is refused, the operation of the computing unit CU is terminated, and the corresponding first error message is written into the request response message RspTD. If the operation process of the computing unit CU is legal, the request response message RspTD is obtained after the operation of the computing unit CU ends.
[0102] In an alternative embodiment, the above-mentioned calculation control module is further configured to monitor whether the above-mentioned calculation unit is operating abnormally. If the above-mentioned calculation unit is operating abnormally, the access of the above-mentioned calculation unit to the communication link is disconnected, and a second error message is generated.
[0103] Optionally, in the embodiment of the present application, the above-mentioned calculation control module is further configured to monitor whether the calculation unit CU is operating abnormally. When an abnormality such as a running timeout occurs, the access of the calculation unit CU to the control path ctrl path and the data path data path is disconnected, and the calculation unit is reset, and a corresponding error message is generated and filled into the task response message RsqTD.
[0104] In an alternative embodiment, still as Figure 2 shown, the above-mentioned task scheduler further includes a second first-in-first-out memory. When the above-mentioned calculation control module monitors that the above-mentioned calculation unit has completed the calculation, the above-mentioned task response manager writes the task response message output by the above-mentioned calculation unit into the above-mentioned second first-in-first-out memory.
[0105] In the embodiment of the present application, when the above-mentioned calculation control module monitors that the above-mentioned calculation unit has completed the calculation, a calculation completion Done signal is sent to the task response manager Task RspTD Manager. Furthermore, the task response manager writes the task response message output by the above-mentioned calculation unit into the above-mentioned second first-in-first-out memory Rep FIFO.
[0106] Optionally, the above-mentioned task response manager Task RspTD manager is configured to obtain the task execution result. After the calculation unit CU executes the task, by accessing the completion done signal sent by the access control module CU shell, the task response message RsqTD generated by the access control module CU shell is read and stored in the second first-in-first-out memory RspTD FIFO.
[0107] In an alternative embodiment, still as Figure 2 shown, the above-mentioned computing device further includes: a direct memory access engine, and the above-mentioned direct memory access engine is configured to obtain the above-mentioned task response message from the above-mentioned second first-in-first-out memory and write the above-mentioned task response message into the task response queue of the above-mentioned virtual machine.
[0108] Optionally, the above-mentioned computing device is further configured to control the direct memory access engine DMA Engine to write the task response message RsqTD read from the second first-in-first-out memory RspTD FIFO into the task response queue RspQ of the virtual machine of the host computer Host.
[0109] Optionally, in the embodiments of the present application, the above-mentioned direct memory access engine (DMA Engine) can write one or more task response messages (RsqTD) into the task response queue of the corresponding virtual machine at a time.
[0110] In an alternative embodiment, still as Figure 2 shown, the above-mentioned host computer further includes: a root complex device of the bus, and the root complex device of the bus is used to connect the above-mentioned host computer to the bus structure; the above-mentioned computing device further includes: an endpoint device of the bus, and the endpoint device of the bus is used to access the above-mentioned bus structure as an endpoint in the above-mentioned bus structure.
[0111] Optionally, in the PCIe system, the above-mentioned root complex device (RC device) of the bus is responsible for connecting subsystems such as the processor and memory to a PCIe switch structure composed of one or more switch devices. For example, in the embodiments of the present application, the host computer is connected to the bus structure; the above-mentioned endpoint device of the bus is used to access the above-mentioned bus structure as an endpoint in the above-mentioned bus structure.
[0112] Embodiment 2
[0113] According to the embodiments of the present application, an embodiment of a data processing method is further 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 the logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in a different order than here.
[0114] The method embodiments provided by the embodiments of the present application can be executed in a mobile terminal, a computing device, or a similar computing device. Figure 3 A hardware structure block diagram of a computing device (or mobile device) for implementing the data processing method is shown. As Figure 3 shown, the computing device 10 (or mobile device 10) may include one or more (shown as 102a, 102b,..., 102n in the figure) 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), a memory 104 for storing data, and a transmission module 106 for communication functions. In addition, it may further include: 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. Those of ordinary skill in the art can understand that Figure 3 the structure shown is only schematic and does not limit the structure of the above-mentioned electronic device. For example, the computing device 10 may further include more or fewer components than Figure 3 shown in Figure 3The different configurations shown.
[0115] It should be noted that one or more of the above-mentioned processors 102 and / or other data processing circuits can generally be referred to as "data processing circuits" herein. The data processing circuit can be embodied in software, hardware, firmware, or any combination thereof, in whole or in part. In addition, the data processing circuit can be a single independent processing module, or be incorporated in whole or in part into any one of the other elements in the computing device 10 (or mobile device). As involved in the embodiments of the present application, the data processing circuit is a kind of processor control (such as the selection of a variable resistance terminal path connected to an interface).
[0116] The memory 104 can be used to store software programs and modules of application software, such as the program instructions / data storage devices corresponding to the data processing method in the embodiments of the present application. The processor 102 executes various functional applications and data processing by running the software programs and modules stored in the memory 104, that is, implements the above-mentioned data processing method. The memory 104 can include high-speed random access memory, and can also include non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memories. In some instances, the memory 104 can further include a memory remotely set relative to the processor 102, and these remote memories can be connected to the computing device 10 through a network. Examples of the above-mentioned network include but are not limited to the Internet, intranet, local area network, mobile communication network, and combinations thereof.
[0117] The transmission module 106 is used to receive or send data via a network. Specific examples of the above-mentioned network can include the wireless network provided by the communication provider of the computing device 10. In one instance, the transmission module 106 includes a network adapter (Network Interface Controller, NIC), which can be connected to other network devices through a base station and thus communicate with the Internet. In one instance, the transmission module 106 can be a radio frequency (RF) module, which is used to communicate with the Internet wirelessly.
[0118] The display can be, for example, a touch-screen liquid crystal display (LCD), which enables the user to interact with the user interface of the computing device 10 (or mobile device).
[0119] Under the above operating environment, the present application provides a Figure 4 data processing method as shown Figure 4 is a flowchart of a data processing method according to an embodiment of the present application, as shown Figure 4 The data processing method includes:
[0120] Step S102, the computing device receives a task request sent by a virtual machine, where the virtual machine is configured with a corresponding virtual function in the computing device, and the task request includes at least the functions required for the task in the virtual machine;
[0121] Step S104, the computing device determines whether the virtual function corresponding to the virtual machine allows the execution of the functions required for the task;
[0122] Step S106, when the virtual function corresponding to the virtual machine allows the execution of the functions required for the task, the computing device processes the task request through a computing unit.
[0123] In the embodiment of the present application, a task scheduler in the computing device receives a task request sent by a virtual machine. Among them, at least one of the above virtual machines runs on a host machine communicating with the computing device. The virtual machine is configured with a corresponding virtual function in the computing device, and the task request includes at least the functions required for the task in the virtual machine; the task scheduler determines whether the virtual function corresponding to the virtual machine allows the execution of the functions required for the task; when the virtual function corresponding to the virtual machine allows the execution of the functions required for the task, the task scheduler sends the task request to a computing unit for processing.
[0124] It is easy to note that in the data processing system provided in the embodiment of the present application, by defining a software and hardware operation framework structure with hardware resource sharing and service isolation, when different virtual machines in the data center share hardware resources, corresponding resources can be allocated and shared, and data security isolation between different services can be ensured.
[0125] Thus, the embodiment of the present application achieves the purpose of simultaneously realizing hardware resource sharing and service isolation for multiple services operating in the data center, thereby achieving the technical effect of reducing the overall operating cost of the data center by using hardware acceleration, and further solving the technical problem that it is difficult to simultaneously realize hardware resource sharing and service isolation in the prior art data center.
[0126] Optionally, the computing device is a hardware device for providing an acceleration function in the data center. The host machine belongs to the hardware purchased by the tenant. The ratio between the host machine Host and the computing device device can be purchased according to the needs of the tenant, and can be one-to-one, one-to-many, or many-to-one.
[0127] Optionally, at least one virtual machine runs in the above host computer, and each virtual machine is correspondingly configured with a corresponding virtual function in the computing device. By sending a task request to the corresponding virtual function in the computing device, the task scheduler in the computing device then determines, based on the task request, whether the virtual function corresponding to the virtual machine allows the functions required for the tasks in the virtual machine to be executed. If the determination result indicates that the virtual function corresponding to the virtual machine allows the functions required for the above tasks to be executed, the task scheduler sends the task request to the computing unit in the computing device for processing.
[0128] In an optional embodiment, the above host computer is installed with a virtual function driver VF driver. The above virtual machine sends a task request to the corresponding virtual function through the virtual function driver. The virtual function driver is used to cache the above task request into a task request queue ReqTDQ and notify the above task scheduler. The computing device further includes a direct memory access engine DMA engine. The task scheduler includes a first first-in-first-out memory. The task scheduler is further used to pull the above task request from the task request queue to the above first first-in-first-out memory through the direct memory access engine.
[0129] Optionally, after the task response manager Task RspTD manager in the task scheduler responds to the execution of a task by the computing unit CU, according to the done signal sent by the access control module CU shell, the task response information RsqTD generated by the access control module CU shell can be read and stored in a second first-in-first-out memory RspTD FIFO. And the computing device controls the direct memory access engine DMA Engine to write the task response information read from the second first-in-first-out memory RspTD FIFO (i.e., the task response information in the task response information RsqTD) into the task response queue RspQ of the virtual machine of the host computer Host.
[0130] In the embodiments of the present application, the shared hardware resources can be divided into computing resources and storage resources. Among them, the computing resources can be divided from two dimensions: the implemented functions and processing capabilities of the computing units in the computing device, and the storage resources are divided from the dimension of the memory space of the computing device. Among them, the embodiments of the present application can support computing units with different implemented functions, such as functions like compression, decompression, encryption, decryption, sorting, and so on.
[0131] It should be noted that the software and hardware operation framework structure provided in the embodiments of the present application can also be but is not limited to running on field-programmable gate array (FPGA) devices and application-specific integrated circuit (ASIC) devices. Among them, the software and hardware operation framework structure needs to be incorporated into the design scheme at the beginning of the design of the ASIC device, so as to run better on the ASIC device subsequently.
[0132] In the embodiments of the present application, by defining a software and hardware operation framework structure with hardware resource sharing and service isolation, for the scenario of multi-tenant hybrid deployment in the data center, the control layer and data layer of task execution are abstracted, and a shared isolation mechanism for multi-tenant task submission, scheduling, and execution is defined. It can achieve the sharing of hardware resources among multiple tenants while ensuring the isolation and security of their respective tasks and data. Moreover, the above software and hardware operation framework structure is also applicable to scenarios that require multi-user sharing and isolation in non-data centers.
[0133] Specifically, in terms of resource sharing, all tenants' requests for the same function can reuse the hardware computing resources of the same function, realizing the sharing of computing resources. The computing control module CU shell controls the occupancy time of the task requests initiated by the host on the hardware computing resources, realizing the shared management and control of the hardware computing resources. Specifically, the management physical function device Mngt PF can dynamically scale and configure the hardware resources used by the tenants, realizing the sharing of global hardware resources.
[0134] Specifically, in terms of service isolation, the execution process of the computing device device is completely controlled by hardware tasks, avoiding the service isolation risks brought by the participation of the tenants' application programs. By controlling the memory resource space in the virtual functions that the direct memory access engine can access through the input / output memory management unit IOMMU, it can effectively avoid the direct memory access engine accessing the memory resource space outside the tenants' permissions, and avoid the risk of obtaining tenant data.
[0135] As an alternative embodiment, the data flow in the data processing system is divided into a control plane and a data plane. Among them, the control plane includes the management physical function device (mngt PF) in the virtual machine monitor (VMM), the driver, the application program (APP), the task request queue (ReqTD Q) and the task response queue (RspTD Q) of the driver in the virtual machine (VM), the control path (ctrl path), the task scheduler, and the computing control module (CU shell) of the computing unit in the computing device (device), etc.; the data plane includes the memory and the data path module of the computing device (device). In addition, the computing unit (CU) and the direct memory access engine (DMA engine) interact with both the control plane and the data plane. They are mainly controlled by the control plane and perform calculations and transmissions on the data in the data plane.
[0136] In an alternative embodiment, after the tenant completes the purchase operation of hardware resources, including computing functions, processing capabilities, storage resources, etc., the cloud management system notifies the management physical function application program of the virtual machine monitor to configure the computing device through the management physical function device to generate a virtual function containing the corresponding resource configuration information, and synchronize the configuration information to the task scheduler. And the cloud management system completes the installation of the management driver in the virtual machine by transparently transmitting the virtual function to the tenant's virtual machine, and provides hardware resource services to the virtual machine by providing an API interface to the management application program.
[0137] In the above alternative embodiment, the tenants run in their respective virtual machines and send task requests to the allocated virtual functions through the virtual function driver. The virtual function driver caches the received task requests in the task request queue and notifies the task scheduler. The task scheduler pulls the task requests in the task request queue to the first-in-first-out memory corresponding to the virtual function through the direct memory access engine. And, the task request manager detects whether the configuration information of the virtual machine contains the functions required for the above tasks. If the configuration information of the above virtual machine contains the functions required for the above tasks, it is determined that the virtual function corresponding to the above virtual machine allows the execution of the functions required for the above tasks; otherwise, a first error message is generated and sent to the task request manager, thereby realizing the shared use of hardware computing resources.
[0138] When the functions required to execute the above tasks are allowed, the computing control module sends the task request to the computing unit for calculation and monitors and manages the calculation process of the computing unit. During the calculation process, the computing unit uses the storage resources pre-allocated to the virtual function for calculation. After the calculation is completed, the task response manager writes the task response information output by the calculation into the second first-in-first-out memory of the task scheduler, and then controls the direct memory access engine to push the task response information in the second first-in-first-out memory back to the task response queue in the tenant virtual machine.
[0139] In the embodiment of the present application, only the management physical function device has the permission to generate and modify the hardware resources accessible by the virtual function. The tenant initiates hardware access by submitting a task request to the task request queue of the virtual function driver. The computing device takes over the entire subsequent task execution process, and the tenant does not need to participate anymore, so that the tenant resource access control completely controlled by the computing device can be realized, and the purpose of reducing the operation space for the tenant to break through the isolation mechanism can be achieved.
[0140] As an alternative embodiment, at the control level, the task scheduler detects the task requests in the first first-in-first-out memory corresponding to each virtual function, and detects whether the hardware function of the computing unit of the task request is within the permission list configured by the virtual function. If it is not within the permitted range, an error is returned, thereby realizing the isolation of hardware computing resources in terms of function; and. The task scheduler performs task scheduling by counting the processing capabilities consumed by the tasks submitted by the virtual function within the statistical interval. If the above processing exceeds the processing capabilities allowed to be used by the virtual machine, the scheduling is delayed until the next time period. If it does not exceed the processing capabilities allowed to be used by the virtual machine, the scheduling is immediately executed, thereby realizing the isolation of hardware computing resources in terms of performance; in addition, the task scheduler submits the requested task to the computing control module, and the computing control module controls the execution process of the requested task on the computing unit. If the execution process of the requested task exceeds the maximum permitted execution process, the execution of the requested task is terminated and an execution error message is returned, realizing the isolation of hardware computing resources in terms of performance.
[0141] As another alternative embodiment, at the data level, the task scheduler submits the requested task and the configuration information corresponding to the virtual function to the computing control module. The computing control module controls the storage resources accessed by the computing unit when executing the task. If it is detected whether the storage resources accessed by the computing unit during operation belong to the storage resources corresponding to the above virtual machine, the access is refused and the execution of the task is terminated, thereby realizing the isolation of hardware storage resources at the data level.
[0142] In an alternative embodiment, before the computing device receives the task request sent by the virtual machine, the above method further includes:
[0143] In step S202, after generating a virtual machine on the host, the computing device configures a corresponding virtual function for the virtual machine and generates configuration information for indicating the virtual function.
[0144] Since a virtual management application of a virtual machine monitor runs in the host, after generating a virtual machine in the host, the virtual machine monitor VMM performs resource configuration through the management physical function device mngt PF at the control layer, configures and generates virtual functions VF for different virtual machines to use and corresponding hardware resources, and synchronizes the configuration information to the task scheduler in the computing device.
[0145] Optionally, in an embodiment of the present application, the configuration management function device is used in the sharing and isolation mechanism of the computing device device, and only the management physical function application Mngt APP in the virtual machine monitor VMM has access control authority over it; in the host, by setting a management physical function driver Mngt driver, which is a driver program for driving the management physical function device Mngt PF to work in the virtual machine monitor VMM, to provide an access control API interface to the management physical function application Mngt APP in the virtual machine monitor VMM; the above management physical function application Mngt APP is a management application running in the virtual machine monitor VMM, which is used to control the configuration management of the sharing and isolation mechanism of the computing device device, and can generate virtual functions VF with corresponding resource configurations according to the resources purchased by the tenant.
[0146] In an optional embodiment, the above computing device determines whether the virtual function corresponding to the virtual machine allows the functions required for executing the task, including:
[0147] In step S302, the computing device detects whether the configuration information of the virtual machine contains the functions required for the task;
[0148] In step S304, if the configuration information of the virtual machine contains the functions required for the task, it is determined that the virtual function corresponding to the virtual machine allows the functions required for executing the task.
[0149] In the embodiment of the present application, the task scheduler checks whether the task request sent by the tenant of the host conforms to the pre-generated configuration information. For example, the task request manager in the task scheduler detects whether the configuration information of the virtual machine contains the functions required for the task. If the configuration information of the virtual machine contains the functions required for the task, it is determined that the virtual function corresponding to the virtual machine allows the functions required for executing the task, and thus the purpose of controlling the functions and performance of the hardware computing resources available to the tenant of the host can be achieved, realizing the functional isolation and performance isolation of the hardware computing resources.
[0150] In an alternative embodiment, the above host computer is installed with a virtual function driver. The above virtual machine sends a task request to the corresponding virtual function through the virtual function driver. The virtual function driver is used to cache the task request in a task request queue and notify the above task scheduler. The computing device further includes a direct memory access engine. The task scheduler includes a first first-in-first-out memory. The task scheduler is further used to pull the task request from the task request queue to the first first-in-first-out memory through the direct memory access engine.
[0151] In the above alternative embodiment, the task scheduler includes a first first-in-first-out memory ReqTD FIFO, a task request manager ReqTD manager, a second first-in-first-out memory RspTD FIFO, and a task response manager TaskRspTD manager. Specifically, the first first-in-first-out memory ReqTD FIFO corresponds to the virtual function VF one by one, and is used to pull the task request ReqTD from the corresponding virtual function VF through the direct memory access engine, following the first-in-first-out policy. The second first-in-first-out memory RspTD FIFO corresponds to the virtual function VF one by one, and is used to cache the task response information RsqTD to be pushed back to the corresponding virtual function VF by the direct memory access engine DMA engine, following the first-in-first-out policy.
[0152] Optionally, in the embodiment of the present application, the task request manager ReqTD manager is used to pull the task request ReqTD. By tracking the consumer ID pointer CIDX and the producer ID pointer PIDX in the task request queue ReqTD Q of each virtual function VF in the host computer host, when there is a valid task request ReqTD, it controls the direct memory access engine DMAEngine to initiate a direct memory access DMA operation, and transfers the task request ReqTD in the task request queue ReqTD Q to the first first-in-first-out memory ReqTD FIFO corresponding to the virtual function VF.
[0153] In an alternative embodiment, the computing device receives a task request sent by the virtual machine, including: the computing device obtains the task request from the task request queue, where the virtual machine stores the task request in the task request queue, and the task request queue is stored in the cache of the storage resource allocated by the host computer for the virtual machine. After the computing device processes the task request through the computing unit, the method further includes: the computing device writes the task response information obtained by processing the task request into the task response queue, where the task response queue is stored in the cache of the storage resource allocated by the host computer for the virtual machine.
[0154] In an alternative embodiment, the above host computer is installed with a virtual function driver (VF driver), and the above virtual machine sends a task request to the corresponding virtual function through the virtual function driver. The virtual function driver is used to cache the task request into a task request queue (ReqTDQ) and notify the above task scheduler; the computing device further includes a direct memory access engine (DMA engine), and the task scheduler includes a first first-in-first-out memory. The task scheduler is further used to pull the task request from the task request queue to the first first-in-first-out memory through the direct memory access engine.
[0155] Optionally, after the task response manager (Task RspTD manager) in the task scheduler responds to the execution of a task by a computing unit (CU), according to a completion (done) signal sent by an access control module (CU shell), the task response information (RsqTD) generated by the access control module (CU shell) can be read and stored in a second first-in-first-out memory (RspTD FIFO). And the computing device controls the direct memory access engine (DMA Engine) to write the task response information read from the second first-in-first-out memory (i.e., the task response information in the task response information RsqTD) into a task response queue (RspQ) of a virtual machine in the host computer (Host).
[0156] In an alternative embodiment, the above task request further includes: input data information and storage resource information, where the input data information includes the input data buffer address of the above virtual machine, and the storage resource information is used to indicate the storage resources corresponding to the above virtual machine in the above computing device.
[0157] As an alternative embodiment, as Figure 5 shown, the above computing device obtains the above task request from the task request queue, including:
[0158] Step S402, the above computing device obtains the above task request from the above task request queue;
[0159] Step S404, the above computing device parses the above task request to obtain the above input data information and the above storage resource information;
[0160] Step S406, the above computing device migrates the above input data from the input data buffer of the above virtual machine indicated by the above input data information to the storage resources indicated by the above storage resource information.
[0161] Optionally, the storage resources in the above computing device can be divided into multiple independent storage areas for use according to the storage resources of the virtual machines purchased by the tenant. The input / output memory management unit (IOMMU) is used to control the above direct memory access (DMA) engine to only allow access to the target storage resources in the host machine, avoiding the DMA engine from obtaining data resources outside the permission, and ensuring the data security of the tenant when sharing hardware resources.
[0162] In an optional embodiment of the present application, the computing device parses the received task request ReqTD, and according to the input data Input Data information and storage resource Device memory information described in the task request ReqTD, controls the DMAEngine to perform a direct memory access (DMA) operation through CUshell. The computing device migrates the above input data Input Data from the input data buffer of the virtual machine described in the above task request to the storage resource device memory described in the task request ReqTD.
[0163] Optionally, the above task request further includes: output data information, and the above output data information includes the address of the output data buffer of the above virtual machine.
[0164] In an optional embodiment, the computing device writes the task response information obtained by processing the above task request into the task response queue, including:
[0165] Step S502, the computing device parses the above task request to obtain the above output data information;
[0166] Step S504, the computing device outputs the above task response information from the storage resources of the computing device to the task response queue of the above virtual machine, and outputs the above output data to the output data buffer indicated by the above output data information.
[0167] Optionally, the above computing device is further configured to control the direct memory access engine DMA Engine to output the task response information RsqTD read from the second first-in-first-out memory RspTD FIFO from the storage resources of the computing device to the task response queue RspQ of the above virtual machine, and after detecting that the address legality of the output data passes, output the above output data to the output data buffer indicated by the above output data information.
[0168] Optionally, in the embodiment of the present application, the above direct memory access engine DMA Engine can write one or more task response information RsqTD into the task response queue of the corresponding virtual machine at a time.
[0169] In an alternative embodiment, when the virtual function corresponding to the virtual machine allows the functions required to execute the above task, the computing device processes the above task request through a computing unit, including:
[0170] Step S602, the computing device obtains the processing power consumed by the virtual function within a preset statistical interval;
[0171] Step S604, if the above processing power exceeds the processing power allowed to be used by the virtual machine, wait until the next time period and then process the above task request.
[0172] Optionally, in the embodiment of the present application, the task scheduler in the computing device performs task scheduling by statistically calculating the processing power consumed by the tasks submitted by the virtual function within the statistical interval. If the above processing exceeds the processing power allowed to be used by the virtual machine, the scheduling is delayed until the next time period. If it does not exceed the processing power allowed to be used by the virtual machine, the scheduling is immediately executed, thereby achieving isolation of hardware computing resources in terms of performance; in addition, the task scheduler submits the requested task to the computing control module, and the computing control module controls the execution process of the requested task on the computing unit. If the execution process of the requested task exceeds the maximum permitted execution process, the execution of the requested task is terminated and an execution error message is returned, achieving isolation of hardware computing resources in terms of performance.
[0173] In an alternative embodiment, during the process of the computing device processing the above task request through the computing unit, the method further includes:
[0174] Step S702, the computing device monitors whether the storage resources accessed during the operation of the computing unit belong to the storage resources corresponding to the virtual machine;
[0175] Step S704, if the judgment result is negative, generate a first error message.
[0176] In the embodiment of the present application, the busy and idle states of the computing unit CU can be monitored through the computing control module. Then, after reading a task request ReqTD from the first-in, first-out memory ReqTD FIFO, it is distributed to the access control module CU shell of the idle computing unit through the control path, and the hardware storage resources accessible to the virtual function VF to which this task request ReqTD belongs are synchronized.
[0177] After the computing device receives the ReqTD sent by the task request manager ReqTD manager and the hardware storage resources accessible to the VF to which the ReqTD belongs, it sends the ReqTD to the computing unit CU for execution. Through calculation, it can be known whether the storage resources accessed during the operation of the CU are within the range accessible to the VF to which the ReqTD belongs. If it exceeds, access is refused, the operation of the computing unit CU is terminated, and the corresponding first error message is written into the request response message RspTD. If the operation process of the computing unit CU is legal, the request response message RspTD is obtained after the operation of the computing unit CU ends.
[0178] In an alternative embodiment, during the process of the computing device processing the task request through the computing unit, the method further includes:
[0179] Step S802, the computing device monitors whether the operation of the computing unit is abnormal;
[0180] Step S804, if the operation of the computing unit is abnormal, disconnect the access of the computing unit to the communication link and generate a second error message.
[0181] Optionally, in the embodiment of the present application, the above computing control module is further configured to monitor whether the operation of the computing unit CU is abnormal. When an abnormality such as a running timeout occurs, disconnect the access of the computing unit CU to the control path ctrl path and the data path data path of the computing unit, perform a reset process on the computing unit, and generate the corresponding error message and fill it into the task response message RsqTD.
[0182] It should be noted that for the foregoing method embodiments, for the sake of simple description, they are all expressed as a series of action combinations. However, those skilled in the art should know that the present application is not limited by the described action sequence, because according to the present application, 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 essential to the present application.
[0183] Through the description of the above embodiments, those skilled in the art can clearly understand that the method according to the above embodiments can be implemented by means of software plus a necessary general hardware platform. Of course, it 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 application, in essence, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disc), and includes several instructions for causing a terminal device (which can be a mobile phone, computer, server, or network device, etc.) to execute the methods described in the various embodiments of the present application.
[0184] Embodiment 3
[0185] According to an embodiment of the present application, there is also provided an apparatus embodiment for implementing the above data processing method. Figure 6 FIG. is a schematic structural diagram of a data processing apparatus according to an embodiment of the present application, as Figure 6 shown. The data processing apparatus includes: a receiving module 602, a judging module 604, and a processing module 606, where
[0186] The receiving module 602 is configured to receive a task request sent by a virtual machine. Among them, the above virtual machine is configured with a corresponding virtual function in the above computing device, and the task request at least includes the functions required for the task in the virtual machine. The judging module 604 is configured to judge whether the virtual function corresponding to the virtual machine allows the execution of the functions required for the task. The processing module 606 is configured to, when the virtual function corresponding to the virtual machine allows the execution of the functions required for the task, process the task request through a computing unit.
[0187] It should be noted here that the above receiving module 602, judging module 604, and processing module 606 correspond to steps S102 to S106 in Embodiment 2. The instances and application scenarios implemented by the three modules and the corresponding steps are the same, but are not limited to the content disclosed in the above Embodiment 2. It should be noted that the above modules, as part of the apparatus, can run in the computing device 10 provided in Embodiment 2.
[0188] It should be noted that the preferred implementation manner of this embodiment can refer to the relevant description in Embodiment 1, and will not be repeated here.
[0189] Embodiment 4
[0190] According to an embodiment of the present application, there is also provided an embodiment of a data processing device, and the data processing device can be any one of the computing devices in a computing device cluster. Figure 7 FIG. is a schematic structural diagram of a data processing device according to an embodiment of the present application, asFigure 7 As shown, the data processing device includes: a processor 700 and a memory 702. Among them,
[0191] a processor 700; and a memory 702, connected to the above-mentioned processor 700, for providing instructions for the above-mentioned processor to process the following processing steps: The computing device receives a task request sent by a virtual machine. Among them, the above-mentioned virtual machine is configured with a corresponding virtual function in the above-mentioned computing device, and the above-mentioned task request at least includes the function required for the above-mentioned task; the above-mentioned computing device determines whether the virtual function corresponding to the above-mentioned virtual machine allows the execution of the function required for the above-mentioned task; when the virtual function corresponding to the above-mentioned virtual machine allows the execution of the function required for the above-mentioned task, the above-mentioned computing device processes the above-mentioned task request through a computing unit.
[0192] Optionally, in this embodiment, the above-mentioned data processing device can also be replaced by a terminal device such as a mobile terminal.
[0193] Optionally, in this embodiment, the above-mentioned data processing device can be located in at least one of multiple network devices in a computer network.
[0194] In this embodiment, the above-mentioned data processing device can execute the program code of the following steps in the data processing method: The computing device receives a task request sent by a virtual machine. Among them, the above-mentioned virtual machine is configured with a corresponding virtual function in the above-mentioned computing device, and the above-mentioned task request at least includes the function required for the task in the virtual machine; the above-mentioned computing device determines whether the virtual function corresponding to the above-mentioned virtual machine allows the execution of the function required for the above-mentioned task; when the virtual function corresponding to the above-mentioned virtual machine allows the execution of the function required for the above-mentioned task, the above-mentioned computing device processes the above-mentioned task request through a computing unit.
[0195] It should be noted that the preferred implementation manner of this embodiment can refer to the relevant description in Embodiment 1, which will not be elaborated here.
[0196] Embodiment 5
[0197] According to an embodiment of the present application, an embodiment of a computer terminal is further provided. The computer terminal can be any computer terminal device in a computer terminal group. Optionally, in this embodiment, the above-mentioned computer terminal can also be replaced by a terminal device such as a mobile terminal.
[0198] Optionally, in this embodiment, the above-mentioned computer terminal can be located in at least one of multiple network devices in a computer network.
[0199] In this embodiment, the computer terminal may execute the program code of the following steps in the data processing method: The computing device receives a task request sent by a virtual machine, where the virtual machine is configured with a corresponding virtual function in the computing device, and the task request includes at least the functions required for the task; the computing device determines whether the virtual function corresponding to the virtual machine allows the execution of the functions required for the task; in the case where the virtual function corresponding to the virtual machine allows the execution of the functions required for the task, the computing device processes the task request through a computing unit.
[0200] Optionally, Figure 8 is a structural block diagram of another computer terminal according to an embodiment of the present application, as Figure 8 shown. The computer terminal may include: one or more (only one is shown in the figure) processors 802, a memory 804, and a peripheral interface 806.
[0201] Among them, the memory can be used to store software programs and modules, such as the program instructions / modules corresponding to the power-off control method and device of the socket in the embodiments of the present application. The processor executes various functional applications and data processing by running the software programs and modules stored in the memory, that is, implements the above data processing 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 memories. In some instances, the memory may further include a memory remotely provided with respect to the processor, and these remote memories may be connected to the computer terminal through a network. Examples of the above network include but are not limited to the Internet, an enterprise intranet, a local area network, a mobile communication network, and combinations thereof.
[0202] The processor may call the information and application programs stored in the memory through a transmission device to execute the following steps: The computing device receives a task request sent by a virtual machine, where the virtual machine is configured with a corresponding virtual function in the computing device, and the task request includes at least the functions required for the task; the computing device determines whether the virtual function corresponding to the virtual machine allows the execution of the functions required for the task; in the case where the virtual function corresponding to the virtual machine allows the execution of the functions required for the task, the computing device processes the task request through a computing unit.
[0203] Optionally, the processor may further execute the program code of the following steps: After generating a virtual machine on the host, the computing device configures a corresponding virtual function for the virtual machine and generates configuration information for indicating the virtual function.
[0204] Optionally, the above-mentioned processor may also execute the program code of the following steps: The above-mentioned computing device detects whether the configuration information of the above-mentioned virtual machine contains the functions required for the above-mentioned task; if the configuration information of the above-mentioned virtual machine contains the functions required for the above-mentioned task, it is determined that the virtual function corresponding to the above-mentioned virtual machine allows the execution of the functions required for the above-mentioned task.
[0205] Optionally, the above-mentioned processor may also execute the program code of the following steps: The above-mentioned computing device obtains the above-mentioned task request from the task request queue, where the above-mentioned virtual machine stores the above-mentioned task request in the above-mentioned task request queue, and the above-mentioned task request queue is stored in the cache of the storage resources allocated by the host for the above-mentioned virtual machine.
[0206] Optionally, the above-mentioned processor may also execute the program code of the following steps: The above-mentioned computing device writes the task response information obtained by processing the above-mentioned task request into the task response queue, where the above-mentioned task response queue is stored in the cache of the storage resources allocated by the above-mentioned host for the above-mentioned virtual machine.
[0207] Optionally, the above-mentioned processor may also execute the program code of the following steps: The computing device obtains a task request from the task request queue; the computing device parses the task request to obtain input data information and storage resource information; the computing device migrates the input data from the input data buffer of the virtual machine indicated by the input data information to the storage resources indicated by the storage resource information.
[0208] Optionally, the above-mentioned processor may also execute the program code of the following steps: The computing device parses the task request to obtain output data information; the computing device outputs the task response information from the storage resources of the computing device to the task response queue of the virtual machine, and outputs the output data to the output data buffer indicated by the output data information.
[0209] Optionally, the above-mentioned processor may also execute the program code of the following steps: The above-mentioned computing device obtains the processing power consumed by the above-mentioned virtual function within a preset statistical interval; if the above-mentioned processing power exceeds the processing power allowed to be used by the above-mentioned virtual machine, it waits until the next time period and then processes the above-mentioned task request.
[0210] Optionally, the above-mentioned processor may also execute the program code of the following steps: The above-mentioned computing device monitors whether the storage resources accessed during the operation of the above-mentioned computing unit belong to the storage resources corresponding to the above-mentioned virtual machine; if the judgment result is negative, a first error message is generated.
[0211] Optionally, the above-mentioned processor may also execute the program code of the following steps: The above-mentioned computing device monitors whether the operation of the above-mentioned computing unit is abnormal; if the operation of the above-mentioned computing unit is abnormal, the access of the above-mentioned computing unit to the communication link is disconnected, and a second error message is generated.
[0212] Example 6
[0213] According to an embodiment of the present application, an embodiment of a storage medium is further provided. Optionally, in this embodiment, the above storage medium may be used to store the program code executed by the data processing method provided in the above embodiment.
[0214] Optionally, in this embodiment, the above storage medium may be located in any one of the computing devices in the computing device group in the computer network, or in any one of the mobile terminals in the mobile terminal group.
[0215] Optionally, in this embodiment, the storage medium is set to store the program code for performing the following steps: the computing device receives a task request sent by the virtual machine, wherein the virtual machine is configured with a corresponding virtual function in the computing device, and at least the functions required for the task are included in the task request; the computing device determines whether the virtual function corresponding to the virtual machine allows the execution of the functions required for the task; in the case where the virtual function corresponding to the virtual machine allows the execution of the functions required for the task, the computing device processes the task request through the computing unit.
[0216] Optionally, in this embodiment, the storage medium is set to store the program code for performing the following steps: after generating a virtual machine on the host, the computing device configures a corresponding virtual function for the virtual machine and generates configuration information for indicating the virtual function.
[0217] Optionally, in this embodiment, the storage medium is set to store the program code for performing the following steps: the computing device detects whether the configuration information of the virtual machine includes the functions required for the task; if the configuration information of the virtual machine includes the functions required for the task, it is determined that the virtual function corresponding to the virtual machine allows the execution of the functions required for the task.
[0218] Optionally, in this embodiment, the storage medium is set to store the program code for performing the following steps: the computing device obtains the task request from the task request queue, wherein the virtual machine stores the task request in the task request queue, and the task request queue is stored in the cache of the storage resources allocated by the host for the virtual machine.
[0219] Optionally, in this embodiment, the storage medium is set to store the program code for performing the following steps: the computing device writes the task response information obtained by processing the task request into the task response queue, wherein the task response queue is stored in the cache of the storage resources allocated by the host for the virtual machine.
[0220] Optionally, the above-mentioned processor may also execute the program code of the following steps: The computing device obtains a task request from the task request queue; the computing device parses the task request to obtain input data information and storage resource information; the computing device migrates the input data from the input data buffer of the virtual machine indicated by the input data information to the storage resource indicated by the storage resource information.
[0221] Optionally, in this embodiment, the storage medium is configured to store program code for performing the following steps: The computing device parses the task request to obtain output data information; the computing device outputs the task response information from the storage resource of the computing device to the task response queue of the virtual machine, and outputs the output data to the output data buffer indicated by the output data information.
[0222] Optionally, in this embodiment, the storage medium is configured to store program code for performing the following steps: The above-mentioned computing device obtains the processing power consumed by the above-mentioned virtual function within a preset statistical interval; if the above-mentioned processing power exceeds the processing power allowed to be used by the above-mentioned virtual machine, wait until the next time period and then process the above-mentioned task request.
[0223] Optionally, in this embodiment, the storage medium is configured to store program code for performing the following steps: The above-mentioned computing device monitors whether the storage resources accessed during the operation of the above-mentioned computing unit belong to the storage resources corresponding to the above-mentioned virtual machine; if the judgment result is no, a first error message is generated.
[0224] Optionally, in this embodiment, the storage medium is configured to store program code for performing the following steps: The above-mentioned computing device monitors whether the operation of the above-mentioned computing unit is abnormal; if the operation of the above-mentioned computing unit is abnormal, disconnect the access of the above-mentioned computing unit from the communication link and generate a second error message.
[0225] The serial numbers of the embodiments of the present application above are only for description and do not represent the advantages and disadvantages of the embodiments.
[0226] In the above embodiments of the present application, the descriptions of each embodiment have their own focuses. For the parts not detailed in a certain embodiment, reference may be made to the relevant descriptions of other embodiments.
[0227] In several embodiments provided in the present 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 illustrative. For example, the division of the units is only a logical function division. In actual implementation, there may be other division methods. 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 displayed or discussed couplings or direct couplings or communication connections between each other can be through some interfaces. The indirect couplings or communication connections of units or modules can be in electrical or other forms.
[0228] The units described as separate components may or may not be physically separated. The components displayed as units may or may not be physical units, that is, they can be located in one place or distributed to multiple network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0229] In addition, in each embodiment of the present application, each functional unit can be integrated in a processing unit, or each unit can exist physically alone, or two or more units can be integrated in one unit. The above-mentioned integrated units can be implemented in the form of hardware or in the form of software functional units.
[0230] If the above-mentioned 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 application, in essence, or the part that contributes to the prior art, or all or part of this technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions for causing a computer device (which can be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods described in each embodiment of the present application. The foregoing storage medium includes: various media such as USB flash drives, read-only memories (ROMs), random access memories (RAMs), mobile hard disks, magnetic disks, or optical discs that can store program codes.
[0231] The above is only the preferred embodiment of the present application. It should be noted that for those of ordinary skill in the art, without departing from the principle of the present application, several improvements and refinements can be made, and these improvements and refinements should also be regarded as the protection scope of the present application.
Claims
1. A data processing system, characterized in that, it includes: A host computer running at least one virtual machine, where the virtual machine is configured with corresponding virtual functions in a computing device, and the virtual machine is used to send task requests to the corresponding virtual functions, where at least the functions required for the task are included in the task request; The computing device includes a task scheduler, and the task scheduler receives the task request and determines whether the virtual function corresponding to the virtual machine allows the execution of the functions required for the task; Wherein, when the virtual function corresponding to the virtual machine allows the execution of the functions required for the task, the task scheduler sends the task request to a computing unit for processing, and during the process of computing the task request, the computing unit uses the storage resources pre-allocated to the virtual function for computing.
2. The system according to claim 1, characterized in that, The host computer runs a virtual management application of a virtual machine monitor. After generating a virtual machine on the host computer, the virtual management application configures the computing device by managing physical function devices, generates configuration information, and synchronizes the configuration information to the task scheduler, where the configuration information is used to indicate the virtual function corresponding to the virtual machine.
3. The system according to claim 2, characterized in that, The task scheduler further includes a task request manager, and the task request manager is used to detect whether the functions required for the task are included in the configuration information of the virtual machine. If the functions required for the task are included in the configuration information of the virtual machine, it is determined that the virtual function corresponding to the virtual machine allows the execution of the functions required for the task.
4. The system according to claim 1, characterized in that, The host computer is installed with a virtual function driver, and the virtual machine sends a task request to the corresponding virtual function through the virtual function driver. The virtual function driver is used to cache the task request into a task request queue and notify the task scheduler; The computing device further includes a direct memory access engine, the task scheduler includes a first first-in-first-out memory, and the task scheduler is further used to pull the task request from the task request queue to the first first-in-first-out memory through the direct memory access engine.
5. The system according to claim 4, characterized in that, The task scheduler is further used to obtain the processing power consumed by the virtual function within a preset statistical interval. If the processing power exceeds the processing power allowed to be used by the virtual machine, it waits until the next time period, and then pulls the task request from the task request queue to the first first-in-first-out memory through the direct memory access engine.
6. The system according to claim 4, characterized in that, The system further includes an input / output memory management unit, and the input / output memory management unit is used to control the direct memory access engine to only allow access to the target storage resources in the host computer, where the target storage resources are the storage resources corresponding to the virtual function of the virtual machine in the host computer.
7. The system according to claim 3, wherein, the computing device further includes a computing control module corresponding to the computing unit, and the computing control module is configured to receive a task request allocated by the task request manager, transmit the task request to the computing unit, and monitor the computing process of the computing unit.
8. The system according to claim 7, wherein, the computing device further includes: storage resources corresponding to the virtual machine, and the computing control module is further configured to monitor whether the storage resources accessed during the operation of the computing unit belong to the storage resources corresponding to the virtual machine, and if the judgment result is no, generate a first error message.
9. The system according to claim 7, wherein, the computing control module is further configured to monitor whether the operation of the computing unit is abnormal, and if the operation of the computing unit is abnormal, disconnect the access of the computing unit to the communication link and generate a second error message.
10. The system according to claim 7, wherein, the task scheduler further includes a second first-in-first-out memory, and when the computing control module monitors that the computing unit has completed the calculation, the task response manager writes the task response information output by the computing unit into the second first-in-first-out memory.
11. The system according to claim 10, wherein, the computing device further includes: a direct memory access engine, and the direct memory access engine is configured to obtain the task response information from the second first-in-first-out memory and write the task response information into the task response queue of the virtual machine.
12. The system according to claim 1, wherein, the host further includes: a root complex device of the bus, and the root complex device of the bus is configured to connect the host to the bus structure; the computing device further includes: an endpoint device of the bus, and the endpoint device of the bus is configured to be connected to the bus structure as an endpoint in the bus structure.
13. A data processing method, wherein, it includes: a computing device receives a task request sent by a virtual machine, wherein the virtual machine is configured with a corresponding virtual function in the computing device, and the task request at least includes the function required by the task; the computing device determines whether the virtual function corresponding to the virtual machine allows the execution of the function required by the task; when the virtual function corresponding to the virtual machine allows the execution of the function required by the task, the computing device processes the task request through a computing unit, and the computing unit uses the storage resources pre-allocated to the virtual function for calculation during the calculation of the task request.
14. The method according to claim 13, wherein, before the computing device receives the task request sent by the virtual machine, the method further includes: after generating a virtual machine on the host, the computing device configures a corresponding virtual function for the virtual machine and generates configuration information for indicating the virtual function.
15. The method according to claim 14, wherein, The computing device determines whether the virtual function corresponding to the virtual machine allows the functions required for executing the task, including: The computing device detects whether the configuration information of the virtual machine includes the functions required for the task; If the configuration information of the virtual machine includes the functions required for the task, it is determined that the virtual function corresponding to the virtual machine allows the functions required for executing the task.
16. The method according to claim 13, wherein, The computing device receives a task request sent by a virtual machine, including: the computing device obtains the task request from a task request queue, wherein the virtual machine stores the task request into the task request queue, and the task request queue is stored in a cache of storage resources allocated by a host for the virtual machine; After the computing device processes the task request through a computing unit, the method further includes: the computing device writes task response information obtained by processing the task request into a task response queue, wherein the task response queue is stored in a cache of storage resources allocated by the host for the virtual machine.
17. The method according to claim 16, wherein, The task request further includes: input data information and storage resource information, wherein the input data information includes the input data buffer address of the virtual machine, and the storage resource information is used to indicate the storage resources corresponding to the virtual machine in the computing device. The computing device obtains the task request from the task request queue, including: The computing device obtains the task request from the task request queue; The computing device parses the task request to obtain the input data information and the storage resource information; The computing device migrates the input data from the input data buffer of the virtual machine indicated by the input data information to the storage resources indicated by the storage resource information.
18. The method according to claim 17, wherein, The task request further includes: output data information, and the output data information includes the output data buffer address of the virtual machine. The computing device writes the task response information obtained by processing the task request into the task response queue, including: The computing device parses the task request to obtain the output data information; The computing device outputs the task response information from the storage resources of the computing device to the task response queue of the virtual machine, and outputs the output data to the output data buffer indicated by the output data information.
19. The method according to claim 13, wherein, When the virtual function corresponding to the virtual machine allows the functions required for executing the task, the computing device processes the task request through a computing unit, including: The computing device obtains the processing capacity consumed by the virtual function within a preset statistical interval; If the processing capacity exceeds the processing capacity allowed to be used by the virtual machine, wait until the next time period and then process the task request.
20. The method according to claim 13, wherein, During the process that the computing device processes the task request through a computing unit, the method further includes: The computing device monitors whether the storage resources accessed during the operation of the computing unit belong to the storage resources corresponding to the virtual machine; If the judgment result is negative, a first error message is generated.
21. The method according to claim 13, wherein, During the process that the computing device processes the task request through a computing unit, the method further includes: The computing device monitors whether the operation of the computing unit is abnormal; If the operation of the computing unit is abnormal, the access of the computing unit to the communication link is disconnected, and a second error message is generated.
22. A data processing device, wherein, comprising: a receiving module, configured to receive a task request sent by a virtual machine, wherein the virtual machine is configured with a corresponding virtual function in a computing device, and the task request at least includes the function required for the task; a judging module, configured to judge whether the virtual function corresponding to the virtual machine allows the execution of the function required for the task; a processing module, configured to, when the virtual function corresponding to the virtual machine allows the execution of the function required for the task, process the task request through a computing unit, and the computing unit uses the storage resources pre-allocated to the virtual function for calculation during the calculation process.
23. A storage medium, wherein, The storage medium includes a stored program, and when the program runs, it controls the device where the storage medium is located to execute the data processing method according to any one of claims 13 to 21.
24. A data processing device, comprising: a processor; and a memory, connected to the processor, for providing instructions for the processor to perform the following processing steps: The computing device receives a task request sent by a virtual machine, wherein the virtual machine is configured with a corresponding virtual function in the computing device, and the task request at least includes the function required for the task; The computing device judges whether the virtual function corresponding to the virtual machine allows the execution of the function required for the task; When the virtual function corresponding to the virtual machine allows the execution of the function required for the task, the computing device processes the task request through a computing unit, and the computing unit uses the storage resources pre-allocated to the virtual function for calculation during the calculation process.
Citation Information
Patent Citations
Computer system and memory access device
CN107894913A