[go: up one dir, main page]
More Web Proxy on the site http://driver.im/

CN113032103A - VF (variable frequency) resource dynamic scheduling method based on SR-IOV (scheduling request-input/output) function of high-speed network card - Google Patents

VF (variable frequency) resource dynamic scheduling method based on SR-IOV (scheduling request-input/output) function of high-speed network card Download PDF

Info

Publication number
CN113032103A
CN113032103A CN202110399468.2A CN202110399468A CN113032103A CN 113032103 A CN113032103 A CN 113032103A CN 202110399468 A CN202110399468 A CN 202110399468A CN 113032103 A CN113032103 A CN 113032103A
Authority
CN
China
Prior art keywords
resource object
request
hardware resource
software
hardware
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202110399468.2A
Other languages
Chinese (zh)
Other versions
CN113032103B (en
Inventor
黄旺
刘亚萍
张硕
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Central South University
Peng Cheng Laboratory
Original Assignee
Central South University
Peng Cheng Laboratory
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Central South University, Peng Cheng Laboratory filed Critical Central South University
Priority to CN202110399468.2A priority Critical patent/CN113032103B/en
Publication of CN113032103A publication Critical patent/CN113032103A/en
Application granted granted Critical
Publication of CN113032103B publication Critical patent/CN113032103B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/455Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
    • G06F9/45533Hypervisors; Virtual machine monitors
    • G06F9/45558Hypervisor-specific management and integration aspects
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F13/00Interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
    • G06F13/38Information transfer, e.g. on bus
    • G06F13/42Bus transfer protocol, e.g. handshake; Synchronisation
    • G06F13/4204Bus transfer protocol, e.g. handshake; Synchronisation on a parallel bus
    • G06F13/4221Bus transfer protocol, e.g. handshake; Synchronisation on a parallel bus being an input/output bus, e.g. ISA bus, EISA bus, PCI bus, SCSI bus
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/50Allocation of resources, e.g. of the central processing unit [CPU]
    • G06F9/5061Partitioning or combining of resources
    • G06F9/5077Logical partitioning of resources; Management or configuration of virtualized resources
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/455Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
    • G06F9/45533Hypervisors; Virtual machine monitors
    • G06F9/45558Hypervisor-specific management and integration aspects
    • G06F2009/45579I/O management, e.g. providing access to device drivers or storage
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Software Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Multi Processors (AREA)
  • Stored Programmes (AREA)

Abstract

The invention discloses a VF resource dynamic scheduling method based on a high-speed network card SR-IOV function. The problem that the I/O requirements of all virtual machines cannot be met when the number of the virtual machines is more than the number of the VF due to the fact that the expansibility of the high-speed network card VF with the SR-IOV function is insufficient is solved. The technical scheme is that a resource scheduling system consisting of a resource allocation module and a dynamic scheduling module is constructed; running a resource scheduling system, configuring the VF hardware resources and the VF software resources by a resource configuration module, and constructing VF hardware resource objects and VF software resource objects, wherein the number of the VF software resource objects is greater than that of the VF hardware resources; the dynamic scheduling module dynamically schedules the VF hardware resource object: the invention not only increases the number of VFs, but also solves the problem that the VF distributed to the virtual machine is not matched with the bandwidth requirement of the high-speed network card with the SR-IOV function, and improves the utilization rate of the high-speed network card.

Description

VF (variable frequency) resource dynamic scheduling method based on SR-IOV (scheduling request-input/output) function of high-speed network card
Technical Field
The invention relates to I/O Virtualization in a Virtualization technology, in particular to a VF (virtual function) resource dynamic scheduling method based on a Single Root I/O Virtualization (Single I/O) function of a high-speed network card.
Background
The virtualization technology is a technology for simulating and abstracting computer resources, shields the details of hardware, facilitates the repartitioning and sharing of hardware resources, and improves the utilization rate of the resources. A Virtual Machine Manager (VMM) is a very important component in virtualization. The VMM is a system software that maintains a plurality of efficient, isolated program environments that support users with direct access to real hardware and that can run different operating systems, referred to as guest operating systems. The VMM provides various virtual hardware resources, such as virtual CPUs, virtual memory, and virtual network cards, to the guest operating system in an isolated program environment. A computer system with complete hardware system functions simulated by software in a completely isolated environment is generally called a Virtual Machine (VM). Because the virtual hardware resources are realized by the VMM through software simulation, various virtual hardware provided by the VMM is used by a guest machine operating system in the virtual machine during running, and finally the VMM calls the actual hardware to complete the functions of the virtual hardware.
Virtualization mainly comprises CPU virtualization, memory virtualization and I/O virtualization. I/O virtualization refers primarily to the virtualization of I/O devices. With the improvement of hardware technology, the technology of I/O virtualization is also continuously developing. Currently, there are three main implementation modes for I/O virtualization, namely, full software virtualization, paravirtualization, and hardware-assisted virtualization. Full software virtualization emulates real I/O devices by a device emulation layer in the VMM in a pure software manner. Complete software virtualization adds a device emulation layer in the VMM between the guest operating system and the actual I/O device, so that two data copies are required to complete the interaction between the virtual machine and the I/O device during data transmission, reducing the I/O performance.
The semi-virtualization technology divides the device driver into a front-end driver and a rear-end driver, and the front-end driver and the rear-end driver cooperate to realize I/O virtualization. The back-end driver is located in a privileged virtual machine with I/O privilege and can directly use the I/O equipment, and the front-end driver is located in a non-privileged normal virtual machine. A back-end driver in the privileged virtual machine directly accesses a shared memory of the storage data of the common virtual machine, and then uses the device driver to directly read and write the data without multiple copies, thereby improving the I/O performance. However, the I/O virtualization mode implemented based on the front-end and back-end drivers needs to modify the system kernel of the virtual machine, and the universality is low.
Hardware assisted I/O virtualization refers to offloading of the functionality of partial I/O virtualization to hardware, implemented by hardware. This requires the hardware to have the capability to support I/O virtualization. There are two common hardware-assisted I/O virtualization technologies currently in use: transparent transmission (Passtthroughput I/O) and SR-IOV. The transparent transmission is to directly allocate the hardware device to the virtual machine for use, so that the virtual machine can obtain the best I/O performance when using the I/O device, but if the device is transmitted to the virtual machine, the virtual machine monopolizes the device, and other virtual machines cannot use the device, so that the device loses the shareability.
SR-IOV is a technology for a PCIe (peripheral Component Interconnect express) device to generate a plurality of virtual PCIe devices. PCIe is an extension of PCI (Peripheral Component Interconnect), which is a common bus interface standard. PCIe devices are devices conforming to the PCIe standard, and PCIe devices are a subdivision of PCI devices, and common PCIe devices include a high-speed network card, a video card, and the like. PCIe devices that support SR-IOV technology are referred to as PFs (Physical functions) and Virtual PCIe devices generated by PFs are referred to as VFs (Virtual functions). The PF has full PCIe device functionality and is capable of generating and managing VFs. And VF is a lightweight PCIe device. Both the PF and VF have I/O capabilities and can be assigned to a virtual machine for use as I/O devices. The SR-IOV inherits the transparent transmission technology, and the virtual machine can directly use the VF to perform I/O operation, so that the SR-IOV has very high performance; SR-IOV does not need to modify the kernel of the operating system, so the universality is better; the SR-IOV is capable of generating VFs, giving the device shareability.
The SR-IOV function devices are collectively called SR-IOV devices, the SR-IOV devices are PCIe devices, and in a Linux operating system, the PCI devices and the PCIe devices are managed by a PCI subsystem. The PCI subsystem is a component in the Linux system. When the Linux system is started, the PCI subsystem scans the whole PCI bus and performs corresponding configuration and initialization on all PCI devices mounted on the PCI bus, and the specific steps are as follows:
first step, PCI subsystem addressing and identification: the PCI subsystem manages and organizes all PCI devices in a tree structure, a PCI main Bridge is led out from a Host Bridge connected with a CPU, the PCI main Bridge is connected with a PCI bus 0 and can be directly connected with the PCI devices, or a next-level PCI bus is led out from the PCI Bridge and can be connected with new PCI devices or led out new PCI buses. The PCI subsystem uniquely identifies a PCI Device by its Bus number (Bus), Device number (Device), and Function number (Function). PCI addressing and identification is to scan all PCI buses to find all PCI and PCIe devices through the BDF.
And secondly, PCI equipment is initialized: the PCI device includes 3 addressable spaces: configuration space, I/O space, and memory space. The configuration space contains a lot of configuration information of the device, for example: a manufacturer number, a device number, a function number, a base register, etc. The I/O space records registers of the I/O ports, and the memory space stores data of the device. The PCI subsystem completes initialization by reading the configuration space and then allocating I/O space, memory space and setting the associated registers for each PCI device.
Thirdly, the PCI subsystem registers the PCI equipment: when the PCI subsystem registers a PCI device, a PCI _ dev structure is first allocated to the PCI device to represent the corresponding PCI device. This structure is then populated with information such as the equipment manufacturer number, equipment number, base address, and interrupt number. The PCI _ dev fabric is then mounted on the PCI bus. And the PCI subsystem matches corresponding drivers for the PCI equipment according to the id _ table of the PCI _ dev, and finally registers the PCI equipment to a system kernel by the equipment driver. The PCI device can be used by applications after registering with the system kernel.
The VF is a lightweight PCIe device, and is initialized and configured by the PCI subsystem as in a normal PCIe device. The main resources of the VF comprise a memory space, an I/O space and a configuration space, wherein the memory space is an address space for accessing a memory, the I/O space is an address space for accessing an external device register, the configuration space records basic information (a manufacturer number, a device number, a function number and a base address (BAR including the I/O space and the base address of the memory space) of the VF, the resources of the VF can be logically divided into two parts, namely hardware resources and software resources, the hardware resources are responsible for actually sending and receiving data, and mainly comprise the I/O space and the memory space, the software resources refer to configuration information acquired from the configuration space and are used for guiding a PCI subsystem to construct a PCI _ dev structure of the VF, the information of the hardware resources is recorded in the PCI _ dev structure, and the software resources correspond to the hardware resources one by one.
The SR-IOV technology has good universality, sharing property and high network transmission performance, and provides effective hardware support for the development of I/O virtualization. However, with the rapid increase of the demand for the virtualization I/O technology, the SR-IOV technology also faces some problems, for example, the number of VFs of the SR-IOV is fixed and may be less than the number of virtual machines, and the corresponding number of VFs cannot be flexibly generated according to actual needs. Compared with the I/O virtualization technology implemented by software, the flexibility and compatibility of the SR-IOV are relatively poor.
Although SR-IOV is a very good I/O virtualization solution, SR-IOV also has some problems, and as a hardware-assisted I/O virtualization mode, special hardware support is required: on one hand, the CPU is required to support virtualization technology like VT-d, and on the other hand, the I/O device (such as a network card) is also required to support SR-IOV function. Because the expansibility of the SR-IOV is poor, the number of VFs is fixed, and the corresponding number of VFs cannot be flexibly generated according to actual needs. And the performance of the whole I/O device is evenly distributed by the VFs, and when the requirement of the virtual machine on the SR-IOV device is greater than the number of the VFs which can be provided by the SR-IOV device, the sharing capability of the device cannot be fully exerted. One physical SR-IOV device is commonly referred to as a PF (physical function), from which VFs can be generated.
The high-speed network card with the SR-IOV function is PCIe equipment, wherein PF in the SR-IOV is equivalent to the high-speed network card, and VF is equivalent to a virtual network card in the high-speed network card. The number of VFs which can be generated by the high-speed network card is fixed, the expansibility of the VFs is insufficient, sometimes the number of virtual machines is possibly more than that of the VFs, and the virtual machines at least need one VF and cannot meet the I/O requirements of all the virtual machines. The high-speed network card has good performance and high bandwidth (the bandwidth is 25G, 40G or 100G), and the common virtual machine only needs 1G or even less bandwidth, so that the bandwidth of the VF allocated to the virtual machine can exceed the bandwidth requirement of the virtual machine, and on the other hand, some virtual machines cannot allocate the VF, so that the load is unbalanced.
Disclosure of Invention
The technical problem to be solved by the invention is as follows: aiming at the situation that the expansibility of the high-speed network card VF with the SR-IOV function is insufficient, and the I/O requirements of all virtual machines cannot be met when the number of the virtual machines is more than the VF number, the VF resource dynamic scheduling method based on the SR-IOV function of the high-speed network card is provided, so that on one hand, the number of the VFs is increased, on the other hand, the problem that the bandwidth requirements of the VFs distributed to the virtual machines and the high-speed network card with the SR-IOV function are not matched is solved, and the utilization rate of the high-speed network card.
The technical scheme of the invention is as follows:
the first step is to construct a resource scheduling system, wherein the resource scheduling system is composed of a resource allocation module and a dynamic scheduling module.
The resource allocation module is used for simulating and allocating resources of the VF, runs in a kernel of a Linux operating system, and is connected with the PCI subsystem, the dynamic scheduling module and the high-speed network card. The resource configuration module is an intermediate layer inserted between the PCI subsystem and the hardware network card. In the PCI subsystem described in the background art, the PCI subsystem initializes the PCI device according to the software resource of the VF, and then registers a PCI _ dev fabric body representing the VF in the Linux system kernel. After the resource configuration module is added, the resource configuration module performs initial initialization on the hardware resources and the software resources of the VF, and then transmits the initialized hardware resources and the initialized software resources to the PCI subsystem for subsequent configuration. The resource allocation module decouples the software resources and the hardware resources of the VF, and splits the software resources and the hardware resources, which are originally an integral whole, into two parts, which are abstracted respectively to generate a VF hardware resource object and a VF software resource object, which are placed in a VF hardware resource object queue and a VF software resource object queue, respectively.
The VF hardware resource object is used to describe all the hardware resources of a single VF, which correspond to the actual VF hardware resources one-to-one. The VF hardware resource object includes 4 domains: VF hardware resource object ID, I/O space address, memory space address and whether idle mark. The VF hardware resource object ID is used for identifying a VF hardware resource object, and the VF hardware resource object takes values from 1 and increases in sequence; the I/O space address is the starting address of the I/O space; the memory space address is the initial address of the memory space; whether the idle flag takes a value of 0 or 1, when the idle flag is 0, it indicates that the VF hardware resource object is idle, and when the idle flag is 1, it indicates that the VF hardware resource object is allocated to the VF software resource object. If the SR-IOV device supports N VFs, then N VF hardware resource objects are generated according to the actual VF hardware resources.
The VF software resource objects are used for describing configuration information required by the VF and can be simulated by software, and the resource configuration module simulates and generates M VF software resource objects on the basis of the VF software resources, wherein M is larger than or equal to N, and the number of the VF is enlarged. The VF software resource object comprises 6 domains which are respectively: VF software resource object ID, VF hardware resource object ID, virtual machine ID, number of receive queues, number of send queues, interrupt number. The VF software resource object ID is used for representing a VF software resource object, and the value is taken from 1 and is sequentially increased; when the VF hardware resource ID is-1, the VF software resource object is not allocated to the VF hardware resource object, and when the VF hardware resource object ID is a positive number, the VF software resource object is allocated to the VF hardware resource object; the virtual machine ID indicates which virtual machine the VF software resource object is assigned to, the virtual machine ID being specified by the virtual machine manager; the number of receiving queues and the number of sending queues represent the number of receiving queues and the number of sending queues that the VF software resource object has; the interrupt number indicates an interrupt number applied by the PCI subsystem for the VF software resource object when initializing the VF software resource object, and the interrupt number is allocated by the Linux system.
After the resource configuration module puts the constructed VF hardware resource object and VF software resource object into the VF hardware resource object queue and VF software resource object queue, respectively, the PCI subsystem reads the VF software resource object from the VF software resource object queue, then initializes the VF software resource object, generates a PCI _ dev structure, and registers the PCI _ dev structure in the Linux system kernel.
And when the virtual machine manager creates the virtual machine, the virtual machine manager allocates the pci _ dev structure corresponding to the VF software resource object to the virtual machine. When the virtual machine uses VF to carry out I/O transmission, an I/O transmission request is sent to a VF software resource object of a resource configuration module through a pci _ dev structural body corresponding to the VF, and if the VF software resource object has a corresponding VF hardware resource object, VF hardware resources are called through the VF hardware resource object to carry out transmission; if the VF software resource object does not have the VF hardware resource object, send a "VF hardware resource object allocation request" to the dynamic scheduling module, where the content of the VF hardware resource object allocation request is: request ID, VF software resource object ID, enqueue time, priority. The request ID is a request number distributed to the VF hardware resource object; the VF software resource object ID represents the request initiated by which VF software resource object; the enqueue time represents the time when the request is put into the request queue and is used for calculating the priority; the priority indicates that the priority of the VF hardware resource objects is obtained by the VF hardware resource object allocation request, and the priority is higher when the waiting time is longer.
The dynamic scheduling module is used for managing and scheduling VF hardware resources, runs in a Linux operating system kernel, and is connected with the PCI subsystem and the resource configuration module. The dynamic scheduling module manages two queues, a processed request queue and an unprocessed request queue. The dynamic scheduling module receives a VF hardware resource object allocation request (hereinafter referred to as a request) from the resource configuration module, and puts the unprocessed VF hardware resource object allocation request into an unprocessed request queue. The method comprises the steps that a dynamic scheduling module processes requests in an unprocessed request queue according to the first-in first-out sequence, takes out a request at the head of the queue, obtains VF hardware resource objects in a VF hardware resource object queue in a resource configuration module, judges the use condition of the VF hardware resource objects, distributes the idle VF hardware resource objects to VF software resource objects if the VF hardware resource objects exist in the VF hardware resource object queue, and then puts the requests into a processed queue; if there is no free VF hardware resource object in the VF hardware resource object queue in the resource configuration module, circularly accessing each processed request in the processed request queue, obtaining the priority of the processed request, comparing with the priority of the current request (i.e. the request at the head of the queue taken out from the unprocessed request queue), if the priority of the processed request is lower than the current request, the current request preempts the VF hardware resource object of the processed request, otherwise, the current request is put into the unprocessed request queue again, and waits for the next processing. The dynamic scheduling module processes requests in the unprocessed queue in a loop.
And secondly, operating the resource scheduling system, and configuring the VF hardware resources and the VF software resources by the resource configuration module to construct a VF hardware resource object and a VF software resource object. The specific method comprises the following steps:
2.1 the resource configuration module creates and initializes N VF hardware resource objects, and stores the N VF hardware resource objects into the VF hardware resource object queue, where N is the number of VFs supported and generated by SR-IOV (the number of VFs is recorded in the configuration space of PF), the method is:
2.1.1 initialization variable n is 1.
2.1.2 reads the configuration information of the nth VF. The resource configuration module reads the nth VF configuration information of the configuration space according to bytes through APIppi _ read _ configuration _ word (), wherein the configuration information comprises a manufacturer number, a device number, a function number and a base address (BAR, the maximum number of 6 different base addresses) of the VF, the manufacturer number is used for identifying which manufacturer the VF is produced, the device number and the function number are unique identifiers of the VF in the PCI subsystem, and the base address is a memory space and a starting address of the I/O space (I/O and memory are separately addressed under an x86 architecture).
2.1.3 create and initialize the nth VF hardware resource object: the resource allocation module assigns the VF configuration information acquired in the step 2.1 to each domain in the nth VF hardware resource object respectively, wherein the VF hardware resource object ID of the nth VF hardware resource object is assigned as n; the memory space address of the nth VF hardware resource object is assigned as BAR [0] + VF configuration space size x (n-1), and the VF configuration space size is defined in a VF drive header file; the I/O space address assignment of the nth VF hardware resource object is BAR [1] + VF configuration space size (n-1); the idle flag is assigned to 0.
The 2.1.4 resource configuration module stores the initialized nth VF hardware resource object into the VF hardware resource object queue.
2.1.5 making N ═ N +1, if N > N, jump to step 2.2; otherwise, jump to step 2.1.2.
To this end, the N VF hardware resource objects are created and initialized in sequence.
2.2 the resource configuration module creates and initializes M VF software resource objects and stores the M VF software resource objects into the VF software resource object queue, M is the number of VF software resource objects, M is specified according to the requirement and should be larger than the number of VF hardware resourcesNThereby achieving the effect of increasing the number of VFs. The method comprises the following steps:
2.2.1 writing the number M of VF software resource objects needing to be generated into a sriov _ numvfs file under a/sys/class/net/[ PF _ NAME ]/device/directory in the Linux system, wherein PF _ NAME is the NAME of PF (PF, namely high-speed network card), and the PCI subsystem appoints the PF when initializing and configuring the PF.
2.2.2 initialization variable m is 1.
2.2.3 creating the mth VF software resource object and initializing, the method is: assigning the ID of the mth VF software resource object to m; the VF hardware resource object ID is assigned to-1.
2.2.4 enqueue the initialized mth VF software resource object into the VF software resource management queue.
2.2.5 making M ═ M +1, if M > M, jump to step 2.3; otherwise, jump to step 2.2.3.
To this end, the M VF software resource objects are created and initialized in sequence.
2.3 the PCI subsystem creates and initializes M PCI _ dev structures, registers PCI _ dev to the Linux system kernel, and further initializes the VF software resource object. The method comprises the following steps:
2.3.1 initialize variable k equal to 1.
2.3.2 reads the contents of the kth VF software resource object in the VF software resource object queue.
2.3.3 creating the kth pci _ dev structure and initializing the kth pci _ dev structure, wherein the method comprises the following steps: the devfn of the kth pci _ dev structure is assigned to k.
2.3.4 further initialize the k-th VF software resource object by: and assigning the number of receiving queues of the kth VF software resource object to the number of receiving queues num _ rx _ queues determined by the PCI subsystem, assigning the number of sending queues to the number of sending queues num _ tx _ queues determined by the PCI subsystem, and assigning the number of interrupt numbers to the interrupt numbers irq distributed by the Linux system, wherein num _ rx _ queues and num _ tx _ queues are determined by the PCI subsystem according to the number of cores of system CPUs and the number of generated VFs, and the larger the number of cores of the CPUs or the smaller the number of VFs, the larger the numbers of num _ rx _ queues and num _ tx _ queues.
2.3.5 register pci _ dev into the Linux system kernel.
2.3.6 let k equal to k +1, if k > M, go to step 2.4; otherwise, jump to step 2.3.2.
To this end, M pci _ dev structures are created and initialized in sequence, and M VF software resource objects are further initialized.
2.4 the virtual machine manager creates M virtual machines and assigns a pci _ dev structure to each virtual machine. The method comprises the following steps:
2.4.1 initialization variable l ═ 1.
2.4.2, creating an l-th virtual machine, acquiring a virtual machine number allocated to the virtual machine by the virtual machine manager, and then allocating the l-th PCI _ dev structural body registered in the Linux system kernel to the virtual machine.
2.4.3 read the l VF software resource object of the VF software resource object queue.
2.4.4 initialize the virtual machine ID of the ith VF software resource object, the method is: and assigning the virtual machine ID of the ith VF software resource object to be the virtual machine number obtained by 2.4.2.
2.4.5 let l ═ l +1, if l > M, jump to step 2.5; otherwise, jump to step 2.4.2.
2.5 the virtual machine judges whether I/O transmission is needed, if so, an I/O request is created, the I/O request comprises the virtual machine number of the virtual machine, the I/O request is sent to the virtual machine manager, and 2.6 is switched; if not, go to 2.5.
2.6 the virtual machine manager receives the I/O request sent by the virtual machine and sends the I/O request to the PCI subsystem.
2.7 the PCI subsystem receives the I/O request sent by the virtual machine manager and then sends the I/O request to the resource allocation module.
2.8 the resource allocation module receives the I/O request sent by the PCI subsystem, processes the I/O request according to the principle of first-come first-served, and comprises the following steps:
2.8.1 read the virtual machine number in the I/O request.
2.8.2 access the VF software resource object at the head of the VF software resource object queue in the resource configuration module.
2.8.2 reads the virtual machine ID in the VF software resource object.
2.8.3, judging whether the virtual machine ID of the VF software resource object read in 2.8.2 is equal to the virtual machine number read in 2.8.1, and if not, jumping to 2.8.4; jump to 2.8.5 if equal;
2.8.4 access the next VF software resource object in the VF software resource object queue and then jump to 2.8.2.
2.8.5 reads the VF hardware resource ID of the VF software resource object.
2.8.6, judging whether the VF software resource object obtains the VF hardware resource object, if the VF hardware resource ID of the VF software resource object is a positive number, if so, indicating that the VF hardware resource object is obtained, and jumping to 2.8.7; if the VF hardware resource ID of the VF software resource object is-1, indicating that the VF hardware resource object was not obtained, we proceed to 2.8.8.
2.8.7 the PCI subsystem calls the VF hardware resources of the VF software resource object for I/O transfer.
2.8.8 creates and initializes a VF hardware resource object allocation request (hereinafter referred to simply as a request), assigns the request ID of the VF hardware resource object allocation request to i (i equals the last request ID +1), assigns the VF software object ID to the VF software resource object in 2.8.6, assigns the queuing time to 0, and assigns the priority to 0.
2.8.9 sends a "VF hardware resource object allocation request" to the dynamic scheduling module.
Thirdly, the dynamic scheduling module dynamically schedules the VF hardware resource object:
3.1 the dynamic scheduling module receives the VF hardware resource allocation request from the resource allocation module, assigns the enqueue time in the VF hardware resource allocation request as the current system time, and then stores the VF hardware resource allocation request into the unprocessed request queue.
3.2 the dynamic scheduling module processes the VF hardware resource allocation requests in the unprocessed request queue in a loop. The method comprises the following specific steps:
3.2.1 the dynamic scheduling module judges whether the unprocessed request queue is empty, if so, the unprocessed request queue is not processed, the 3.2.1 is directly switched to, and unprocessed requests are waited for; if not, jump to step 3.2.2.
3.2.2 the dynamic scheduling module takes out VF hardware resource allocation requests from the head of the pending request queue.
3.2.3 the dynamic scheduling module circularly accesses the VF hardware resource object queue, reads whether the flag in the VF hardware resource object is idle to search the idle VF hardware resource object. The method comprises the following specific steps:
and 3.2.3.1, reading the VF hardware resource object at the head of the VF hardware resource object queue by the dynamic scheduling module.
3.2.3.2 the dynamic scheduling module reads whether the VF hardware resource object is idle, if it is 1, it indicates that the read VF hardware resource object is not idle, and then it goes to step 3.2.3.3; if the result is 0, the read VF hardware resource object is free, and the step 3.2.4 is skipped.
3.2.3.3 the dynamic scheduling module judges whether the current VF hardware resource object is at the tail of the VF hardware resource object queue, if not, jumps to step 3.2.3.4; if it is at the end of the queue, go to step 3.2.8.
3.2.3.4 the dynamic scheduling module reads the next VF hardware resource object in the VF hardware resource object queue. Jump to step 3.2.3.2.
3.2.4 the dynamic scheduling module allocates the read VF hardware resource object to the VF software resource object, the method is: the dynamic scheduling module finds the corresponding VF software resource object according to the VF software resource object ID in the VF hardware resource object allocation request; setting the VF hardware resource object ID of the VF software resource object as the current accessed VF hardware resource object ID; the IDLE flag of the current VF hardware resource object is set to 1.
3.2.5 the dynamic scheduling module puts the 3.2.4 processed "VF hardware resource object allocation request to the end of queue of the processed request queue and assigns the enqueue time of the" VF hardware resource object allocation request "to the current system time.
3.2.6 the dynamic scheduling module determines whether the pending request queue is empty. If the queue is empty, no processing is carried out, jumping to 3.2.1, and waiting for an unprocessed request queue to have an unprocessed request; if not, go to step 3.2.7.
3.2.7 the dynamic scheduling module takes out the next unprocessed VF hardware resource object allocation request and jumps to step 3.2.3.
3.2.8 the dynamic scheduling module looks for low priority requests among the processed requests. The dynamic scheduling module calculates the priority of the current 'VF hardware resource object allocation request', circularly accesses the processed request queue, reads the priority of the processed VF hardware resource object allocation request, and finds out the processed request with the priority lower than that of the current request. The method comprises the following specific steps:
3.2.8.1 the dynamic scheduling module calculates priority of unprocessed requests by: and acquiring the current system time and the enqueue time of the unprocessed request, wherein the priority of the unprocessed request is the current system time-the enqueue time, and assigning the calculated result to the priority of the unprocessed request.
3.2.8.2 the dynamic scheduling module accesses the VF hardware resource object allocation request at the head of the processed request queue.
3.2.8.3 the dynamic scheduling module calculates the priority of the processed request. And acquiring the current system time, the enqueue time of the processed request and the priority of the processed request, wherein the priority of the processed request is the priority of the processed request, the current system time and the enqueue time, and assigning the calculated result to the priority of the processed request.
3.2.8.4 the dynamic scheduling module compares the priority of the unprocessed request with the priority of the processed request, the higher the value of the priority, if the priority of the unprocessed request is lower than the priority of the processed request, it jumps to step 3.2.8.5. If the unprocessed request is of higher priority, the process proceeds to step 3.2.9.
3.2.8.5 the dynamic scheduling module judges whether the current processed request is at the end of the queue, if not, it jumps to step 3.2.8.6; if it is at the end of the queue, the unprocessed request is placed back into the end of the unprocessed request queue, and the process proceeds to step 3.2.8.7.
3.2.8.6 the dynamic scheduling module accesses the next VF hardware resource object allocation request in the processed request queue and jumps to step 3.2.8.3.
3.2.8.7 the dynamic scheduling module restores the outstanding requests to the outstanding requests queue and moves to 3.2.8.1 to await the next transaction.
3.2.9 the dynamic scheduling module deprives the VF hardware resource objects of processed requests to allocate to currently unprocessed requests. The method comprises the following specific steps:
3.2.9.1 the dynamic scheduling module obtains the VF software resource object that has processed the request, which is denoted as VF software resource object A.
3.2.9.2 the dynamic scheduling module obtains the VF software resource object that has not processed the request, and records it as VF software resource object B.
3.2.9.3 the dynamic scheduling module assigns the VF software resource object ID of the VF software resource object B to the VF hardware resource object ID of the VF software resource object A, and then assigns the VF hardware resource object ID of the VF software resource object A to-1.
3.2.9.4 the dynamic scheduling module fetches the currently accessed processed request from the processed request queue and releases the system memory resources occupied by the processed request. Proceed to step 3.2.5.
Once the resource allocation module and the dynamic scheduling module are started, the resource allocation module and the dynamic scheduling module are operated until the two modules are stopped. The dynamic scheduling module will continue to process the unprocessed requests in the unprocessed request queue, and the dynamic scheduling module waits until the unprocessed request queue receives a new unprocessed request when the unprocessed request queue is empty. The whole process is therefore in a continuous loop once started. If the system does not break down, the invention is a dead loop which is continuously operated.
Compared with the prior art, the invention has the following advantages:
1. the invention increases the number of VF in step 2.2. Aiming at the high-speed network card with the SR-IOV function, the limit of original hardware on the number of VFs is eliminated through the dynamic scheduling of the VF resources, and the number of the VFs can be specified according to the number of the virtual machines.
2. The high-speed network card with the SR-IOV function has good performance and high bandwidth (the bandwidth is 25G, 40G or 100G), while the common virtual machine only needs 1G or even less bandwidth, so that VF allocated to the virtual machine can exceed the bandwidth requirement of the virtual machine, and on the other hand, some virtual machines cannot allocate VF, so that the performance of the high-speed network card cannot be fully utilized. The invention divides the high-speed network card into more VFs with smaller bandwidth, thereby improving the utilization rate of the high-speed network card.
Drawings
FIG. 1 is a logic structure diagram of a resource scheduling system constructed in the first step of the present invention;
fig. 2 is a general flow diagram of the present invention.
Detailed Description
The invention is described in detail below with reference to the accompanying drawings:
the general process of the invention is shown in fig. 2, and comprises the following steps:
firstly, a resource scheduling system is constructed, and the resource scheduling system is composed of a resource allocation module and a dynamic scheduling module as shown in fig. 1.
The resource allocation module is used for simulating and allocating resources of the VF, runs in a kernel of a Linux operating system, and is connected with the PCI subsystem, the dynamic scheduling module and the high-speed network card. The resource configuration module is an intermediate layer inserted between the PCI subsystem and the hardware network card. The resource allocation module performs initial initialization on the hardware resources and the software resources of the VF, and then transmits the initialized hardware resources and software resources to the PCI subsystem. The resource allocation module decouples the software resources and the hardware resources of the VF, and splits the software resources and the hardware resources, which are originally an integral whole, into two parts, which are abstracted respectively to generate a VF hardware resource object and a VF software resource object, which are placed in a VF hardware resource object queue and a VF software resource object queue, respectively.
The VF hardware resource object is used to describe all the hardware resources of a single VF, which correspond to the actual VF hardware resources one-to-one. The VF hardware resource object includes 4 domains: VF hardware resource object ID, I/O space address, memory space address and whether idle mark. The VF hardware resource object ID is used for identifying a VF hardware resource object, and the VF hardware resource object takes values from 1 and increases in sequence; the I/O space address is the starting address of the I/O space; the memory space address is the initial address of the memory space; whether the idle flag takes a value of 0 or 1, when the idle flag is 0, it indicates that the VF hardware resource object is idle, and when the idle flag is 1, it indicates that the VF hardware resource object is allocated to the VF software resource object. If the SR-IOV device supports N VFs, then N VF hardware resource objects are generated according to the actual VF hardware resources.
The VF software resource objects are used for describing configuration information required by the VF and can be simulated by software, and the resource configuration module simulates and generates M VF software resource objects on the basis of the VF software resources, wherein M is larger than or equal to N, and the number of the VF is enlarged. The VF software resource object comprises 6 domains which are respectively: VF software resource object ID, VF hardware resource object ID, virtual machine ID, number of receive queues, number of send queues, interrupt number. The VF software resource object ID is used for representing a VF software resource object, and the value is taken from 1 and is sequentially increased; when the VF hardware resource ID is-1, the VF software resource object is not allocated to the VF hardware resource object, and when the VF hardware resource object ID is a positive number, the VF software resource object is allocated to the VF hardware resource object; the virtual machine ID indicates which virtual machine the VF software resource object is assigned to, the virtual machine ID being specified by the virtual machine manager; the number of receiving queues and the number of sending queues represent the number of receiving queues and the number of sending queues that the VF software resource object has; the interrupt number indicates an interrupt number applied by the PCI subsystem for the VF software resource object when initializing the VF software resource object, and the interrupt number is allocated by the Linux system.
After the resource configuration module puts the constructed VF hardware resource object and VF software resource object into the VF hardware resource object queue and VF software resource object queue, respectively, the PCI subsystem reads the VF software resource object from the VF software resource object queue, then initializes the VF software resource object, generates a PCI _ dev structure, and registers the PCI _ dev structure in the Linux system kernel.
And when the virtual machine manager creates the virtual machine, the virtual machine manager allocates the pci _ dev structure corresponding to the VF software resource object to the virtual machine. When the virtual machine uses VF to carry out I/O transmission, an I/O transmission request is sent to a VF software resource object of a resource configuration module through a pci _ dev structural body corresponding to the VF, and if the VF software resource object has a corresponding VF hardware resource object, VF hardware resources are called through the VF hardware resource object to carry out transmission; if the VF software resource object does not have the VF hardware resource object, send a "VF hardware resource object allocation request" to the dynamic scheduling module, where the content of the VF hardware resource object allocation request is: request ID, VF software resource object ID, enqueue time, priority. The request ID is a request number distributed to the VF hardware resource object; the VF software resource object ID represents the request initiated by which VF software resource object; the enqueue time represents the time when the request is put into the request queue and is used for calculating the priority; the priority indicates that the priority of the VF hardware resource objects is obtained by the VF hardware resource object allocation request, and the priority is higher when the waiting time is longer.
The dynamic scheduling module is used for managing and scheduling VF hardware resources, runs in a Linux operating system kernel, and is connected with the PCI subsystem and the resource configuration module. The dynamic scheduling module manages two queues, a processed request queue and an unprocessed request queue. The dynamic scheduling module receives a VF hardware resource object allocation request (hereinafter referred to as a request) from the resource configuration module, and puts the unprocessed VF hardware resource object allocation request into an unprocessed request queue. The method comprises the steps that a dynamic scheduling module processes requests in an unprocessed request queue according to the first-in first-out sequence, takes out a request at the head of the queue, obtains VF hardware resource objects in a VF hardware resource object queue in a resource configuration module, judges the use condition of the VF hardware resource objects, distributes the idle VF hardware resource objects to VF software resource objects if the VF hardware resource objects exist in the VF hardware resource object queue, and then puts the requests into a processed queue; if there is no free VF hardware resource object in the VF hardware resource object queue in the resource configuration module, circularly accessing each processed request in the processed request queue, obtaining the priority of the processed request, comparing with the priority of the current request (i.e. the request at the head of the queue taken out from the unprocessed request queue), if the priority of the processed request is lower than the current request, the current request preempts the VF hardware resource object of the processed request, otherwise, the current request is put into the unprocessed request queue again, and waits for the next processing. The dynamic scheduling module processes requests in the unprocessed queue in a loop.
And secondly, the resource configuration module configures the VF hardware resources and the VF software resources to construct a VF hardware resource object and a VF software resource object. The specific method comprises the following steps:
2.1 the resource configuration module creates and initializes N VF hardware resource objects, and stores the N VF hardware resource objects into the VF hardware resource object queue, where N is the number of VFs supported and generated by SR-IOV (the number of VFs is recorded in the configuration space of PF), the method is:
2.1.1 initialization variable n is 1.
2.1.2 reads the configuration information of the nth VF. The resource configuration module reads configuration information of the nth VF in the configuration space according to bytes through an API (PCI _ read _ configuration _ word ()) provided by the PCI subsystem, wherein the configuration information comprises a manufacturer number, a device number, a function number and a base address (BAR, the maximum number of 6 different base addresses) of the VF, the manufacturer number is used for identifying which manufacturer the VF is produced, the device number and the function number are unique identifiers of the VF in the PCI subsystem, and the base address is a memory space and a starting address of the I/O space (I/O and memory are separately addressed under an x86 architecture).
2.1.3 create and initialize the nth VF hardware resource object: the resource allocation module assigns the VF configuration information acquired in the step 2.1.2 to each domain in the nth VF hardware resource object respectively, wherein the VF hardware resource object ID of the nth VF hardware resource object is assigned as n; the memory space address of the nth VF hardware resource object is assigned as BAR [0] + VF configuration space size x (n-1), and the VF configuration space size is defined in a VF drive header file; the I/O space address assignment of the nth VF hardware resource object is BAR [1] + VF configuration space size (n-1); the idle flag is assigned to 0.
The 2.1.4 resource configuration module stores the initialized nth VF hardware resource object into the VF hardware resource object queue.
2.1.5 making N ═ N +1, if N > N, jump to step 2.2; otherwise, jump to step 2.1.2.
To this end, the N VF hardware resource objects are created and initialized in sequence.
2.2 the resource configuration module creates and initializes M VF software resource objects and stores the M VF software resource objects into the VF software resource object queue, M is the number of VF software resource objects, M is specified according to the requirement and should be larger than the number of VF hardware resourcesNThereby achieving the effect of increasing the number of VFs. The method comprises the following steps:
2.2.1 writing the number M of VF software resource objects needing to be generated into a sriov _ numvfs file under a/sys/class/net/[ PF _ NAME ]/device/directory in the Linux system, wherein PF _ NAME is the NAME of PF (PF, namely high-speed network card), and the PCI subsystem appoints the PF when initializing and configuring the PF.
2.2.2 initialization variable m is 1.
2.2.3 creating the mth VF software resource object and initializing, the method is: assigning the ID of the mth VF software resource object to m; the VF hardware resource object ID is assigned to-1.
2.2.4 enqueue the initialized mth VF software resource object into the VF software resource management queue.
2.2.5 making M ═ M +1, if M > M, jump to step 2.3; otherwise, jump to step 2.2.3.
To this end, the M VF software resource objects are created and initialized in sequence.
2.3 the PCI subsystem creates and initializes M PCI _ dev structures, registers PCI _ dev to the Linux system kernel, and further initializes the VF software resource object. The method comprises the following steps:
2.3.1 initialize variable k equal to 1.
2.3.2 reads the contents of the kth VF software resource object in the VF software resource object queue.
2.3.3 creating the kth pci _ dev structure and initializing the kth pci _ dev structure, wherein the method comprises the following steps: the devfn of the kth pci _ dev structure is assigned to k.
2.3.4 further initialize the k-th VF software resource object by: assigning the number of receiving queues of the kth VF software resource object to the number num _ rx _ queues determined by the PCI subsystem, assigning the number of sending queues to the number num _ tx _ queues determined by the PCI subsystem, and assigning the interrupt number to the interrupt number irq distributed by the Linux system;
2.3.5 register pci _ dev into the Linux system kernel.
2.3.6 let k equal to k +1, if k > M, go to step 2.4; otherwise, jump to step 2.3.2.
To this end, M pci _ dev structures are created and initialized in sequence, and M VF software resource objects are further initialized.
2.4 the virtual machine manager creates M virtual machines and assigns a pci _ dev structure to each virtual machine. The method comprises the following steps:
2.4.1 initialization variable l ═ 1.
2.4.2, creating an l-th virtual machine, acquiring a virtual machine number allocated to the virtual machine by the virtual machine manager, and then allocating the l-th PCI _ dev structural body registered in the Linux system kernel to the virtual machine.
2.4.3 read the l VF software resource object of the VF software resource object queue.
2.4.4 initialize the virtual machine ID of the ith VF software resource object, the method is: and assigning the virtual machine ID of the ith VF software resource object to be the virtual machine number obtained by 2.4.2.
2.4.5 let l ═ l +1, if l > M, jump to step 2.5; otherwise, jump to step 2.4.2.
2.5 the virtual machine judges whether I/O transmission is needed, if so, an I/O request is created, the I/O request comprises the virtual machine number of the virtual machine, the I/O request is sent to the virtual machine manager, and 2.6 is switched; if not, turning to 2.5;
2.6 the virtual machine manager receives the I/O request sent by the virtual machine and sends the I/O request to the PCI subsystem.
2.7 the PCI subsystem receives the I/O request sent by the virtual machine manager and then sends the I/O request to the resource allocation module.
2.8 the resource allocation module receives the I/O request sent by the PCI subsystem and processes the I/O request according to the sequence of first-come first-processed, the concrete steps are as follows:
2.8.1 read the virtual machine number in the I/O request.
2.8.2 access the VF software resource object at the head of the VF software resource object queue in the resource configuration module.
2.8.2 reads the virtual machine ID in the VF software resource object.
2.8.3, judging whether the virtual machine ID of the VF software resource object read in 2.8.2 is equal to the virtual machine ID read in 2.8.1, and if not, jumping to 2.8.4; jump to 2.8.5 if equal;
2.8.4 access the next VF software resource object in the VF software resource object queue and then jump to 2.8.2.
2.8.5 reads the VF hardware resource ID of the VF software resource object.
2.8.6, judging whether the VF software resource object obtains the VF hardware resource object, if the VF hardware resource ID of the VF software resource object is a positive number, indicating that the VF hardware resource object is obtained, and jumping to 2.8.7; if the VF hardware resource ID of the VF software resource object is-1, indicating that the VF hardware resource object was not obtained, we proceed to 2.8.8.
2.8.7 the PCI subsystem calls the VF hardware resources of the VF software resource object for I/O transfer.
2.8.8 creates and initializes a VF hardware resource object allocation request (hereinafter referred to simply as a request), assigns the request ID of the VF hardware resource object allocation request to i (i equals the last request ID +1), assigns the VF software object ID to the VF software resource object in 2.8.6, assigns the queuing time to 0, and assigns the priority to 0.
2.8.9 sends a "VF hardware resource object allocation request" to the dynamic scheduling module.
Thirdly, the dynamic scheduling module dynamically schedules the VF hardware resource object:
3.1 the dynamic scheduling module receives the VF hardware resource allocation request from the resource allocation module, assigns the enqueue time in the VF hardware resource allocation request as the current system time, and then stores the VF hardware resource allocation request into the unprocessed request queue.
3.2 the dynamic scheduling module processes the VF hardware resource allocation requests in the unprocessed request queue in a loop. The method comprises the following specific steps:
3.2.1 the dynamic scheduling module judges whether the unprocessed request queue is empty, if so, the unprocessed request queue is not processed, the 3.2.1 is directly switched to, and unprocessed requests are waited for; if not, jump to step 3.2.2.
3.2.2 the dynamic scheduling module takes out VF hardware resource allocation requests from the head of the pending request queue.
3.2.3 the dynamic scheduling module circularly accesses the VF hardware resource object queue, reads whether the flag in the VF hardware resource object is idle to search the idle VF hardware resource object. The method comprises the following specific steps:
and 3.2.3.1, reading the VF hardware resource object at the head of the VF hardware resource object queue by the dynamic scheduling module.
3.2.3.2 the dynamic scheduling module reads whether the VF hardware resource object is idle, if it is 1, it indicates that the read VF hardware resource object is not idle, and then it goes to step 3.2.3.3; if the result is 0, the read VF hardware resource object is free, and the step 3.2.4 is skipped.
3.2.3.3 the dynamic scheduling module judges whether the current VF hardware resource object is at the tail of the VF hardware resource object queue, if not, jumps to step 3.2.3.4; if it is at the end of the queue, go to step 3.2.8.
3.2.3.4 the dynamic scheduling module reads the next VF hardware resource object in the VF hardware resource object queue. Jump to step 3.2.3.2.
3.2.4 the dynamic scheduling module allocates the read VF hardware resource object to the VF software resource object, the method is: the dynamic scheduling module finds the corresponding VF software resource object according to the VF software resource object ID in the VF hardware resource object allocation request; setting the VF hardware resource object ID of the VF software resource object as the current accessed VF hardware resource object ID; the IDLE flag of the current VF hardware resource object is set to 1.
3.2.5 the dynamic scheduling module puts the 3.2.4 processed "VF hardware resource object allocation request to the end of queue of the processed request queue and assigns the enqueue time of the" VF hardware resource object allocation request "to the current system time.
3.2.6 the dynamic scheduling module determines whether the pending request queue is empty. If the queue is empty, no processing is carried out, jumping to 3.2.1, and waiting for an unprocessed request queue to have an unprocessed request; if not, go to step 3.2.7.
3.2.7 the dynamic scheduling module takes out the next unprocessed VF hardware resource object allocation request and jumps to step 3.2.3.
3.2.8 the dynamic scheduling module looks for low priority requests among the processed requests. The dynamic scheduling module calculates the priority of the current 'VF hardware resource object allocation request', circularly accesses the processed request queue, reads the priority of the processed VF hardware resource object allocation request, and finds out the processed request with the priority lower than that of the current request. The method comprises the following specific steps:
3.2.8.1 the dynamic scheduling module calculates priority of unprocessed requests by: and acquiring the current system time and the enqueue time of the unprocessed request, wherein the priority of the unprocessed request is the current system time-the enqueue time, and assigning the calculated result to the priority of the unprocessed request.
3.2.8.2 the dynamic scheduling module accesses the VF hardware resource object allocation request at the head of the processed request queue. 3.2.8.3 the dynamic scheduling module calculates the priority of the processed request. And acquiring the current system time, the enqueue time of the processed request and the priority of the processed request, wherein the priority of the processed request is the priority of the processed request, the current system time and the enqueue time, and assigning the calculated result to the priority of the processed request.
3.2.8.4 the dynamic scheduling module compares the priority of the unprocessed request with the priority of the processed request, the higher the value of the priority, if the priority of the unprocessed request is lower than the priority of the processed request, it jumps to step 3.2.8.5. If the unprocessed request is of higher priority, the process proceeds to step 3.2.9.
3.2.8.5 the dynamic scheduling module judges whether the current processed request is at the end of the queue, if not, it jumps to step 3.2.8.6; if it is at the end of the queue, the unprocessed request is placed back into the end of the unprocessed request queue, and the process proceeds to step 3.2.8.7.
3.2.8.6 the dynamic scheduling module accesses the next VF hardware resource object allocation request in the processed request queue and jumps to step 3.2.8.3.
3.2.8.7 the dynamic scheduling module restores the outstanding requests to the outstanding requests queue and moves to 3.2.8.1 to await the next transaction.
3.2.9 the dynamic scheduling module deprives the VF hardware resource objects of processed requests to allocate to currently unprocessed requests. The method comprises the following specific steps:
3.2.9.1 the dynamic scheduling module obtains the VF software resource object that has processed the request, which is denoted as VF software resource object A.
3.2.9.2 the dynamic scheduling module obtains the VF software resource object that has not processed the request, and records it as VF software resource object B.
3.2.9.3 the dynamic scheduling module assigns the VF software resource object ID of the VF software resource object B to the VF hardware resource object ID of the VF software resource object A, and then assigns the VF hardware resource object ID of the VF software resource object A to-1.
3.2.9.4 the dynamic scheduling module fetches the currently accessed processed request from the processed request queue and releases the system memory resources occupied by the processed request. Proceed to step 3.2.5.
As can be seen from the above flow, in the case that the high-speed network card VF with SR-IOV function has insufficient scalability and cannot meet the I/O requirements of all virtual machines when the number of virtual machines is greater than the number of VFs, the number M of VF software resource objects in 2.2 steps is greater than the actual number of VF hardware resources, which increases the number of VFs, so that more virtual machines can be allocated to VFs, and the high-speed network card can be divided into more VFs with smaller bandwidths, thereby solving the problem that the VF allocated to a virtual machine is not matched with the bandwidth requirements of the high-speed network card with SR-IOV function, and improving the utilization rate of the high-speed network card.

Claims (6)

1. A VF resource dynamic scheduling method based on a high-speed network card SR-IOV function is characterized by comprising the following steps:
firstly, a resource scheduling system is constructed, and the resource scheduling system consists of a resource allocation module and a dynamic scheduling module;
the resource allocation module is used for simulating and allocating resources of the VF, runs in a kernel of a Linux operating system, and is connected with the PCI subsystem, the dynamic scheduling module and the high-speed network card; the resource allocation module is an intermediate layer inserted between the PCI subsystem and the hardware network card; the resource allocation module performs initial initialization on hardware resources and software resources of the VF and transmits the initialized hardware resources and software resources to the PCI subsystem; the resource allocation module decouples the software resources and the hardware resources of the VF, namely, the software resources and the hardware resources which originally belong to a whole are split into two parts, the two parts are respectively abstracted to generate a VF hardware resource object and a VF software resource object, and the VF hardware resource object and the VF software resource object are respectively put into a VF hardware resource object queue and a VF software resource object queue;
the VF hardware resource object is used for describing all hardware resources of a single VF and corresponds to the actual VF hardware resources one by one; the VF hardware resource object includes 4 domains: VF hardware resource object ID, I/O space address, memory space address, and whether idle flag; the VF hardware resource object ID is used for identifying a VF hardware resource object, and the VF hardware resource object takes values from 1 and increases in sequence; the I/O space address is the starting address of the I/O space; the memory space address is the initial address of the memory space; whether the idle flag takes a value of 0 or 1, when the idle flag is 0, the VF hardware resource object is idle, and when the idle flag is 1, the VF hardware resource object is allocated to the VF software resource object; if the SR-IOV equipment supports N VFs, generating N VF hardware resource objects according to actual VF hardware resources;
the VF software resource object is used for describing configuration information required by VF, and the resource configuration module simulates and generates M VF software resource objects on the basis of VF software resources, wherein M is more than or equal to N; the VF software resource object comprises 6 domains which are respectively: VF software resource object ID, VF hardware resource object ID, virtual machine ID, number of receiving queues, number of sending queues and interrupt numbers; the VF software resource object ID is used for representing a VF software resource object, and the value is taken from 1 and is sequentially increased; when the VF hardware resource ID is-1, the VF software resource object is not allocated to the VF hardware resource object, and when the VF hardware resource object ID is a positive number, the VF software resource object is allocated to the VF hardware resource object; the virtual machine ID indicates which virtual machine the VF software resource object is assigned to, the virtual machine ID being specified by the virtual machine manager; the number of receiving queues and the number of sending queues represent the number of receiving queues and the number of sending queues that the VF software resource object has; the interrupt number represents an interrupt number applied for the VF software resource object by the PCI subsystem when the VF software resource object is initialized;
the resource allocation module respectively puts the constructed VF hardware resource object and VF software resource object into a VF hardware resource object queue and a VF software resource object queue, the PCI subsystem reads the VF software resource object from the VF software resource object queue, initializes the VF software resource object, generates a PCI _ dev structural body and registers the PCI _ dev structural body in an inner core of a Linux system;
when a virtual machine manager creates a virtual machine, a pci _ dev structure body corresponding to the VF software resource object is distributed to the virtual machine; when the virtual machine uses VF to carry out I/O transmission, an I/O transmission request is sent to a VF software resource object of a resource configuration module through a pci _ dev structural body corresponding to the VF, and if the VF software resource object has a corresponding VF hardware resource object, VF hardware resources are called through the VF hardware resource object to carry out transmission; if the VF software resource object does not have the VF hardware resource object, send a "VF hardware resource object allocation request" to the dynamic scheduling module, where the content of the VF hardware resource object allocation request is: request ID, VF software resource object ID, enqueue time and priority; the request ID is a request number distributed to the VF hardware resource object; the VF software resource object ID represents the request initiated by which VF software resource object; the enqueue time represents the time when the request is put into the request queue and is used for calculating the priority; the priority indicates that the priority of the VF hardware resource objects is obtained by the VF hardware resource object allocation request, and the longer the waiting time is, the higher the priority is;
the dynamic scheduling module is used for managing and scheduling VF hardware resources, runs in a Linux operating system kernel, and is connected with the PCI subsystem and the resource allocation module; the dynamic scheduling module manages two queues, namely a processed request queue and an unprocessed request queue; the dynamic scheduling module receives a VF hardware resource object allocation request, which is called a request for short, from the resource configuration module, and places the unprocessed VF hardware resource object allocation request into an unprocessed request queue; the method comprises the steps that a dynamic scheduling module processes requests in an unprocessed request queue according to the first-in first-out sequence, takes out a request at the head of the queue, obtains VF hardware resource objects in a VF hardware resource object queue in a resource configuration module, judges the use condition of the VF hardware resource objects, distributes the idle VF hardware resource objects to VF software resource objects if the VF hardware resource objects exist in the VF hardware resource object queue, and then puts the requests into a processed queue; if the VF hardware resource object queue in the resource configuration module does not have an idle VF hardware resource object, circularly accessing each processed request in the processed request queue, acquiring the priority of the processed request, comparing the priority with the priority of the current request, namely the request at the head of the queue taken out from the unprocessed request queue, if the priority of the processed request is lower than that of the current request, the current request preempts the VF hardware resource object of the processed request, otherwise, the current request is put into the unprocessed request queue again to wait for the next processing; the dynamic scheduling module circularly processes the requests in the unprocessed queue;
secondly, operating the resource scheduling system, and configuring the VF hardware resources and VF software resources by the resource configuration module to construct VF hardware resource objects and VF software resource objects, wherein the method comprises the following steps:
2.1 the resource configuration module creates and initializes N VF hardware resource objects, and stores the N VF hardware resource objects into the VF hardware resource object queue, where N is the number of VFs supported and generated by SR-IOV, and the number of VFs is recorded in the configuration space of PF, and the method is:
2.1.1 initializing variable n ═ 1;
2.1.2 reading the configuration information of the nth VF; the resource configuration module reads configuration information of the nth VF in the configuration space by bytes through an API provided by the PCI subsystem, namely PCI _ read _ config _ word (), where the information includes: the manufacturer number, equipment number, function number and base address of the VF are the BARs; the manufacturer number is used to identify which manufacturer the VF was made; the device number and function number are identifiers that the VF is unique in the PCI subsystem; the base address is the initial address of the memory space and the I/O space;
2.1.3 create and initialize the nth VF hardware resource object: the resource allocation module assigns the VF configuration information acquired in the step 2.1 to each domain in the nth VF hardware resource object respectively, wherein the VF hardware resource object ID of the nth VF hardware resource object is assigned as n; the memory space address of the nth VF hardware resource object is assigned as BAR [0] + VF configuration space size x (n-1), and the VF configuration space size is defined in a VF drive header file; the I/O space address assignment of the nth VF hardware resource object is BAR [1] + VF configuration space size (n-1); assigning a value of 0 to the idle flag;
2.1.4 resource allocation module stores the initialized nth VF hardware resource object into the VF hardware resource object queue;
2.1.5 making N ═ N +1, if N > N, jump to step 2.2; otherwise, jumping to step 2.1.2;
2.2 the resource allocation module creates and initializes M VF software resource objects, and stores the M VF software resource objects into the VF software resource object queue, where M is the number of VF software resource objects and should be greater than the number N of VF hardware resources; the method comprises the following steps:
2.2.1 writing the number M of VF software resource objects needing to be generated into a sriov _ numvfs file under a/sys/class/net/[ PF _ NAME ]/device/directory in the Linux system, wherein PF _ NAME is PF, namely the NAME of a high-speed network card, and a PCI subsystem appoints PF when initializing and configuring PF;
2.2.2 initializing variable m ═ 1;
2.2.3 creating the mth VF software resource object and initializing, the method is: assigning the ID of the mth VF software resource object to m; assigning the ID of the VF hardware resource object to be-1;
2.2.4 enqueue the initialized mth VF software resource object into a VF software resource management queue;
2.2.5 making M ═ M +1, if M > M, jump to step 2.3; otherwise, jumping to the step 2.2.3;
2.3 the PCI subsystem creates and initializes M PCI _ dev structures, registers PCI _ dev to the Linux system kernel, and further initializes the VF software resource object, the method is as follows:
2.3.1 initializing variable k ═ 1;
2.3.2 reading the content of the kth VF software resource object in the VF software resource object queue;
2.3.3 creating the kth pci _ dev structure and initializing the kth pci _ dev structure, wherein the method comprises the following steps: assigning devfn of the kth pci _ dev structure as k;
2.3.4 further initialize the k-th VF software resource object by: assigning the number of receiving queues of the kth VF software resource object to the number num _ rx _ queues determined by the PCI subsystem, assigning the number of sending queues to the number num _ tx _ queues determined by the PCI subsystem, and assigning the interrupt number to the interrupt number irq distributed by the Linux system;
2.3.5 registering the pci _ dev into the kernel of the Linux system;
2.3.6 let k equal to k +1, if k > M, go to step 2.4; otherwise, jumping to step 2.3.2;
2.4 the virtual machine manager creates the virtual machines of the L VF software resource objects and distributes a pci _ dev structural body to each virtual machine;
2.5 the virtual machine judges whether I/O transmission is needed, if so, an I/O request is created, the I/O request comprises the virtual machine number of the virtual machine, the I/O request is sent to the virtual machine manager, and 2.6 is switched; if not, turning to 2.5;
2.6 the virtual machine manager receives the I/O request sent by the virtual machine and sends the I/O request to the PCI subsystem;
2.7 the PCI subsystem receives the I/O request sent by the virtual machine manager and sends the I/O request to the resource allocation module;
2.8 the resource allocation module receives the I/O request sent by the PCI subsystem, processes the I/O request according to the principle of first-come first-served, and comprises the following steps:
2.8.1 reading the virtual machine number in the I/O request;
2.8.2 accessing the VF software resource object at the head of the VF software resource object queue in the resource configuration module;
2.8.2 reading the virtual machine ID in the VF software resource object;
2.8.3, judging whether the virtual machine ID of the VF software resource object read in 2.8.2 is equal to the virtual machine number read in 2.8.1, and if not, jumping to 2.8.4; jump to 2.8.5 if equal;
2.8.4 accesses the next VF software resource object in the VF software resource object queue and then jumps to 2.8.2;
2.8.5 reads the VF hardware resource ID of the VF software resource object;
2.8.6, judging whether the VF software resource object obtains the VF hardware resource object, if the VF hardware resource ID of the VF software resource object is a positive number, if so, indicating that the VF hardware resource object is obtained, and jumping to 2.8.7; if the VF hardware resource ID of the VF software resource object is-1, indicating that the VF hardware resource object is not obtained, skipping to 2.8.8;
2.8.7 the PCI subsystem calls the VF hardware resources of the VF software resource object to perform I/O transmission;
2.8.8, creating and initializing a VF hardware resource object allocation request, assigning the request ID of the VF hardware resource object allocation request to i, wherein i is equal to the request ID +1 of the last request, the VF software object ID is assigned to the VF software resource object ID of the VF software resource object in 2.8.6, the enqueue time is assigned to 0, and the priority is assigned to 0;
2.8.9, sending the VF hardware resource object allocation request to the dynamic scheduling module;
thirdly, the dynamic scheduling module dynamically schedules the VF hardware resource object:
3.1 the dynamic scheduling module receives a VF hardware resource allocation request from the resource allocation module, assigns the enqueue time in the VF hardware resource allocation request as the current system time, and then stores the VF hardware resource allocation request into an unprocessed request queue;
3.2 the dynamic scheduling module circularly processes VF hardware resource allocation requests in the unprocessed request queue; the method comprises the following specific steps:
3.2.1 the dynamic scheduling module judges whether the unprocessed request queue is empty, if so, the dynamic scheduling module directly changes to 3.2.1; if not, skipping to step 3.2.2;
3.2.2 the dynamic scheduling module takes out VF hardware resource allocation requests from the head of the unprocessed request queue;
3.2.3 the dynamic scheduling module circularly accesses the VF hardware resource object queue, reads whether the flag in the VF hardware resource object is idle to search the idle VF hardware resource object, the method is:
3.2.3.1, the dynamic scheduling module reads the VF hardware resource object at the head of the VF hardware resource object queue;
3.2.3.2 the dynamic scheduling module reads whether the VF hardware resource object is idle, if it is 1, it indicates that the read VF hardware resource object is not idle, and then it goes to step 3.2.3.3; if the VF hardware resource object is 0, the read VF hardware resource object is idle, and the step 3.2.4 is skipped;
3.2.3.3 the dynamic scheduling module judges whether the current VF hardware resource object is at the tail of the VF hardware resource object queue, if not, jumps to step 3.2.3.4; if the queue is at the tail of the queue, go to step 3.2.8;
3.2.3.4 the dynamic scheduling module reads the next VF hardware resource object in the VF hardware resource object queue; skipping to step 3.2.3.2;
3.2.4 the dynamic scheduling module allocates the read VF hardware resource object to the VF software resource object, the method is: the dynamic scheduling module finds the corresponding VF software resource object according to the VF software resource object ID in the VF hardware resource object allocation request; setting the VF hardware resource object ID of the VF software resource object as the current accessed VF hardware resource object ID; setting a flag of whether the current VF hardware resource object is idle to be 1;
3.2.5 the dynamic scheduling module puts the processed VF hardware resource object allocation request of 3.2.4 into the tail of the processed request queue, and assigns the enqueue time of the VF hardware resource object allocation request as the current system time;
3.2.6 the dynamic scheduling module judges whether the unprocessed request queue is empty; if the queue is empty, no processing is carried out, jumping to 3.2.1, and waiting for an unprocessed request queue to have an unprocessed request; if not, jumping to step 3.2.7;
3.2.7 the dynamic scheduling module takes out the next unprocessed VF hardware resource object allocation request and jumps to step 3.2.3;
3.2.8 the dynamic scheduling module looks for low priority requests in the processed requests; the dynamic scheduling module calculates the priority of the current 'VF hardware resource object allocation request', circularly accesses the processed request queue, reads the priority of the processed VF hardware resource object allocation request, if a processed request with lower priority than the current request is found in the processed request queue, the step goes to 3.2.9, if a processed request with lower priority than the current request is not found in the processed request queue, the unprocessed request is stored in the unprocessed request queue again, and the step goes to 3.2.8;
3.2.9 the dynamic scheduling module deprives the VF hardware resource objects of processed requests, assigns to currently unprocessed requests, and proceeds to step 3.2.5.
2. The VF resource dynamic scheduling method based on the high-speed network card SR-IOV function of claim 1, wherein the interrupt number is assigned by Linux system.
3. The VF resource dynamic scheduling method based on the high-speed network card SR-IOV function of claim 1, wherein the method for creating M virtual machines by the virtual machine manager in step 2.4 and allocating a pci _ dev structure to each virtual machine is:
2.4.1 initializing variable l ═ 1;
2.4.2 creating an l-th virtual machine, acquiring a virtual machine number distributed to the virtual machine by a virtual machine manager, and then registering a PCI subsystem to an l-th PCI _ dev structural body in a Linux system kernel to distribute the l-th virtual machine number to the virtual machine;
2.4.3 reading the first VF software resource object of the VF software resource object queue;
2.4.4 initialize the virtual machine ID of the ith VF software resource object, the method is: assigning the virtual machine ID of the first VF software resource object to be the virtual machine number obtained by 2.4.2;
2.4.5 ends with l ═ l +1, if l > M; otherwise, jump to step 2.4.2.
4. The VF resource dynamic scheduling method based on high-speed network card SR-IOV function of claim 1, wherein the dynamic scheduling module calculates the priority of the current "VF hardware resource object allocation request", circularly accesses the queue of processed requests, reads the priority of the processed VF hardware resource object allocation request, and finds out the processed requests with lower priority than the current request by the method of 3.2.8:
3.2.8.1 the dynamic scheduling module calculates priority of unprocessed requests by: acquiring current system time and enqueue time of unprocessed requests, wherein the priority of the unprocessed requests is the current system time-the enqueue time, and assigning the calculated result to the priority of the unprocessed requests;
3.2.8.2 the dynamic scheduling module accesses the VF hardware resource object allocation request at the head of the queue of the processed request;
3.2.8.3 the dynamic scheduling module calculates the priority of the processed request; acquiring the current system time, the enqueue time of the processed request and the priority of the processed request, wherein the priority of the processed request is the priority of the processed request, the current system time and the enqueue time, and assigning the calculated result to the priority of the processed request;
3.2.8.4 the dynamic scheduling module compares the priority of the unprocessed request with the priority of the processed request, if the numerical value is larger, the priority is higher, if the priority of the unprocessed request is lower than the priority of the processed request, the step 3.2.8.5 is skipped to; if the priority of the unprocessed request is higher, ending;
3.2.8.5 the dynamic scheduling module judges whether the current processed request is at the end of the queue, if not, it jumps to step 3.2.8.6; if the request is at the tail of the queue, the unprocessed request is put into the tail of the unprocessed request queue again, and the step 3.2.8.7 is jumped to;
3.2.8.6 the dynamic scheduling module accesses the next VF hardware resource object allocation request in the processed request queue, and jumps to step 3.2.8.3;
3.2.8.7 the dynamic scheduling module restores the outstanding requests to the outstanding requests queue and moves to 3.2.8.1 to await the next transaction.
5. The method for dynamically scheduling VF resources based on SR-IOV function of high-speed network card of claim 1, wherein in step 3.2.9 the dynamic scheduling module deprives the VF hardware resource object of the processed request, and the method allocated to the current unprocessed request is:
3.2.9.1 the dynamic scheduling module obtains the VF software resource object of the processed request, and records as VF software resource object A;
3.2.9.2 the dynamic scheduling module obtains the VF software resource object of the unprocessed request, and records it as VF software resource object B;
3.2.9.3 the dynamic scheduling module assigns the VF hardware resource object ID of the VF software resource object B to the VF hardware resource object ID of the VF software resource object A, and then assigns the VF hardware resource object ID of the VF software resource object A to-1;
3.2.9.4 the dynamic scheduling module fetches the currently accessed processed request from the processed request queue and releases the system memory resources occupied by the processed request.
6. The method for dynamically scheduling VF resources based on SR-IOV function of high-speed network card according to claim 1, wherein in step 2.3.4, num _ rx _ queues and num _ tx _ queues are determined by the PCI subsystem according to the number of cores of system CPU and the number of generated VFs, and the larger the number of CPU cores or the smaller the number of VFs, the larger the number of num _ rx _ queues and num _ tx _ queues.
CN202110399468.2A 2021-04-14 2021-04-14 VF resource dynamic scheduling method based on SR-IOV function of high-speed network card Active CN113032103B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110399468.2A CN113032103B (en) 2021-04-14 2021-04-14 VF resource dynamic scheduling method based on SR-IOV function of high-speed network card

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110399468.2A CN113032103B (en) 2021-04-14 2021-04-14 VF resource dynamic scheduling method based on SR-IOV function of high-speed network card

Publications (2)

Publication Number Publication Date
CN113032103A true CN113032103A (en) 2021-06-25
CN113032103B CN113032103B (en) 2023-07-04

Family

ID=76456591

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110399468.2A Active CN113032103B (en) 2021-04-14 2021-04-14 VF resource dynamic scheduling method based on SR-IOV function of high-speed network card

Country Status (1)

Country Link
CN (1) CN113032103B (en)

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113472571A (en) * 2021-06-28 2021-10-01 北京汇钧科技有限公司 Intelligent network card equipment and bypass detection method of intelligent network card equipment
CN114546500A (en) * 2022-01-28 2022-05-27 郑州信大捷安信息技术股份有限公司 Method and system for realizing password card drive supporting multiple devices
CN115843113A (en) * 2023-02-14 2023-03-24 阿里巴巴(中国)有限公司 Data processing method, wireless access network, device and storage medium
CN116627883A (en) * 2023-06-08 2023-08-22 北京大禹智芯科技有限公司 Optimization method and device for on-chip space of PCIe device
CN116795554A (en) * 2023-08-22 2023-09-22 无锡沐创集成电路设计有限公司 Virtual network card queue allocation method and readable storage medium
WO2024131368A1 (en) * 2022-12-23 2024-06-27 华为技术有限公司 Method and apparatus for scheduling virtual machine, and chip and computer-readable storage medium

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20110296197A1 (en) * 2010-05-28 2011-12-01 Dell Products, Lp System and Method for Supporting Full Volume Encryption Devices in a Client Hosted Virtualization System
US20110296196A1 (en) * 2010-05-28 2011-12-01 Dell Products, Lp System and Method for Supporting Task Oriented Devices in a Client Hosted Virtualization System
US20110296157A1 (en) * 2010-05-28 2011-12-01 Dell Products, Lp System and Method for Supporting Secure Subsystems in a Client Hosted Virtualization System
CN105493444A (en) * 2013-12-31 2016-04-13 华为技术有限公司 Fault management apparatus, device and method for network function virtualization (nfv)
CN107924321A (en) * 2015-09-25 2018-04-17 英特尔公司 The nested virtualization exited for virtual machine
US20200364088A1 (en) * 2019-05-16 2020-11-19 Nvidia Corporation Resource sharing by two or more heterogeneous processing cores

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20110296197A1 (en) * 2010-05-28 2011-12-01 Dell Products, Lp System and Method for Supporting Full Volume Encryption Devices in a Client Hosted Virtualization System
US20110296196A1 (en) * 2010-05-28 2011-12-01 Dell Products, Lp System and Method for Supporting Task Oriented Devices in a Client Hosted Virtualization System
US20110296157A1 (en) * 2010-05-28 2011-12-01 Dell Products, Lp System and Method for Supporting Secure Subsystems in a Client Hosted Virtualization System
CN105493444A (en) * 2013-12-31 2016-04-13 华为技术有限公司 Fault management apparatus, device and method for network function virtualization (nfv)
CN107924321A (en) * 2015-09-25 2018-04-17 英特尔公司 The nested virtualization exited for virtual machine
US20200364088A1 (en) * 2019-05-16 2020-11-19 Nvidia Corporation Resource sharing by two or more heterogeneous processing cores

Cited By (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113472571A (en) * 2021-06-28 2021-10-01 北京汇钧科技有限公司 Intelligent network card equipment and bypass detection method of intelligent network card equipment
CN113472571B (en) * 2021-06-28 2023-11-03 北京汇钧科技有限公司 Intelligent network card device and bypass detection method of intelligent network card device
CN114546500A (en) * 2022-01-28 2022-05-27 郑州信大捷安信息技术股份有限公司 Method and system for realizing password card drive supporting multiple devices
WO2024131368A1 (en) * 2022-12-23 2024-06-27 华为技术有限公司 Method and apparatus for scheduling virtual machine, and chip and computer-readable storage medium
CN115843113A (en) * 2023-02-14 2023-03-24 阿里巴巴(中国)有限公司 Data processing method, wireless access network, device and storage medium
CN116627883A (en) * 2023-06-08 2023-08-22 北京大禹智芯科技有限公司 Optimization method and device for on-chip space of PCIe device
CN116795554A (en) * 2023-08-22 2023-09-22 无锡沐创集成电路设计有限公司 Virtual network card queue allocation method and readable storage medium
CN116795554B (en) * 2023-08-22 2023-11-17 无锡沐创集成电路设计有限公司 Virtual network card queue allocation method and readable storage medium

Also Published As

Publication number Publication date
CN113032103B (en) 2023-07-04

Similar Documents

Publication Publication Date Title
CN113032103B (en) VF resource dynamic scheduling method based on SR-IOV function of high-speed network card
CN107783913B (en) Resource access method applied to computer and computer
WO2017024783A1 (en) Virtualization method, apparatus and system
EP3798835B1 (en) Method, device, and system for implementing hardware acceleration processing
US4435752A (en) Allocation of rotating memory device storage locations
US9697024B2 (en) Interrupt management method, and computer implementing the interrupt management method
US8918568B2 (en) PCI express SR-IOV/MR-IOV virtual function clusters
US8347063B2 (en) Method and system for device address translation for virtualization
JP7141804B2 (en) Method, device, electronic device and storage medium for resource management
JP2013515983A (en) Method and apparatus for performing I / O processing in a virtual environment
CN114138422B (en) Scalable NVMe storage virtualization method and system
CN113032101B (en) Resource allocation method of virtual machine, server and computer readable storage medium
US20240220309A1 (en) Flexible source assignment to physical and virtual functions in a virtualized processing system
EP1915681A1 (en) Method and apparatus for supporting universal serial bus devices in a virtualized environment
CN112330229B (en) Resource scheduling method, device, electronic equipment and computer readable storage medium
US5640591A (en) Method and apparatus for naming input/output devices in a computer system
US7814496B2 (en) Method and system for replicating schedules with regard to a host controller for virtualization
CN115904617A (en) GPU virtualization implementation method based on SR-IOV technology
CN112486704B (en) Multi-core multiprocessor synchronization and communication system based on shared storage
CN116737322B (en) Method for simultaneously supporting PCIe virtual equipment and physical equipment by virtual machine
CN116501666B (en) Implementation method of PCIe Switch simulator
CN116324706A (en) Split memory pool allocation
CN116578416B (en) Signal-level simulation acceleration method based on GPU virtualization
CN113568734A (en) Virtualization method and system based on multi-core processor, multi-core processor and electronic equipment
WO2021170054A1 (en) Virtualization method, device, board card and computer-readable storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant