This disclosure generally relates to computing system testing, and more specifically relates to a system and method for dynamic assignment of interrupts to a virtual machine from an input/output (I/O) adapter based on input/output metrics of the I/O adapter.
A logical partition is often configured to utilize a virtual I/O adapter such as a virtualized I/O network adapter. In current server-class systems there are large I/O fabrics incorporating many layers of bridge chips, switches, and I/O devices. The I/O devices themselves may be further virtualized in technologies such as Single-Root Input/Output Virtualization (SR-IOV). The routing and handling of interrupts generated by I/O devices involves both hardware configuration and software configuration across many layers of the system including the hypervisor and logical partition. When the system is provisioned, assignments are made for which physical interrupts are associated with which I/O devices and which logical interrupts are associated with which physical interrupt. During operation, high rate data transfers can cause congestion of interrupts from an I/O device and contribute to high latency of the logical interrupts reaching the associated VM in the partition. This latency can cause poor overall performance of the system.
A method and system provide dynamic assignment of interrupts to a virtual machine from an I/O adapter based on I/O metrics of the I/O adapter. An interrupt manager monitors I/O flow metrics on an I/O adapter such as latency of data transfers, usage levels, and transfers per unit of time. The interrupt manager determines when a traffic flow metric for a virtual machine meets a predetermined performance threshold and updates virtual interrupt assignments in a logical interrupt table to improve performance of the system.
The foregoing and other features and advantages will be apparent from the following more particular description, as illustrated in the accompanying drawings.
The disclosure will be described in conjunction with the appended drawings, where like designations denote like elements, and:
The disclosure and claims herein relate to a method and system for dynamic assignment of interrupts to a virtual machine from an I/O adapter based on I/O metrics of the I/O adapter. An interrupt manager monitors I/O flow metrics on an I/O adapter such as latency of data transfers, usage levels, and transfers per unit of time. The interrupt manager determines when a traffic flow metric for a virtual machine meets a predetermined performance threshold and updates virtual interrupt assignments in a logical interrupt table to improve performance of the system.
Processor 104 may be constructed from one or more microprocessors and/or integrated circuits. Processor 104 executes program instructions stored in main memory 106. Main memory 106 stores programs and data that processor 104 may access. Although computing system 102 is shown to contain only a single processor those skilled in the art will appreciate that the system may be practiced using a computing system that has multiple processors and/or multiple buses. In addition, the interfaces that are used preferably each include separate, fully programmed microprocessors that are used to off-load compute-intensive processing from processor 104. However, those skilled in the art will appreciate that these functions may be performed using input/output adapters as well.
Again referring to
Main memory 106 also includes one or more instances of an operating system (OS) 122. Typically there is one instance of the OS for each logical partition 118, 120. Operating systems useful in computers configured for interrupt migration according to various embodiments include UNIX™, Linux™, Microsoft Windows™, AIX™, IBM's IBM i™ operating system, and others as will occur to those skilled in the art. The operating systems 122, hypervisor 112, and management console 116 are shown in main memory 106, but many components of such software may typically be stored in non-volatile memory such as, for example, on a data storage device or in firmware.
The computing system 102 may also include a storage device adapter 126 coupled through expansion bus 128 and bus adapter 110 to processor 104 and other components of the computing system 102. Storage device adapter 126 connects non-volatile data storage in the form of data storage device 132 to devices in the computing system 102. Storage device adapters useful in computing systems configured for interrupt migration according to various embodiments include Integrated Drive Electronics (“IDE”) adapters, Small Computing system Interface (“SCSI”) adapters, and others as will occur to those skilled in the art. Non-volatile data storage 132 may be an optical disk drive, electrically erasable programmable read-only memory (so-called “EEPROM” or “Flash” memory), RAM drives, and so on, as will occur to those skilled in the art. For example, the data storage device 132 may include a compact disk re-writable (CD-RW) drive, which may store data to and read data from a removable media CD-RW 134. Some data storage devices may have a removable memory card or similar instead of the CD-RW drive.
The example computing system 102 may also include one or more input/output (“I/O”) adapters 136. I/O adapters implement user-oriented input/output through, for example, software drivers and computer hardware for controlling output to display devices such as computer display screens, as well as user input from user input devices 138 such as keyboards and mice. The example computing system 102 may also include a video adapter 140, which may be an example of an I/O adapter specially designed for graphic output to a display device 142 such as a display screen or computer monitor. Video adapter 140 may be connected to processor 104 through a high speed video bus 144, bus adapter 110, and the front side bus 146, which may also be a high speed bus.
The example computing system 102 of
One example type of I/O adapter or network adapter that may be used as described herein is an SR-IOV adapter. Readers will recognize that such SR-IOV adapters are only an example of a type of I/O adapter and that many different types of I/O adapters could be used. SR-IOV or single-root I/O virtualization, is an extension to the PCI Express (PCIe) specification. SR-IOV allows a device, such as a input/output adapter, to separate access to its resources among various PCIe hardware functions. These functions consist of the following types: a PCIe physical function (PF) and a PCIe virtual function (VF). The physical function advertises the device's SR-IOV capabilities. Each virtual function is associated with a device's physical function. A virtual function shares one or more physical resources of the device, such as a memory and a network port, with the PF and other VFs on the device. From the perspective of a logical partition 118, 120 instantiated by a hypervisor 112, a VF appears as a fully functional physical PCIe adapter. In this way, a single physical adapter may be ‘shared’ amongst many logical partitions or multiple virtual functions may be instantiated for use by a single logical partition.
When configuring a logical partition for interrupts with an I/O adapter, the hypervisor, upon instantiation of the logical partition may assign to the logical partition a number of logical interrupt source numbers, where each of the logical interrupt source numbers maps to a physical interrupt source number. The physical interrupt source number is a number, or identifier, that represents an interrupt raised in the processor by an I/O adapter. Such interrupts may be raised through various busses and in various ways. For example, some physical interrupts may be raised by asserting, by an adapter, a signal on a line of a bus dedicated for such interrupts or by sending an MSI (Message Signaled Interrupt) or MSI-X (MSI extended) message to the processor over the main system bus (through a PCI host bridge, for example) rather than on a dedicated interrupt line. Such MSI and MSI-X messages may be associated with a physical interrupt source number. That is, each adapter may send out an MSI or MSI-X message to raise an interrupt, the content of the message may indicate the source of the message and be associated with at least one physical interrupt source number. The CPU may then raise an interrupt with the physical interrupt source number. The interrupt my cause system firmware or software, such as the hypervisor, to handle the interrupt. The hypervisor may determine which logical partition to which to direct the interrupt based on mappings of physical interrupt source numbers to logical interrupt source numbers, where each logical interrupt source number is assigned to a logical partition.
The arrangement of servers and other devices making up the exemplary system illustrated in
Computing system 102 utilizes well known virtual addressing mechanisms that allow the programs of computing system 102 to behave as if they only have access to a large, single storage entity instead of access to multiple, smaller storage entities such as main memory 106, data storage 132 and storage device 164. Therefore, while operating hypervisor 112, interrupt manager 114, management console 116, and other elements are shown to reside in main memory 106, those skilled in the art will recognize that these items are not necessarily all completely contained in main memory 106 at the same time. It should also be noted that the term “memory” is used herein generically to refer to the entire virtual memory of computing system 102, and may include the virtual memory of other computing systems coupled to computing system 102.
As introduced above, the example computing system of
Also introduced above, the computing system 102 includes a hypervisor 112. The hypervisor 112 supports execution of the logical partitions 118, 120. The logical partitions are configured to use the network adapters 150, 152, 154 for I/O operations. Upon instantiation of the logical partition, the hypervisor 112 may assign one or more logical interrupt source numbers to the logical partition. The logical partition is generally unaware that the logical interrupt source numbers are, in fact, logical. The hypervisor may map each of the logical interrupt source numbers to a physical interrupt source number that is generated in the processor of the computing system 102 when an interrupt is raised by an I/O adapter. The mapping and conversion of logical and physical interrupts is further described with reference to
Again referring to
Continuing the example of
Referring to
Referring to
The present invention may be a system, a method, and/or a computer program product at any possible technical detail level of integration. The computer program product may include a computer readable storage medium (or media) having computer readable program instructions thereon for causing a processor to carry out aspects of the present invention.
The computer readable storage medium can be a tangible device that can retain and store instructions for use by an instruction execution device. The computer readable storage medium may be, for example, but is not limited to, an electronic storage device, a magnetic storage device, an optical storage device, an electromagnetic storage device, a semiconductor storage device, or any suitable combination of the foregoing. A non-exhaustive list of more specific examples of the computer readable storage medium includes the following: a portable computer diskette, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or Flash memory), a static random access memory (SRAM), a portable compact disc read-only memory (CD-ROM), a digital versatile disk (DVD), a memory stick, a floppy disk, a mechanically encoded device such as punch-cards or raised structures in a groove having instructions recorded thereon, and any suitable combination of the foregoing. A computer readable storage medium, as used herein, is not to be construed as being transitory signals per se, such as radio waves or other freely propagating electromagnetic waves, electromagnetic waves propagating through a waveguide or other transmission media (e.g., light pulses passing through a fiber-optic cable), or electrical signals transmitted through a wire.
Computer readable program instructions described herein can be downloaded to respective computing/processing devices from a computer readable storage medium or to an external computer or external storage device via a network, for example, the Internet, a local area network, a wide area network and/or a wireless network. The network may comprise copper transmission cables, optical transmission fibers, wireless transmission, routers, firewalls, switches, gateway computers and/or edge servers. A network adapter card or network interface in each computing/processing device receives computer readable program instructions from the network and forwards the computer readable program instructions for storage in a computer readable storage medium within the respective computing/processing device.
Computer readable program instructions for carrying out operations of the present invention may be assembler instructions, instruction-set-architecture (ISA) instructions, machine instructions, machine dependent instructions, microcode, firmware instructions, state-setting data, configuration data for integrated circuitry, or either source code or object code written in any combination of one or more programming languages, including an object oriented programming language such as Smalltalk, C++, or the like, and procedural programming languages, such as the “C” programming language or similar programming languages. The computer readable program instructions may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the latter scenario, the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or the connection may be made to an external computer (for example, through the Internet using an Internet Service Provider). In some embodiments, electronic circuitry including, for example, programmable logic circuitry, field-programmable gate arrays (FPGA), or programmable logic arrays (PLA) may execute the computer readable program instructions by utilizing state information of the computer readable program instructions to personalize the electronic circuitry, in order to perform aspects of the present invention.
Aspects of the present invention are described herein with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each block of the flowchart illustrations and/or block diagrams, and combinations of blocks in the flowchart illustrations and/or block diagrams, can be implemented by computer readable program instructions.
These computer readable program instructions may be provided to a processor of a general purpose computer, special purpose computer, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions/acts specified in the flowchart and/or block diagram block or blocks. These computer readable program instructions may also be stored in a computer readable storage medium that can direct a computer, a programmable data processing apparatus, and/or other devices to function in a particular manner, such that the computer readable storage medium having instructions stored therein comprises an article of manufacture including instructions which implement aspects of the function/act specified in the flowchart and/or block diagram block or blocks.
The computer readable program instructions may also be loaded onto a computer, other programmable data processing apparatus, or other device to cause a series of operational steps to be performed on the computer, other programmable apparatus or other device to produce a computer implemented process, such that the instructions which execute on the computer, other programmable apparatus, or other device implement the functions/acts specified in the flowchart and/or block diagram block or blocks.
The flowchart and block diagrams in the Figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of the present invention. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of instructions, which comprises one or more executable instructions for implementing the specified logical function(s). In some alternative implementations, the functions noted in the blocks may occur out of the order noted in the Figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems that perform the specified functions or acts or carry out combinations of special purpose hardware and computer instructions.
The claims and disclosure herein support an apparatus comprising: at least one processor; a memory coupled to the at least one processor; a hypervisor residing in the memory and executed by the at least one processor, where the hypervisor uses a logical interrupt table that contains logical interrupt source numbers directly mapped with physical interrupt source numbers; and an interrupt manager in the hypervisor that dynamically assigns interrupts to a virtual machine from an input/output adapter based on input/output traffic metrics of the input/output adapter by making updates to the logical interrupt table and dynamically updates virtual interrupt assignments for the virtual machine by making updates to the logical interrupt table based on a monitored input/output traffic of the input/output adapter meeting a predetermined threshold.
The claims and disclosure herein further support a computer-implemented method executed by at least one processor of assigning interrupts, the method comprising: monitoring traffic metrics of a traffic path from an input/output adapter to a virtual machine; determining when a first monitored traffic metric meets a predetermined performance threshold; dynamically assigning interrupts to a virtual machine from the input/output adapter based on the monitored traffic metrics by making updates to a logical interrupt table in a hypervisor; and based on the first monitored traffic metric meeting the predetermined performance threshold, dynamically updating virtual interrupt assignments for the virtual machine by making updates to the logical interrupt table based on the first monitored traffic metric meeting the predetermined threshold.
The claims and disclosure herein additionally support a computer-implemented method executed by at least one processor of assigning interrupts, the method comprising: instantiating a plurality of logical partitions; deploying an I/O adapter to one of the plurality of logical partitions; creating a mapping of virtual interrupt assignments that maps logical interrupt source numbers to physical interrupt source numbers; monitoring traffic metrics of a traffic path from an input/output adapter to a virtual machine, wherein the traffic metrics comprise latency of data transfers, usage levels of an adapter input/output (I/O) path, and transfers per unit of time; dynamically assigning interrupts to a virtual machine from the input/output adapter based on the monitored traffic metrics by making updates to a logical interrupt table in a hypervisor; determining when a monitored traffic metric meets a predetermined performance threshold; dynamically updating virtual interrupt assignments to the virtual machine from the input/output adapter wherein the virtual interrupt assignments are located in the logical interrupt table in a hypervisor and contain logical interrupt source numbers associated with physical interrupt source numbers; and stopping traffic while updating the virtual interrupt assignments by generating an error state on a data bus.
As described above, a system and method dynamically assig interrupts to a virtual machine from an input/output (I/O) adapter based on I/O metrics of the I/O adapter. An interrupt manager monitors I/O adapter traffic flow metrics and determines when a traffic flow metric for a virtual machine meets a predetermined performance threshold and updates virtual interrupt assignments in a logical interrupt table to improve performance of the system.
One skilled in the art will appreciate that many variations are possible within the scope of the claims. Thus, while the disclosure is particularly shown and described above, it will be understood by those skilled in the art that these and other changes in form and details may be made therein without departing from the spirit and scope of the claims.
Number | Date | Country | |
---|---|---|---|
Parent | 16382182 | Apr 2019 | US |
Child | 17128394 | US |