WO2016059692A1 - Computer and i/o processing control method - Google Patents

Computer and i/o processing control method Download PDF

Info

Publication number
WO2016059692A1
WO2016059692A1 PCT/JP2014/077507 JP2014077507W WO2016059692A1 WO 2016059692 A1 WO2016059692 A1 WO 2016059692A1 JP 2014077507 W JP2014077507 W JP 2014077507W WO 2016059692 A1 WO2016059692 A1 WO 2016059692A1
Authority
WO
WIPO (PCT)
Prior art keywords
interrupt
factor number
interrupt factor
vector
device driver
Prior art date
Application number
PCT/JP2014/077507
Other languages
French (fr)
Japanese (ja)
Inventor
悠介 古山
晃 浦上
Original Assignee
株式会社日立製作所
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 株式会社日立製作所 filed Critical 株式会社日立製作所
Priority to PCT/JP2014/077507 priority Critical patent/WO2016059692A1/en
Publication of WO2016059692A1 publication Critical patent/WO2016059692A1/en

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/46Multiprogramming arrangements
    • G06F9/48Program initiating; Program switching, e.g. by interrupt
    • 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/10Program control for peripheral devices

Definitions

  • the present invention relates to a method for controlling I / O processing in a computer that supports multi-queue technology.
  • a plurality of I / O commands are managed using a queue structure.
  • the I / O device driver enqueues an I / O command in the I / O activation queue when the I / O processing is activated, and dequeues a response command from the I / O response queue when an IO response is made.
  • an interrupt factor can be associated with each I / O queue pair.
  • An interrupt factor can be defined from a combination of a CPU (CPU core), an I / O device core, a guest OS, and the like. Further, in a system that supports multi-queues, interrupt vectors and queues are associated one-to-one. This improves the performance of I / O processing.
  • the I / O device driver specifies an interrupt factor corresponding to the generated interrupt by accessing a register group such as an interrupt factor register and an interrupt factor aggregation register.
  • a process in which a CPU core of a computer accesses a register using PCI MMIO has a higher processing cost than a memory access of a computer, and causes a deterioration in performance of I / O processing.
  • an interrupt vector vector number
  • an interrupt factor a combination of an identification number of the I / O device core and an identification number of the guest OS, etc.
  • Patent Document 1 states that “a plurality of registers each storing a flag value indicating whether or not an interrupt request has occurred for each of a plurality of interrupt factors is provided, and a plurality of interrupt factors associated with the same interrupt vector are included.
  • the information processing device From the information processing device that identifies the interrupt factor that generated the interrupt request based on the flag value and executes interrupt processing according to the interrupt request, the information processing device corresponds to the interrupt factor that generated the interrupt request
  • An interrupt vector detecting means for detecting the interrupt vector to be attached; a selecting means for selecting the flag value of the interrupt factor associated with the detected interrupt vector from the flag values stored in the register; Storage means for storing the selected flag value; and reading the flag value stored in the storage means; And control means for identifying the interrupt factor that caused the interrupt request based on the serial read-out flag value, that the having "are described.
  • the hardware cost for specifying the interrupt factor is suppressed, and the control of the I / O processing capable of specifying the interrupt factor at high speed is realized. Also, the present invention realizes a system that executes I / O processing in parallel even when I / O processing of a plurality of I / O queues that share the same interrupt vector occurs continuously.
  • a typical example of the invention disclosed in the present application is as follows. That is, a computer on which at least one operating system runs, the computer including at least one processor including a plurality of processor cores, a storage device connected to the at least one processor, and a plurality of I / O device cores
  • An interrupt that includes at least one I / O device connected to the at least one processor, has an I / O device driver that controls the at least one I / O device, and executes an interrupt vector and interrupt processing Managing interrupt vector information indicating a correspondence relationship with a handler, the interrupt factor is defined based on a combination of a plurality of interrupt elements, and a plurality of I / O queues are assigned to each of the plurality of interrupt factors,
  • the I / O device uses the plurality of I / O queues.
  • a plurality of I / O processes are executed in parallel, and the I / O device driver includes a plurality of interrupt handlers, manages interrupt factor numbers, and indicates a correspondence relationship between the interrupt vectors and the interrupt factor numbers
  • the interrupt factor number is defined based on a bit string composed of one or more bits corresponding to each of the plurality of interrupt elements
  • the I / O device is the I / O device driver Having a control unit that executes I / O processing in response to a request from the host, holding a bitmap-format register for managing the interrupt factor number, and the interrupt factor number and a bit in the bitmap corresponding to the register
  • the I / O device driver manages the first interrupt factor number in the first interrupt vector.
  • the second interrupt factor number are associated with each other, an I / O processing execution request corresponding to the first interrupt factor number is received from the operating system, and the second interrupt factor number corresponds to the first interrupt factor number.
  • a first I / O command is inserted into the I / O queue, and an instruction to execute a first I / O process including the first interrupt vector and the first interrupt factor number is transmitted to the control unit;
  • the control unit executes an I / O process corresponding to the first I / O command, refers to the register, and executes the first I / O process.
  • the first interrupt command including the first interrupt vector is inserted into the I / O queue corresponding to the first interrupt factor number.
  • the I / O device driver activates an interrupt handler corresponding to the first interrupt vector based on the interrupt vector information, and refers to the mapping information. Then, the first interrupt factor number and the second interrupt factor number associated with the first interrupt vector are specified, and the first interrupt factor number and the second interrupt factor are specified from the register. By reading the value of the bit corresponding to each of the numbers, it is specified that an interrupt factor corresponding to the first interrupt factor number has occurred, and the I / O queue corresponding to the first interrupt factor number The first response command is acquired from the first response command, and a response process corresponding to the first response command is executed. That.
  • the I / O device driver can specify the interrupt factor by referring only to the bitmap format register. .
  • the hardware cost can be reduced.
  • FIG. 3 is a block diagram illustrating an outline of a process flow in the computer according to the first embodiment. It is explanatory drawing which shows an example of the structure of the interrupt factor number of Example 1.
  • FIG. 6 is an explanatory diagram illustrating an example of an interrupt factor number notification register according to the first embodiment.
  • FIG. 6 is an explanatory diagram illustrating an example of I / O queue information according to the first embodiment. It is explanatory drawing which shows an example of the mapping table of Example 1.
  • FIG. 6 is an explanatory diagram illustrating an example of an I / O queue address table according to the first embodiment.
  • FIG. 6 is a flowchart illustrating an initial setting process executed by the HBA device driver according to the first embodiment.
  • 6 is an explanatory diagram illustrating an internal operation of a computer in communication processing according to Embodiment 1.
  • FIG. FIG. 6 is an explanatory diagram illustrating an internal operation of the computer in the I / O processing according to the first embodiment.
  • FIG. 6 is a sequence diagram illustrating the flow of I / O processing according to the first embodiment.
  • FIG. 6 is a sequence diagram illustrating the flow of I / O processing according to the first embodiment.
  • FIG. 6 is a sequence diagram illustrating the flow of I / O processing according to the first embodiment.
  • FIG. 6 is a sequence diagram illustrating the flow of I / O processing according to the first embodiment.
  • FIG. 6 is a sequence diagram illustrating the flow of I / O processing according to the first embodiment.
  • FIG. 6 is a sequence diagram illustrating the flow of I / O processing according to the first embodiment.
  • FIG. 1 is a block diagram illustrating a configuration of a computer system according to the first embodiment.
  • the computer system includes a computer 100, a storage device 130, and a client device 140.
  • the computer 100 and the storage device 130 are connected to each other via a network 150 such as a SAN (Storage Area Network).
  • the computer 100 and the client device 140 are connected via a network 160 such as a LAN (Local Area Network) or a WAN (Wide Area Network).
  • the computer 100 executes a predetermined job.
  • the computer 100 according to the first embodiment is a computer that supports virtual technology, and a plurality of virtual computers (VMs) 114 operate on the computer 100. On the VM 114, a guest OS is further executed.
  • VMs virtual computers
  • the storage device 130 provides a storage area used by the guest OS.
  • the storage device 130 includes a controller (not shown), an interface, and a plurality of storage devices.
  • As the storage device for example, an HDD (Hard Disk Drive) and an SSD (Solid State Drive) can be considered.
  • the storage device 130 creates a plurality of logical disks 131 from the storage areas of each of the plurality of storage devices, and allocates the logical disks 131 to the guest OS on the VM 114.
  • the client device 140 is a computer operated by a user who uses a service provided by the computer 100.
  • the client device 140 includes a CPU, memory, storage device, NIC, and the like (not shown).
  • the computer 100 includes one or more CPUs 101, a memory 102, a storage device 103, an HBA 104, and a NIC 105 as computer resources. Each component included in the computer 100 is connected to each other via an internal bus or the like. Note that the computer 100 may include an I / O device other than the HBA 104.
  • CPU 101 executes a program stored in memory 102.
  • Various functions of the computer 100 can be realized by the CPU 101 executing the program.
  • a program when mainly described, it indicates that the program is being executed by the CPU 101.
  • the CPU 101 has a plurality of CPU cores that execute various arithmetic processes.
  • the CPU core has a cache memory (not shown), and the CPU 101 has a cache memory accessible to all CPU cores.
  • the memory 102 stores a plurality of programs executed by the CPU 101 and information used for executing the plurality of programs. Note that the memory 102 may be either a volatile memory or a nonvolatile memory.
  • the storage device 103 stores programs and information.
  • the storage device 103 may be an HDD, an SSD, or the like.
  • the program and information stored in the memory 102 may be stored in the storage device 103.
  • the CPU 101 reads out the program and information from the storage device 103 and loads it onto the memory 102.
  • the HBA 104 is an interface for connecting to the storage apparatus 130 via the network 150.
  • the HBA 104 includes a plurality of HBA cores 120 and a register group 125.
  • the HBA 104 includes a memory (not shown).
  • the HBA core 120 executes a program that realizes firmware (FW) 121 that executes predetermined processing.
  • the register group 125 is a set of registers for controlling interrupts of I / O processing.
  • the computer of Example 1 supports the multi-queue function.
  • an interrupt factor can be defined for each combination of the CPU 101, the HBA core 120, and the guest OS.
  • an interrupt factor and a pair of an I / O activation queue and an I / O response queue are associated one-to-one.
  • interrupt elements such as the CPU 101, the HBA core 120, and the guest OS that define interrupt factors are also described as interrupt elements.
  • the I / O activation queue and the I / O response queue are not distinguished from each other, the I / O activation queue and the I / O response queue pair are also simply referred to as an I / O queue. .
  • I / O queue pairs are generated by the number of multiplication values that the CPU 101, the HBA core 120, and the guest OS can take. Is done. At this time, when the I / O queue pair and the interrupt vector are associated one-to-one, the performance of the I / O processing is the highest.
  • the hypervisor 110 and the OS such as the guest OS have a limit on the number of interrupt vectors that can be secured. For this reason, when the number of interrupt vectors with the maximum I / O performance is larger than the number of interrupt vectors that can be secured by the OS, it is necessary to set so that a plurality of interrupt factors share one interrupt vector.
  • Interrupt vector sharing can be realized by assigning one interrupt vector to possible values of one interrupt element. For example, in the case of a computer system in which two guest OSs are operating, the CPU 101 and the HBA core are the same, and one interrupt vector is assigned to two interrupt factors that are different only in the guest OS type, so that the computer 100 is set. The number of interrupt vectors to be used is half of the maximum number of interrupt vectors.
  • the conventional register group 125 When a plurality of interrupt factors are set so as to share one interrupt vector, the conventional register group 125 includes an interrupt factor register for each HBA core 120 and an interrupt factor reset register for each HBA core 120. . In addition, the conventional register group 125 includes registers for determining interrupt elements such as the guest OS and the CPU 101 in order to specify an interrupt factor.
  • the register group 125 of the first embodiment is characterized in that it includes only an interrupt factor number notification register 251 (FIG. 2) and an interrupt factor number reset register as will be described later.
  • the NIC 105 is an interface for connecting to the client device 140 via the network 160.
  • the memory 102 stores a program for realizing the hypervisor 110 and the HBA device driver 111.
  • a part of the storage area of the memory 102 is secured as a PCI memory space 112 and a data transfer area 113.
  • data that is the substance of the VM 114 is stored in a part of the storage area of the memory 102.
  • the hypervisor 110 provides a virtual environment using the computer resources described above. Specifically, the hypervisor 110 generates a plurality of VMs 114 by logically dividing computer resources, and operates a guest OS on each VM 114. In the example illustrated in FIG. 1, three VMs 114 are managed by the hypervisor 110.
  • the HBA device driver 111 is a driver that controls the HBA 104. Specifically, the HBA device driver 111 controls the HBA 104 in order to access the storage apparatus 130.
  • the PCI memory space 112 is a storage area (MMIO space) for the CPU 101 to access an I / O device such as the HBA 104.
  • the data transfer area 113 is a storage area (DMA area) for transferring data read or written by the HBA device driver 111 and the FW 121.
  • the PCI memory space 112 is a memory space in which the register group 125 or the like in the HBA 104 is mapped to the address space of the memory 102.
  • the memory space accessed by the CPU 101 includes an address area for accessing a main storage device such as the memory 102 and an address area for accessing an I / O device such as the HBA 104.
  • the PCI memory space 112 according to the first embodiment is an address area for accessing an I / O device.
  • the I / O device recognizes that there is an access to the memory address to which the I / O device is mapped, and sends a response to the access to the register held by the I / O device to the CPU 101. return.
  • FIG. 2 is a block diagram for explaining an overview of the processing flow in the computer 100 according to the first embodiment.
  • the HBA device driver 111 includes an interrupt handler 200 and a transmission unit 220, and holds a mapping table 210 and I / O queue information 230.
  • the interrupt handler 200 is a functional unit that realizes processing or control corresponding to an interrupt from the HBA 104.
  • the transmission unit 220 is a functional unit that transmits various instructions and information in response to a request received from the guest OS.
  • the mapping table 210 is information for managing the correspondence between interrupt factor numbers and interrupt vectors (vector numbers). Details of the interrupt factor number will be described later with reference to FIG. Details of the mapping table 210 will be described later with reference to FIG.
  • the I / O queue information 230 is information for managing the correspondence between interrupt factor numbers, interrupt factors, and I / O queues.
  • I / O queue there are two queues: an I / O activation queue and an I / O response queue. Details of the I / O queue information 230 will be described later with reference to FIG.
  • the data transfer area 113 includes an I / O activation queue group 260, an I / O response queue group 270, and an FW-driver interface area 280.
  • the I / O activation queue group 260 includes a plurality of I / O activation queues.
  • the I / O response queue group 270 includes a plurality of I / O response queues.
  • the FW-driver interface area 280 is a storage area operated during communication between the FW 121 and the HBA device driver 111.
  • the FW-driver interface area 280 includes a shared information area 281 and a communication area 282.
  • the shared information area 281 is a storage area for storing information shared by the FW 121 and the HBA device driver 111.
  • the shared information area 281 of the first embodiment stores an I / O queue address table 700 (see FIG. 7).
  • the communication area 282 is a storage area that is accessed when communication processing is executed.
  • the shared information area 281 stores interrupt factor number definition information, which will be described later.
  • the PCI memory space 112 includes an interrupt vector table 240 and a register group 250.
  • the interrupt vector table 240 is information for managing the correspondence between the interrupt vector and the interrupt handler 200.
  • the interrupt vector table 240 is a well-known one, and a detailed description thereof will be omitted.
  • the register group 250 is a memory address for the HBA device driver 111 to access the register group 125 itself of the HBA 104.
  • the HBA device driver 111 When the HBA device driver 111 receives a communication processing execution request from the guest OS on the VM 114, the HBA device driver 111 instructs the FW 121 to execute the processing by accessing the FW-driver interface area 280.
  • the FW 121 executes the instructed process, and then generates an interrupt including a predetermined interrupt vector.
  • the CPU 101 refers to the interrupt vector table 240 and calls the interrupt handler 200 corresponding to the notified interrupt vector.
  • the interrupt handler 200 of the HBA device driver 111 refers to a register included in the register group 250 and identifies an interrupt factor. Furthermore, the interrupt handler 200 identifies a response destination guest OS based on the identified interrupt factor, and notifies the identified guest OS of the completion of the requested communication process.
  • the HBA device driver 111 can uniquely identify the interrupt factor from the interrupt vector, and therefore does not need to access the register group 250. The above is the description of the flow of conventional communication processing.
  • the HBA device driver 111 When the HBA device driver 111 receives an I / O processing execution request from the guest OS on the VM 114, the HBA device driver 111 instructs the FW 121 to execute the processing by accessing the FW-driver interface area 280.
  • the FW 121 executes processing instructed to the storage apparatus 130, and then generates an interrupt including a predetermined interrupt vector.
  • the CPU 101 refers to the interrupt vector table 240 and calls the interrupt handler 200 corresponding to the notified interrupt vector.
  • the interrupt handler 200 of the HBA device driver 111 refers to a register included in the register group 250 and identifies an interrupt factor. Furthermore, the interrupt handler 200 identifies the response destination guest OS based on the identified interrupt factor, and notifies the identified guest OS of the completion of the requested I / O processing.
  • the HBA device driver 111 can uniquely identify the interrupt factor from the interrupt vector, and therefore does not need to access the register group 250. The above is the description of the flow of conventional I / O processing.
  • the HBA device driver 111 accesses a plurality of types of registers multiple times in order to identify the interrupt factor. There is a need. However, the access processing via the PCI memory space 112 increases the processing cost and causes the performance of the I / O processing to deteriorate.
  • the above-described problem is solved by using a new identification number called an interrupt factor number.
  • FIG. 3 is an explanatory diagram showing an example of the structure of the interrupt factor number according to the first embodiment.
  • FIG. 4 is an explanatory diagram illustrating an example of the interrupt factor number notification register 251 according to the first embodiment.
  • the HBA device driver 111 generates an interrupt factor number as shown in FIG. 3 based on the interrupt factor.
  • the interrupt factor number is defined based on the bit string.
  • FIG. 3 shows an interrupt factor number composed of an 11-bit bit string. Therefore, the HBA device driver 111 can generate 512 interrupt factor numbers. When the length of the bit string is 12 bits, the number of interrupt factor numbers that can be generated is 1024.
  • the HBA device driver 111 associates one or more bits with one interrupt element in advance.
  • definition information for generating an interrupt factor number is registered in the HBA device driver 111 in advance as interrupt factor number definition information.
  • the definition information includes a bit length defining an interrupt factor number, a type of interrupt element, a bit position corresponding to the interrupt element in a bit string defining the interrupt factor number, a bit length of the interrupt element, and the like.
  • interrupt elements include the CPU 101, the HBA core 120, the interrupt type, the interrupt priority, and the guest OS.
  • the upper 2 bits of the bit string are bits corresponding to the CPU 101 identification number.
  • the next 2 bits are bits corresponding to the identification number of the HBA core 120.
  • the next 2 bits are bits corresponding to the interrupt type.
  • the interrupt type is information for identifying an interrupt of an I / O process or an interrupt of a communication process.
  • the next 1 bit of the interrupt type is a bit corresponding to the interrupt priority indicating the priority order of interrupts.
  • the next 4 bits are bits corresponding to the guest OS that notifies the interrupt response.
  • bit length of each interrupt element and the position of the bit associated with each interrupt element can be appropriately changed according to the hardware configuration and software configuration of the computer 100.
  • the HBA 104 holds a bitmap having a predetermined size as the interrupt factor number notification register 251 in advance.
  • Each bit of the bitmap is associated with an interrupt factor number defined using a bit string as shown in FIG. That is, one bit of the bitmap corresponds to one interrupt factor number.
  • the interrupt factor number notification register 251 in the bitmap format can be interpreted as shown in FIG.
  • the number of guest OSs is “16” and the priority is either “0” or “1”.
  • the bit map columns are arranged in the order of interrupt elements corresponding to the least significant bits of the bit string, that is, the guest OS identification numbers.
  • Each row of the bitmap is arranged based on a combination of interrupt elements (priority, interrupt type, HBA core 120, and CPU 101) corresponding to the upper bits of the bit string. More specifically, the bitmap row is configured so that it can be identified from the least significant bit of the bit string defining the interrupt factor number.
  • the meaning of the row and column of the bitmap can be changed by changing the configuration of the bit string of the interrupt factor number.
  • the number of bits included in the bitmap may be larger than the number of interrupt factor numbers.
  • the HBA device driver 111 stores the interrupt factor number definition information and operation information indicating how to use the interrupt factor number notification register 251 in the shared information area 281.
  • the FW 121 of the HBA 104 manages the bit position of the bitmap and the interrupt factor number so as to correspond to each other as shown in FIG. 4 based on the definition information of the interrupt factor number. Also, the FW 121 of the HBA 104 operates the bit of the interrupt factor number notification register 251 based on the operation information.
  • the HBA device driver 111 can specify the interrupt factor from the bit of the bitmap as will be described later. Specifically, the following processing is executed in the I / O processing or communication processing.
  • the FW 121 of the HBA 104 refers to the interrupt factor number notification register 251 when executing the I / O process or the communication process, and manipulates the bit that matches the interrupt factor corresponding to the I / O process.
  • the HBA device driver 111 refers to the interrupt factor number notification register 251, that is, the bit map as shown in FIG. 4, and identifies which bit is being operated. As described above, since the bit position and the interrupt factor number have a one-to-one correspondence, the HBA device driver 111 can specify the interrupt factor number based on the bit value of the interrupt factor number notification register 251.
  • FIG. 5 is an explanatory diagram illustrating an example of the I / O queue information 230 according to the first embodiment.
  • the I / O queue information 230 stores a plurality of entries for managing interrupt factor numbers, interrupt factors, and I / O queue correspondences.
  • the entry includes an interrupt factor number 501, an HBA core number 502, a CPU number 503, a guest OS number 504, an I / O activation queue address 505, and an I / O response queue address 506.
  • Interrupt factor number 501 is a column that stores interrupt factor numbers. In this embodiment, it is assumed that the interrupt factor number 501 of each entry is stored in ascending order.
  • the HBA core number 502, the CPU number 503, and the guest OS number 504 are interrupt element identification information.
  • the HBA core number 502 is a column that stores the identification number of the HBA core 120 that executes the I / O processing.
  • the CPU number 503 is a column that stores the identification number of the CPU 101 that executes the response process.
  • the guest OS number 504 is a column that stores the identification number of the guest OS that notifies the response to the I / O processing.
  • the I / O activation queue address 505 is a column that stores an address indicating the position of the I / O activation queue in which an I / O command for realizing I / O processing is inserted.
  • the I / O response queue address 506 is a column that stores an address indicating the position of the I / O response queue in which a response command for realizing response processing is inserted.
  • 6A and 6B are explanatory diagrams illustrating an example of the mapping table 210 according to the first embodiment.
  • the mapping table 210 stores a plurality of entries for managing the correspondence relationship between the interrupt vector, the interrupt factor number, and the interrupt handler 200.
  • the entry includes an interrupt vector 601, an interrupt factor number 602, and an interrupt handler 603.
  • the interrupt vector 601 is a column for storing an interrupt vector.
  • the interrupt factor number 602 is a column for storing an interrupt factor number associated with an interrupt vector.
  • the interrupt handler 603 is a column that stores identification information of the interrupt handler 200 that is activated when an interrupt vector is received.
  • FIG. 6A shows the mapping table 210 when the interrupt vector and the interrupt factor number are associated one-to-one.
  • FIG. 6B shows the mapping table 210 when a plurality of interrupt factor numbers are associated with one interrupt vector.
  • the HBA device driver 111 associates the interrupt factor numbers with the interrupt vectors so that the interrupt factor numbers are continuous.
  • consecutive interrupt factor numbers in one row are numbers corresponding to interrupt factors having different values of interrupt elements such as the CPU 101 and the HBA core 120, and different only in the guest OS. For this reason, the HBA device driver 111 reads the values of consecutive bits in the bit table at a time when an interrupt vector is notified when a plurality of interrupt factor numbers are shared by one interrupt vector.
  • the interrupt factor number corresponding to can be specified.
  • the general HBA device driver 111 can read out the value of 32 bits by one reading because the size of data that can be read from the register group 125 at a time is 4 bytes. Therefore, it is possible to reduce the number of readings of the register group 125 necessary for specifying the interrupt factor number.
  • FIG. 7 is an explanatory diagram illustrating an example of the I / O queue address table 700 according to the first embodiment.
  • the I / O queue address table 700 stores a plurality of entries for managing the correspondence between interrupt factor numbers and I / O queues. Each entry includes an interrupt factor number 701, an I / O activation queue address 702, and an I / O response queue address 703.
  • the interrupt factor number 701, the I / O activation queue address 702, and the I / O response queue address 703 are the same as the interrupt factor number 501, the I / O activation queue address 505, and the I / O response queue address 506, respectively. It is.
  • FIG. 8 is a flowchart illustrating an initial setting process executed by the HBA device driver 111 according to the first embodiment.
  • the HBA device driver 111 starts the initial setting process at a predetermined timing.
  • the initial setting process is started when the computer 100 is turned on or when an execution instruction is given by the administrator of the computer 100.
  • the HBA device driver 111 determines the number of I / O queue pairs based on the system configuration of the computer 100, and generates an I / O queue (step S801).
  • the number of I / O queue pairs coincides with the number of I / O interrupt factors.
  • the HBA device driver 111 uses the following equation (1) to calculate I / O queue pairs: Determine the number of.
  • the number of guest OSs may be either the maximum number of guest OSs that can be set in the computer 100 or the number of guest OSs currently running on the computer 100.
  • the HBA device driver 111 generates an interrupt factor number corresponding to each I / O interrupt factor, and assigns the generated interrupt factor number to each I / O queue (step S802). In step S802, for example, the following processing is executed.
  • the HBA device driver 111 prepares a bit string of a predetermined length based on the definition information of the interrupt factor number, and associates the bit of each bit string with the interrupt element. Furthermore, the HBA device driver 111 generates an interrupt factor number corresponding to the I / O interrupt factor by setting the value of the interrupt element in each bit.
  • the HBA device driver 111 generates an interrupt factor number so that an interrupt factor is different for only an interrupt factor corresponding to the least significant bit in the bit string. As a result, the bitmap can be interpreted as shown in FIG.
  • the HBA device driver 111 prepares empty I / O queue information 230 and sets the generated interrupt factor number in the interrupt factor number 501 of the I / O queue information 230. Further, the HBA device driver 111 sets values for the HBA core number 502, the CPU number 503, and the guest OS number 504 based on the interrupt factor corresponding to the interrupt factor number.
  • the HBA device driver 111 assigns one interrupt factor number to each I / O queue pair. That is, the same interrupt factor number is assigned to the I / O transmission queue and the I / O response queue constituting the pair.
  • the HBA device driver 111 sets the address of the I / O transmission queue in the I / O activation queue address 505 of the I / O queue information 230, and also sets the I / O response queue in the I / O response queue address 506. Set the address.
  • the HBA device driver 111 generates an interrupt factor number corresponding to an interrupt factor other than the I / O interrupt factor, and assigns the generated interrupt factor number to each interrupt factor (step S803).
  • the method for generating the interrupt factor number is the same as that in step S802.
  • the HBA device driver 111 stores information (not shown) for managing the correspondence between the interrupt factor number and the interrupt factor on the memory 102.
  • the information stores a plurality of entries including an interrupt factor number, an identification number of the HBA core 120, an identification number of the CPU 101, and an identification number of the guest OS.
  • the HBA device driver 111 calculates the total number of interrupt factors by adding the number of I / O interrupt factors and the number of interrupt factors other than I / O (step S804).
  • the HBA device driver 111 makes an inquiry to the hypervisor 110 to check the number of interrupt vectors that can be secured by the hypervisor 110 (step S805). Further, the HBA device driver 111 determines whether or not the number of interrupt vectors that can be secured by the hypervisor 110 is equal to or greater than the total number of interrupt factors (step S806).
  • the HBA device driver 111 sets a sharing method for a plurality of interrupt factors to share one interrupt vector (step S807). It is assumed that the sharing method is set in the HBA device driver 111 in advance.
  • the HBA device driver 111 sets the vector sharing mode based on the set sharing method (step S808). Thereafter, the HBA device driver 111 proceeds to step S810. Specifically, the HBA device driver 111 is set so that the interrupt factor number notification register 251 can be accessed.
  • step S806 If it is determined in step S806 that the number of interrupt vectors that can be secured by the hypervisor 110 is equal to or greater than the total number of interrupt factors, the HBA device driver 111 sets the vector occupation mode (step S809). Thereafter, the HBA device driver 111 proceeds to step S810.
  • step S810 the HBA device driver 111 generates the mapping table 210 by associating the interrupt vector and the interrupt factor in accordance with each operation mode (vector occupation mode or vector sharing mode) (step S810).
  • each operation mode vector occupation mode or vector sharing mode
  • the HBA device driver 111 associates the interrupt vector with the interrupt factor number on a one-to-one basis. Assume that the association method is preset.
  • the HBA device driver 111 generates an empty mapping table 210 and sets interrupt vectors in the ascending order in the interrupt vector 601. Further, the HBA device driver 111 sets an interrupt factor number associated with each interrupt vector in the interrupt factor number 602.
  • the HBA device driver 111 sets access information to the interrupt handler corresponding to the interrupt factor in the interrupt handler 603.
  • the HBA device driver 111 associates a plurality of consecutive interrupt factor numbers with one interrupt vector. Specifically, a plurality of interrupt factors having the same interrupt element corresponding to the upper bit and different interrupt elements corresponding to the lowest bit share one interrupt vector. From another viewpoint, a plurality of interrupt factor numbers for calling the same interrupt handler 200 share one interrupt vector.
  • the HBA device driver 111 associates the interrupt vector and the interrupt factor number so that the interrupt factor number is a serial number as much as possible.
  • the HBA device driver 111 generates an empty mapping table 210 and sets interrupt vectors in the ascending order in the interrupt vector 601. Further, the HBA device driver 111 sets a plurality of interrupt factor numbers associated with each interrupt vector in the interrupt factor number 602.
  • the HBA device driver 111 sets access information to the interrupt handler corresponding to the interrupt factor in the interrupt handler 603.
  • the HBA device driver 111 generates the I / O queue address table 700 in the shared information area 281 (step S811). Thereafter, the HBA device driver 111 ends the initial setting process.
  • the HBA device driver 111 registers the same number of entries as the number of entries registered in the I / O queue information 230 in the empty I / O queue address table 700.
  • the HBA device driver 111 adds an interrupt factor number 501, an I / O activation queue address 505, and an I / O response to the interrupt factor number 701, I / O activation queue address 702, and I / O response queue address 703 of each entry.
  • the same value as the queue address 506 is set.
  • the HBA device driver 111 notifies the FW 121 of the definition information and operation information of the interrupt factor number.
  • the operation information defines that the FW 121 operates the interrupt factor number notification register 251 when operating in the vector sharing mode and receiving an instruction to execute an I / O command including an interrupt factor number. Thereby, the FW 121 can operate the interrupt factor number notification register 251 in cooperation with the HBA device driver 111.
  • FIG. 9 is an explanatory diagram illustrating an internal operation of the computer 100 in the communication processing according to the first embodiment.
  • the VM 114 requests the HBA device driver 111 to execute communication processing via the hypervisor 110.
  • the transmission unit 220 of the HBA device driver 111 instructs the FW 121 of the HBA 104 to execute communication processing via the communication area 282.
  • the instruction includes an interrupt vector and an interrupt notification number.
  • the FW 121 of the HBA 104 executes communication processing. Further, the FW 121 of the HBA 104 refers to the interrupt factor number notification register 251 and manipulates a bit that matches the interrupt factor number corresponding to the communication process. Thereafter, the FW 121 of the HBA 104 generates an interrupt including an interrupt vector.
  • the CPU 101 refers to the interrupt vector table 240 based on the interrupt vector included in the generated interrupt and calls the interrupt handler 200 corresponding to the interrupt vector.
  • the interrupt handler 200 determines whether or not the interrupt vector is shared.
  • the interrupt handler 200 can uniquely identify the interrupt factor, and thus responds to the VM 114 that is the response destination of the interrupt as it is.
  • the interrupt handler 200 executes the following process.
  • the interrupt handler 200 refers to the mapping table 210 based on the interrupt vector, and specifies a plurality of interrupt factor numbers associated with the interrupt vector.
  • the interrupt handler 200 can identify the interrupt factor by reading the values of the four bits from the interrupt factor number as the starting point.
  • the interrupt factor number as the starting point is the smallest interrupt factor number among the interrupt factor numbers registered in the interrupt factor number 602.
  • the interrupt handler 200 reads the value of four bits from the bit as the starting point from the interrupt factor number notification register 251. Furthermore, the interrupt handler 200 specifies an interrupt factor number corresponding to the generated interrupt based on the read bit value.
  • the interrupt handler 200 identifies the interrupt response destination VM 114 by analyzing the identified interrupt factor number. Furthermore, the interrupt handler 200 responds to the VM 114 that is the response destination of the interrupt.
  • FIG. 10 is an explanatory diagram illustrating an internal operation of the computer 100 in the I / O processing according to the first embodiment.
  • FIG. 12A, FIG. 12B, FIG. 13A, and FIG. 13B are sequence diagrams illustrating the flow of I / O processing according to the first embodiment.
  • 11 shows the flow of I / O processing in the vector occupation mode
  • FIGS. 12A, 12B, 13A, and 13B show the flow of I / O processing in the vector sharing mode.
  • the HBA device driver 111 When the HBA device driver 111 receives an I / O request from the VM 114 via the hypervisor 110, the HBA device driver 111 starts I / O processing.
  • the transmission unit 220 of the HBA device driver 111 refers to the I / O queue information 230 and inserts an I / O command into the I / O activation queue corresponding to the interrupt factor (step S1101).
  • the interrupt factor number is “32”.
  • the mapping table 210 is in the state shown in FIG. 6A. Therefore, the interrupt vector assigned to the interrupt factor number “32” is “2”.
  • the transmission unit 220 of the HBA device driver 111 instructs the HBA 104 to execute the I / O command inserted in the I / O processing queue (step S1102).
  • the HBA device driver 111 refers to the mapping table 210 and specifies an interrupt vector associated with the interrupt factor number.
  • the HBA device driver 111 outputs an I / O command execution instruction including an interrupt vector and an interrupt factor number to the FW 121 of the HBA 104.
  • the instruction includes an interrupt vector “2” and an interrupt factor number “32”.
  • the FW 121 of the HBA 104 When the FW 121 of the HBA 104 receives an I / O command execution instruction from the HBA device driver 111, the FW 121 acquires the addresses of the I / O activation queue and the I / O response queue associated with the interrupt factor number (step S1103).
  • the FW 121 refers to the I / O queue address table 700 based on the interrupt factor number, and searches for an entry in which the interrupt factor number 701 matches the interrupt factor number included in the execution instruction.
  • the FW 121 uses the I / O activation queue address 702 and the I / O response queue address 703 of the retrieved entry to determine the I / O transmission queue in which the I / O command is inserted and the I / O response queue used at the time of response. Get the address.
  • the FW 121 of the HBA 104 reads the I / O command from the I / O activation queue based on the acquired address, and executes the I / O command (step S1104). As a result, the I / O processing for the storage apparatus 130 is executed.
  • the FW 121 of the HBA 104 accesses the storage device 130 according to the processing content of the I / O processing.
  • the FW 121 of the HBA 104 When the FW 121 of the HBA 104 receives an I / O completion notification from the storage device 130 (step S1105), it inserts a response command into the I / O response queue, and further responds to the interrupt vector notified from the HBA device driver 111. An interrupt is generated (step S1106). Here, the FW 121 of the HBA 104 generates an interrupt for the interrupt vector “2”.
  • the CPU 101 refers to the interrupt vector table 240 based on the interrupt vector included in the generated interrupt and calls the interrupt handler 200 corresponding to the interrupt vector.
  • the interrupt handler 200 refers to the mapping table 210 and determines whether or not the interrupt vector is shared. In the mapping table 210 shown in FIG. 6A, since one interrupt factor number is assigned to one interrupt vector, the interrupt handler 200 determines that the interrupt vector is not shared.
  • the interrupt handler 200 can uniquely identify the interrupt factor. Therefore, the interrupt handler 200 refers to the mapping table 210 and acquires the interrupt factor number corresponding to the interrupt vector (step S1107). Further, the interrupt handler 200 refers to the I / O queue information 230 and searches for an entry in which the interrupt factor number 501 matches the acquired interrupt factor number. The interrupt handler 200 acquires the address of the I / O response queue from the I / O response queue address 506 of the retrieved entry.
  • the interrupt handler 200 reads a response command from the I / O response queue corresponding to the interrupt factor number, and executes response processing based on the response command (step S1108). As a result, a response can be notified to the VM 114 that has transmitted the I / O request.
  • I / O processing in the vector sharing mode will be described with reference to FIGS. 10, 12A, and 12B.
  • the HBA device driver 111 When the HBA device driver 111 receives an I / O request from the VM 114 via the hypervisor 110, the HBA device driver 111 starts I / O processing.
  • the interrupt factor number is “32”.
  • the mapping table 210 is in the state shown in FIG. 6B. Therefore, the interrupt vector assigned to the interrupt factor number “32” is “1”.
  • the interrupt vector “1” is shared with other interrupt factor numbers “33”, “34”, and “35”.
  • step S1201 to step S1205 Since the processing from step S1201 to step S1205 has the same contents as the processing from step S1101 to step S1105, description thereof will be omitted.
  • the FW 121 of the HBA 104 When receiving the I / O completion notification from the storage device 130, the FW 121 of the HBA 104 operates the bit corresponding to the notified interrupt factor number among the bits included in the interrupt factor number notification register 251 (step S1206). .
  • the FW 121 of the HBA 104 operates the bit corresponding to the interrupt factor number “32”.
  • the FW 121 of the HBA 104 inserts a response command into the I / O response queue, and further generates an interrupt for the interrupt vector from the HBA device driver 111 (step S1207).
  • the FW 121 of the HBA 104 generates an interrupt for the interrupt vector “1”.
  • the CPU 101 refers to the interrupt vector table 240 based on the interrupt vector included in the generated interrupt and calls the interrupt handler 200 corresponding to the interrupt vector.
  • the interrupt handler 200 refers to the mapping table 210 and determines whether or not the interrupt vector is shared. In the mapping table 210 shown in FIG. 6B, the interrupt handler 200 determines that the interrupt vector is shared because four interrupt factor numbers share one interrupt vector.
  • the interrupt handler 200 acquires all interrupt factor numbers sharing the interrupt vector notified from the HBA device driver 111 from the mapping table 210 (step S1208). Here, since the interrupt vector is “1”, the interrupt handler 200 acquires four interrupt factor numbers “32”, “33”, “34”, and “35”.
  • the interrupt handler 200 refers to the interrupt factor number notification register 251 and identifies an interrupt notification number corresponding to the generated interrupt (step S1209). Specifically, the following processing is executed.
  • the interrupt handler 200 selects a reference interrupt factor number from among a plurality of interrupt factor numbers acquired from the mapping table 210.
  • the interrupt handler 200 selects the interrupt factor number having the smallest value as the reference interrupt factor number. That is, “32” is selected as the reference interrupt factor number.
  • the interrupt handler 200 refers to the interrupt factor number notification register 251 and reads the value of a predetermined number of bits including the bit corresponding to the reference interrupt factor number. For example, it is assumed that the interrupt handler 200 reads a value of a 4-bit bit that is larger than the reference interrupt factor number and that is continuous from the reference interrupt factor number. In this case, the interrupt handler 200 reads values of four bits from “32” to “35”.
  • the interrupt handler 200 can specify the interrupt factor number corresponding to the bit by specifying the bit being operated based on the read bit value.
  • the interrupt handler 200 reads a predetermined range of bit values at a time. Therefore, when a plurality of discontinuous interrupt factor numbers are assigned to one interrupt vector, the interrupt handler 200 needs to frequently access the interrupt factor number notification register 251.
  • the HBA device driver 111 assigns a plurality of consecutive interrupt factor numbers to one interrupt vector.
  • the interrupt handler 200 can grasp the operation states of a plurality of interrupt factor numbers sharing one interrupt vector with a small number of read processes.
  • the interrupt handler 200 can specify that the interrupt factor number corresponding to the interrupt is “32” by executing the processing described above. The above is the description of the processing in step S1209.
  • the interrupt handler 200 resets the value of the bit read in step S1208 among the bits of the interrupt factor number notification register 251 (step S1210).
  • the interrupt handler 200 resets the values of a plurality of bits whose values have been read. For example, when the interrupt handler 200 reads the 4-bit value from the interrupt factor number “32” once, the interrupt handler 200 resets the values of the four bits from the interrupt factor numbers “32” to “35”. Further, when the interrupt handler 200 reads the 4-bit value from the interrupt factor number “32” twice, the interrupt handler 200 resets the values of the eight bits from the interrupt factor numbers “32” to “39”.
  • the interrupt handler 200 reads a response command from the I / O response queue corresponding to the specified interrupt factor number, and executes a response process based on the response command (step S1211).
  • FIGS. 10, 13A, and 13B show the flow of I / O processing when a plurality of I / O processing occurs continuously.
  • the HBA 104 holds a register for each HBA core 120 in order to specify an interrupt factor. For this reason, when a plurality of I / O processes using the same HBA core 120 are executed, the plurality of I / O processes cannot be processed in parallel, and must be sequentially processed (serialized).
  • the HBA device driver 111 refers to a register held by the HBA core 120 in order to identify the cause of the interrupt and cannot operate the register until the reset is performed.
  • the HBA 104 of the first embodiment only needs to hold the interrupt factor number notification register 251 and does not need to hold a register for each HBA core. Therefore, the problem as described above does not occur. Therefore, the computer 100 according to the first embodiment can execute a plurality of I / O processes in parallel regardless of the interrupt factor corresponding to the I / O process.
  • interrupt factor numbers “32” and “33” are executed as I / O processes using the same HBA core 120.
  • interrupt factor numbers do not have to be consecutive.
  • the transmission unit 220 of the HBA device driver 111 refers to the I / O queue information 230 and inserts an I / O command into the I / O activation queue corresponding to the interrupt factor (steps S1301 and S1302). Specifically, the transmission unit 220 inserts an I / O command into each of the I / O activation queue corresponding to the interrupt factor number “32” and the I / O activation queue corresponding to the interrupt factor number “33”. .
  • the transmission unit 220 of the HBA device driver 111 instructs the FW 121 of the HBA 104 to execute the I / O command inserted in the I / O processing queue (steps S1303 and S1304). Specifically, the HBA device driver 111 transmits an I / O command execution instruction including the interrupt vector “1” and the interrupt factor number “32” to the FW 121 of the HBA 104, and the interrupt vector “1” and the interrupt factor An instruction to execute an I / O command including the number “33” is transmitted to the FW 121 of the HBA 104.
  • the FW 121 of the HBA 104 When the FW 121 of the HBA 104 receives an instruction to execute an I / O command including the interrupt vector “1” and the interrupt factor number “32” from the HBA device driver 111, the FW 121 and the I / O activation queue associated with the interrupt factor number The address of the I / O response queue is acquired (step S1305). Further, the FW 121 of the HBA 104 reads the I / O command from the I / O activation queue based on the acquired address, and executes the I / O command (step S1306).
  • the FW 121 of the HBA 104 When the FW 121 of the HBA 104 receives an instruction to execute an I / O command including the interrupt vector “1” and the interrupt factor number “33” from the HBA device driver 111, the I / O activation associated with the interrupt factor number is performed.
  • the addresses of the queue and the I / O response queue are acquired (step S1307). Further, the FW 121 of the HBA 104 reads the I / O command from the I / O activation queue based on the acquired address, and executes the I / O command (step S1308).
  • the FW 121 of the HBA 104 When the FW 121 of the HBA 104 receives a notification of completion of I / O corresponding to the interrupt factor number “32” from the storage device 130 (step S1309), the interrupt factor number among the bits included in the interrupt factor number notification register 251 The bit corresponding to “32” is manipulated (step S1311). Further, the FW 121 of the HBA 104 inserts a response command into the I / O response queue, and further generates an interrupt for the interrupt vector “1” (step S1313).
  • the FW 121 of the HBA 104 receives a notification of completion of I / O corresponding to the interrupt factor number “33” from the storage device 130 (step S1310), among the bits included in the interrupt factor number notification register 251, the interrupt The bit corresponding to the factor number “33” is manipulated (step S1312). Further, the FW 121 of the HBA 104 inserts a response command into the I / O response queue, and further generates an interrupt for the interrupt vector “1” (step S1314).
  • the interrupt handler 200 acquires all interrupt factor numbers sharing the interrupt vector from the mapping table 210 (step S1315). Here, since the interrupt vector is “1”, the interrupt handler 200 acquires four interrupt factor numbers “32”, “33”, “34”, and “35”.
  • the interrupt handler 200 refers to the interrupt factor number notification register 251 and specifies that the interrupt notification numbers corresponding to the generated interrupt are “32” and “33” (step S1316).
  • the interrupt handler 200 resets the value of the bit read in step S1315 among the bits of the interrupt factor number notification register 251 (step S1317).
  • the interrupt handler 200 reads a response command from the I / O response queue corresponding to each of the interrupt factor numbers “32” and “33”, and executes response processing based on the response command (step S1318).
  • the HBA 104 does not need to hold a register for each HBA core 121, and only holds the interrupt factor number notification register 251. Therefore, the problems as described above can be solved.
  • the computer 100 may hold only the interrupt factor number notification register 251 as a register for specifying an interrupt factor. Therefore, the hardware cost can be reduced.
  • the interrupt handler 200 of the first embodiment can identify the interrupt factor at high speed by accessing the interrupt factor number notification register 251.
  • the interrupt factor can be identified at high speed by reading the value of consecutive bits in the interrupt factor number notification register 251. That is, the HBA device driver 111 can specify the interrupt factor by accessing the interrupt factor number notification register 251 once or a small number of times.
  • the computer since the computer according to the first embodiment does not need to hold a register for each HBA core 120, even when a plurality of I / O processes occur continuously, the computer can execute the processes in parallel. it can.
  • the determination of the interrupt factor number, management, and interrupt processing using the interrupt factor number are performed by the HBA device driver 111 and the FW 121. Therefore, it is possible to respond flexibly without being limited to the configuration of the computer 100.
  • this invention is not limited to the above-mentioned Example, Various modifications are included. Further, for example, the above-described embodiments are described in detail for easy understanding of the present invention, and are not necessarily limited to those provided with all the described configurations. Further, a part of the configuration of each embodiment can be added to, deleted from, or replaced with another configuration.
  • each of the above-described configurations, functions, processing units, processing means, and the like may be realized by hardware by designing a part or all of them with, for example, an integrated circuit.
  • the present invention can also be realized by software program codes that implement the functions of the embodiments.
  • a storage medium in which the program code is recorded is provided to the computer, and a CPU included in the computer reads the program code stored in the storage medium.
  • the program code itself read from the storage medium realizes the functions of the above-described embodiments, and the program code itself and the storage medium storing it constitute the present invention.
  • Examples of storage media for supplying such program codes include flexible disks, CD-ROMs, DVD-ROMs, hard disks, SSDs (Solid State Drives), optical disks, magneto-optical disks, CD-Rs, magnetic tapes, A non-volatile memory card, ROM, or the like is used.
  • program code for realizing the functions described in this embodiment can be implemented by a wide range of programs or script languages such as assembler, C / C ++, Perl, Shell, PHP, Java, and the like.
  • the program code is stored in a storage means such as a hard disk or memory of a computer or a storage medium such as a CD-RW or CD-R.
  • the CPU included in the computer may read and execute the program code stored in the storage unit or the storage medium.
  • control lines and information lines indicate those that are considered necessary for the explanation, and do not necessarily indicate all the control lines and information lines on the product. All the components may be connected to each other.

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Software Systems (AREA)
  • Bus Control (AREA)

Abstract

A computer having an I/O device driver, managing vector information, and allocating a plurality of I/O cues to each of a plurality of interrupt sources. The I/O device driver manages mapping information indicating the corresponding relationship between vectors and interrupt source numbers. An I/O device has a control unit, holds a bit map-type register that manages the interrupt source numbers, and manages such that the interrupt source numbers and bit positions in the bit map correspond. The I/O device driver sends execution instructions for I/O processing including vectors and interrupt source numbers to the control unit. The control unit executes I/O processing, manipulates bits corresponding to interrupt source numbers, and generates interruptions including the vectors. The I/O device driver references the mapping information and specifies a plurality of interrupt source numbers to be associated with the vectors, reads values for bits corresponding to each of the plurality of interrupt source numbers, and specifies interrupt sources.

Description

計算機及びI/O処理の制御方法Computer and control method of I / O processing
 本発明は、マルチキュー技術に対応した計算機におけるI/O処理の制御方法に関する。 The present invention relates to a method for controlling I / O processing in a computer that supports multi-queue technology.
 従来、ネットワーク装置又はストレージシステムに対するI/O処理では、キュー構造を用いて複数のI/Oコマンドが管理される。I/Oデバイスドライバは、I/O処理の起動時にI/O起動キューにI/Oコマンドをエンキューし、IO応答時にI/O応答キューから応答用のコマンドをデキューする。 Conventionally, in an I / O process for a network device or a storage system, a plurality of I / O commands are managed using a queue structure. The I / O device driver enqueues an I / O command in the I / O activation queue when the I / O processing is activated, and dequeues a response command from the I / O response queue when an IO response is made.
 マルチキューに対応したシステムでは、各I/Oキューのペアに対して割り込み要因を対応づけることができる。割り込み要因は、CPU(CPUコア)、I/Oデバイスコア、及びゲストOS等の組み合わせから定義できる。また、マルチキューに対応したシステムでは、割り込みベクタ及びキューが1対1に対応づけられている。これによって、I/O処理の性能が向上する。 In a system that supports multi-queues, an interrupt factor can be associated with each I / O queue pair. An interrupt factor can be defined from a combination of a CPU (CPU core), an I / O device core, a guest OS, and the like. Further, in a system that supports multi-queues, interrupt vectors and queues are associated one-to-one. This improves the performance of I / O processing.
 I/Oデバイスドライバは、割り込みが発生した場合、割り込み要因レジスタ及び割り込み要因集約レジスタ等のレジスタ群にアクセスすることによって、発生した割り込みに対応する割り込み要因を特定する。 When an interrupt occurs, the I / O device driver specifies an interrupt factor corresponding to the generated interrupt by accessing a register group such as an interrupt factor register and an interrupt factor aggregation register.
 一般的に、計算機のCPUコアがPCIのMMIOを用いてレジスタにアクセスする処理は、計算機のメモリアクセスよりも処理コストが高く、I/O処理の性能の劣化の原因となる。 Generally, a process in which a CPU core of a computer accesses a register using PCI MMIO has a higher processing cost than a memory access of a computer, and causes a deterioration in performance of I / O processing.
 これに対して、割り込みベクタ(ベクタ番号)と割り込み要因(I/Oデバイスコアの識別番号及びゲストOSの識別番号等の組み合わせ)とを対応づけることによって、I/Oデバイスドライバは、割り込みベクタに基づいて、迅速に割り込み要因の特定することができる。この方法では、レジスタアクセスが不要となるため、IO性能が向上する。 On the other hand, by associating an interrupt vector (vector number) with an interrupt factor (a combination of an identification number of the I / O device core and an identification number of the guest OS, etc.), the I / O device driver assigns the interrupt vector. Based on this, it is possible to quickly identify the interrupt factor. This method eliminates the need for register access and improves IO performance.
 CPUコア、ゲストOS、及びI/Oデバイスコアのそれぞれの数の増加に伴って、必要となるI/Oキューの数も増加する。一方、MSI-Xに対応した計算機が確保できる割り込みベクタの数には限りがある。そのため、割り込みベクタ及びI/Oキューを1対1に対応づけることができない可能性がある。 As the number of CPU cores, guest OSs, and I / O device cores increases, the number of necessary I / O queues also increases. On the other hand, the number of interrupt vectors that can be secured by a computer that supports MSI-X is limited. Therefore, there is a possibility that the interrupt vector and the I / O queue cannot be associated one-on-one.
 そのため、一つの割り込みベクタを複数の割り込み要因(I/Oキュー)が共有するように設定する必要がある。このとき、I/Oデバイスドライバは、前述したレジスタに加えて、I/Oデバイスコアの識別番号を特定するためのレジスタ、及びゲストOSの識別番号を特定するレジスタ等にアクセスする必要がある。したがって、マルチキューに対応したシステムにおいて、割り込みベクタを共有する場合、二つの大きな問題が存在する。 Therefore, it is necessary to set one interrupt vector so that multiple interrupt factors (I / O queues) are shared. At this time, the I / O device driver needs to access a register for specifying the identification number of the I / O device core, a register for specifying the identification number of the guest OS, and the like in addition to the registers described above. Therefore, there are two major problems when sharing interrupt vectors in a system that supports multi-queues.
 一つの問題点は、I/Oデバイスが複数のレジスタを保持する必要があるため、ハードウェアのコストが大きくなることである。もう一つの問題点は、レジスタに複数回アクセスする必要があるため、I/O処理の性能が低下することである。 One problem is that the hardware cost increases because the I / O device needs to hold multiple registers. Another problem is that the performance of I / O processing is degraded because the register needs to be accessed multiple times.
 前述した課題を解決する方法として、特許文献1に記載の発明が知られている。特許文献1には、「複数の割り込み要因ごとに割り込み要求が発生したか否かを示すフラグ値をそれぞれ格納する複数のレジスタを備え、同一の割り込みベクタに対応づけられた複数の割り込み要因の中から、割り込み要求を発生させた前記割り込み要因を前記フラグ値に基づいて特定し、前記割り込み要求に応じた割り込み処理を実行する情報処理装置であって、割り込み要求を発生させた前記割り込み要因に対応づけられる前記割り込みベクタを検出する割り込みベクタ検出手段と、前記レジスタに格納された前記フラグ値のうち、前記検出した割り込みベクタに対応づけられる前記割り込み要因の前記フラグ値を選択する選択手段と、前記選択したフラグ値を格納する記憶手段と、前記記憶手段に格納された前記フラグ値を読み出し、前記読み出したフラグ値に基づいて前記割り込み要求を発生させた前記割り込み要因を特定する制御手段と、を有する」ことが記載されている。 The invention described in Patent Document 1 is known as a method for solving the above-described problems. Patent Document 1 states that “a plurality of registers each storing a flag value indicating whether or not an interrupt request has occurred for each of a plurality of interrupt factors is provided, and a plurality of interrupt factors associated with the same interrupt vector are included. From the information processing device that identifies the interrupt factor that generated the interrupt request based on the flag value and executes interrupt processing according to the interrupt request, the information processing device corresponds to the interrupt factor that generated the interrupt request An interrupt vector detecting means for detecting the interrupt vector to be attached; a selecting means for selecting the flag value of the interrupt factor associated with the detected interrupt vector from the flag values stored in the register; Storage means for storing the selected flag value; and reading the flag value stored in the storage means; And control means for identifying the interrupt factor that caused the interrupt request based on the serial read-out flag value, that the having "are described.
特開2012-103879号公報JP 2012-103879 A
 特許文献1に記載の発明では、割り込み要因の数が多い場合、記憶手段に対応する一覧レジスタのサイズが大きくなり、制御レジスタの数が多くなり、さらに、セレクタの構成が複雑になる。また、割り込みベクタと制御レジスタとが対応づけられているため、割り込みベクタに対する割り込み要因の設定の自由度がない。 In the invention described in Patent Document 1, when the number of interrupt factors is large, the size of the list register corresponding to the storage means increases, the number of control registers increases, and the configuration of the selector becomes complicated. Further, since the interrupt vector and the control register are associated with each other, there is no degree of freedom for setting the interrupt factor for the interrupt vector.
 また、特許文献1に記載の発明及び従来のI/O処理では、割り込みベクタ毎にレジスタが存在するため、同一の割り込みベクタに対応づけられた複数のI/Oキュー(割り込み要因)が当該レジスタを共有する。そのため、同一の割り込みベクタに対応づけられる複数のI/OキューにI/O処理が連続して発生した場合、I/Oデバイスは、一つの割り込みが完了してレジスタがリセットされるまで、次に割り込みを通知できない。したがって、I/O処理が逐次的に実行されるため、I/O処理の性能の低下の原因となる。 In the invention described in Patent Document 1 and the conventional I / O processing, since a register exists for each interrupt vector, a plurality of I / O queues (interrupt factors) associated with the same interrupt vector are included in the register. Share Therefore, if I / O processing occurs continuously in multiple I / O queues associated with the same interrupt vector, the I / O device continues until one interrupt is completed and the register is reset. Cannot be interrupted. Therefore, since the I / O processing is executed sequentially, it causes a decrease in the performance of the I / O processing.
 本発明では、割り込み要因を特定するためのハードウェアコストを抑え、高速に割り込み要因を特定可能なI/O処理の制御を実現する。また、本発明では、同一の割り込みベクタを共有する複数のI/OキューのI/O処理が連続した発生した場合でも、I/O処理を並列的に実行するシステムを実現する。 In the present invention, the hardware cost for specifying the interrupt factor is suppressed, and the control of the I / O processing capable of specifying the interrupt factor at high speed is realized. Also, the present invention realizes a system that executes I / O processing in parallel even when I / O processing of a plurality of I / O queues that share the same interrupt vector occurs continuously.
 本願において開示される発明の代表的な一例を示せば以下の通りである。すなわち、少なくとも一つのオペレーティングシステムが稼動する計算機であって、前記計算機は、複数のプロセッサコアを含む少なくとも一つのプロセッサ、前記少なくとも一つのプロセッサに接続される記憶装置、及び複数のI/Oデバイスコア含み、前記少なくとも一つのプロセッサに接続される少なくとも一つのI/Oデバイスを備え、前記少なくとも一つのI/Oデバイスを制御するI/Oデバイスドライバを有し、割り込みベクタと割り込み処理を実行する割り込みハンドラとの対応関係を示す割り込みベクタ情報を管理し、前記割り込み要因は、複数の割り込み要素の組み合わせに基づいて定義され、複数の割り込み要因の各々に、複数のI/Oキューが割り当てられ、前記I/Oデバイスは、前記複数のI/Oキューを用いて並列的に複数のI/O処理を実行し、前記I/Oデバイスドライバは、複数の割り込みハンドラを含み、割り込み要因番号を管理し、前記割り込みベクタと前記割り込み要因番号との対応関係を示すマッピング情報を管理し、前記割り込み要因番号は、前記複数の割り込み要素の各々に対応する一つ以上のビットから構成されるビット列に基づいて定義され、前記I/Oデバイスは、前記I/Oデバイスドライバからの要求に応じてI/O処理を実行する制御部を有し、前記割り込み要因番号を管理するビットマップ形式のレジスタを保持し、前記割り込み要因番号と、前記レジスタに対応するビットマップにおけるビットの位置とが対応づくように管理し、前記I/Oデバイスドライバは、第1の割り込みベクタに第1の割り込み要因番号及び前記第2の割り込み要因番号が対応づけられている場合に、オペレーティングシステムから前記第1の割り込み要因番号に対応するI/O処理の実行要求を受けつけ、前記第1の割り込み要因番号に対応するI/Oキューに第1のI/Oコマンドを挿入し、前記第1の割り込みベクタ及び前記第1の割り込み要因番号を含む第1のI/O処理の実行指示を前記制御部に送信し、前記制御部は、前記第1のI/O処理の実行指示を受信した場合、前記第1のI/Oコマンドに対応するI/O処理を実行し、前記レジスタを参照して、前記第1の割り込み要因番号に対応するビットを操作し、前記第1の割り込み要因番号に対応するI/Oキューに第1の応答用のコマンドを挿入し、前記第1の割り込みベクタを含む第1の割り込みを発生させ、前記I/Oデバイスドライバは、前記第1の割り込みの発生を検知した場合、前記割り込みベクタ情報に基づいて、前記第1の割り込みベクタに対応する割り込みハンドラを起動させ、前記マッピング情報を参照して、前記第1の割り込みベクタに対応づけられる前記第1の割り込み要因番号及び前記第2の割り込み要因番号を特定し、前記レジスタから、前記第1の割り込み要因番号及び前記第2の割り込み要因番号の各々に対応するビットの値を読み出すことによって、前記第1の割り込み要因番号に対応する割り込み要因の割り込みが発生したことを特定し、前記第1の割り込み要因番号に対応するI/Oキューから前記第1の応答用のコマンドを取得し、前記第1の応答用のコマンドに対応する応答処理を実行することを特徴とする。 A typical example of the invention disclosed in the present application is as follows. That is, a computer on which at least one operating system runs, the computer including at least one processor including a plurality of processor cores, a storage device connected to the at least one processor, and a plurality of I / O device cores An interrupt that includes at least one I / O device connected to the at least one processor, has an I / O device driver that controls the at least one I / O device, and executes an interrupt vector and interrupt processing Managing interrupt vector information indicating a correspondence relationship with a handler, the interrupt factor is defined based on a combination of a plurality of interrupt elements, and a plurality of I / O queues are assigned to each of the plurality of interrupt factors, The I / O device uses the plurality of I / O queues. A plurality of I / O processes are executed in parallel, and the I / O device driver includes a plurality of interrupt handlers, manages interrupt factor numbers, and indicates a correspondence relationship between the interrupt vectors and the interrupt factor numbers The interrupt factor number is defined based on a bit string composed of one or more bits corresponding to each of the plurality of interrupt elements, and the I / O device is the I / O device driver Having a control unit that executes I / O processing in response to a request from the host, holding a bitmap-format register for managing the interrupt factor number, and the interrupt factor number and a bit in the bitmap corresponding to the register The I / O device driver manages the first interrupt factor number in the first interrupt vector. And the second interrupt factor number are associated with each other, an I / O processing execution request corresponding to the first interrupt factor number is received from the operating system, and the second interrupt factor number corresponds to the first interrupt factor number. A first I / O command is inserted into the I / O queue, and an instruction to execute a first I / O process including the first interrupt vector and the first interrupt factor number is transmitted to the control unit; When receiving an instruction to execute the first I / O process, the control unit executes an I / O process corresponding to the first I / O command, refers to the register, and executes the first I / O process. The first interrupt command including the first interrupt vector is inserted into the I / O queue corresponding to the first interrupt factor number. Raised When the occurrence of the first interrupt is detected, the I / O device driver activates an interrupt handler corresponding to the first interrupt vector based on the interrupt vector information, and refers to the mapping information. Then, the first interrupt factor number and the second interrupt factor number associated with the first interrupt vector are specified, and the first interrupt factor number and the second interrupt factor are specified from the register. By reading the value of the bit corresponding to each of the numbers, it is specified that an interrupt factor corresponding to the first interrupt factor number has occurred, and the I / O queue corresponding to the first interrupt factor number The first response command is acquired from the first response command, and a response process corresponding to the first response command is executed. That.
 本発明によれば、一つの割り込みベクタが複数の割り込み要因によって共有されている場合に、I/Oデバイスドライバは、ビットマップ形式のレジスタのみを参照することによって、割り込み要因を特定することができる。また、I/Oデバイスは、ビットマップ形式のレジスタのみを保持すればよいため、ハードウェアコストを抑えることができる。 According to the present invention, when one interrupt vector is shared by a plurality of interrupt factors, the I / O device driver can specify the interrupt factor by referring only to the bitmap format register. . In addition, since the I / O device only needs to hold a bitmap format register, the hardware cost can be reduced.
 上記した以外の課題、構成及び効果は、以下の実施例の説明により明らかにされる。 Issues, configurations, and effects other than those described above will be clarified by the description of the following examples.
実施例1の計算機システムの構成を説明するブロック図である。It is a block diagram explaining the structure of the computer system of Example 1. FIG. 実施例1の計算機における処理の流れの概要を説明するブロック図である。FIG. 3 is a block diagram illustrating an outline of a process flow in the computer according to the first embodiment. 実施例1の割り込み要因番号の構造の一例を示す説明図である。It is explanatory drawing which shows an example of the structure of the interrupt factor number of Example 1. FIG. 実施例1の割り込み要因番号通知レジスタの一例を示す説明図である。FIG. 6 is an explanatory diagram illustrating an example of an interrupt factor number notification register according to the first embodiment. 実施例1のI/Oキュー情報の一例を示す説明図である。FIG. 6 is an explanatory diagram illustrating an example of I / O queue information according to the first embodiment. 実施例1のマッピングテーブルの一例を示す説明図である。It is explanatory drawing which shows an example of the mapping table of Example 1. FIG. 実施例1のマッピングテーブルの一例を示す説明図である。It is explanatory drawing which shows an example of the mapping table of Example 1. FIG. 実施例1のI/Oキューアドレステーブルの一例を示す説明図である。6 is an explanatory diagram illustrating an example of an I / O queue address table according to the first embodiment. FIG. 実施例1のHBAデバイスドライバが実行する初期設定処理を説明するフローチャートである。6 is a flowchart illustrating an initial setting process executed by the HBA device driver according to the first embodiment. 実施例1の通信処理における計算機内部の動作を示す説明図である。6 is an explanatory diagram illustrating an internal operation of a computer in communication processing according to Embodiment 1. FIG. 実施例1のI/O処理における計算機内部の動作を示す説明図である。FIG. 6 is an explanatory diagram illustrating an internal operation of the computer in the I / O processing according to the first embodiment. 実施例1のI/O処理の流れを説明するシーケンス図である。FIG. 6 is a sequence diagram illustrating the flow of I / O processing according to the first embodiment. 実施例1のI/O処理の流れを説明するシーケンス図である。FIG. 6 is a sequence diagram illustrating the flow of I / O processing according to the first embodiment. 実施例1のI/O処理の流れを説明するシーケンス図である。FIG. 6 is a sequence diagram illustrating the flow of I / O processing according to the first embodiment. 実施例1のI/O処理の流れを説明するシーケンス図である。FIG. 6 is a sequence diagram illustrating the flow of I / O processing according to the first embodiment. 実施例1のI/O処理の流れを説明するシーケンス図である。FIG. 6 is a sequence diagram illustrating the flow of I / O processing according to the first embodiment.
 以下、本発明の実施例について、図面を参照して説明する。 Hereinafter, embodiments of the present invention will be described with reference to the drawings.
 図1は、実施例1の計算機システムの構成を説明するブロック図である。 FIG. 1 is a block diagram illustrating a configuration of a computer system according to the first embodiment.
 計算機システムは、計算機100、ストレージ装置130及びクライアント装置140から構成される。計算機100及びストレージ装置130は、SAN(Storage Area Network)等のネットワーク150を介して互いに接続される。また、計算機100及びクライアント装置140は、LAN(Local Area Network)又はWAN(Wide Area Network)等のネットワーク160を介して接続される。 The computer system includes a computer 100, a storage device 130, and a client device 140. The computer 100 and the storage device 130 are connected to each other via a network 150 such as a SAN (Storage Area Network). The computer 100 and the client device 140 are connected via a network 160 such as a LAN (Local Area Network) or a WAN (Wide Area Network).
 計算機100は、所定の業務を実行する。実施例1の計算機100は、仮想技術に対応した計算機であり、計算機100上では複数の仮想計算機(VM)114が稼働する。VM114上では、さらに、ゲストOSが実行される。 The computer 100 executes a predetermined job. The computer 100 according to the first embodiment is a computer that supports virtual technology, and a plurality of virtual computers (VMs) 114 operate on the computer 100. On the VM 114, a guest OS is further executed.
 ストレージ装置130は、ゲストOSが使用する記憶領域を提供する。ストレージ装置130は、図示しないコントローラ、インタフェース、及び複数の記憶装置を備える。記憶装置は例えばHDD(Hard Disk Drive)及びSSD(Solid State Drive)等が考えられる。ストレージ装置130は、複数の記憶装置の各々が有する記憶領域から複数の論理ディスク131を生成し、当該論理ディスク131をVM114上のゲストOSに割り当てる。 The storage device 130 provides a storage area used by the guest OS. The storage device 130 includes a controller (not shown), an interface, and a plurality of storage devices. As the storage device, for example, an HDD (Hard Disk Drive) and an SSD (Solid State Drive) can be considered. The storage device 130 creates a plurality of logical disks 131 from the storage areas of each of the plurality of storage devices, and allocates the logical disks 131 to the guest OS on the VM 114.
 クライアント装置140は、計算機100によって提供されるサービスを利用するユーザが操作する計算機である。クライアント装置140は、図示しないCPU、メモリ、記憶装置、及びNIC等を備える。 The client device 140 is a computer operated by a user who uses a service provided by the computer 100. The client device 140 includes a CPU, memory, storage device, NIC, and the like (not shown).
 ここで、計算機100の詳細について説明する。計算機100は、計算機資源として、一つ以上のCPU101、メモリ102、記憶装置103、HBA104、及びNIC105を備える。計算機100が備える各構成は、内部バス等を介して互いに接続される。なお、計算機100は、HBA104以外のI/Oデバイスを備えてもよい。 Here, the details of the computer 100 will be described. The computer 100 includes one or more CPUs 101, a memory 102, a storage device 103, an HBA 104, and a NIC 105 as computer resources. Each component included in the computer 100 is connected to each other via an internal bus or the like. Note that the computer 100 may include an I / O device other than the HBA 104.
 CPU101は、メモリ102に格納されるプログラムを実行する。CPU101がプログラムを実行することによって計算機100が有する各種機能を実現できる。以下の説明では、プログラムを主体に説明する場合、当該プログラムがCPU101によって実行されていることを示す。 CPU 101 executes a program stored in memory 102. Various functions of the computer 100 can be realized by the CPU 101 executing the program. In the following description, when a program is mainly described, it indicates that the program is being executed by the CPU 101.
 CPU101は、各種演算処理を実行するCPUコアを複数有する。CPUコアは、図示しないキャッシュメモリを有し、また、CPU101は、全てのCPUコアがアクセス可能なキャッシュメモリを有する。 The CPU 101 has a plurality of CPU cores that execute various arithmetic processes. The CPU core has a cache memory (not shown), and the CPU 101 has a cache memory accessible to all CPU cores.
 メモリ102は、CPU101によって実行される複数のプログラム及び当該複数のプログラムの実行に用いられる情報を格納する。なお、メモリ102は、揮発性のメモリ及び不揮発性のメモリのいずれであってもよい。 The memory 102 stores a plurality of programs executed by the CPU 101 and information used for executing the plurality of programs. Note that the memory 102 may be either a volatile memory or a nonvolatile memory.
 記憶装置103は、プログラム及び情報等を格納する。記憶装置103は、HDD及びSSD等が考えられる。なお、メモリ102に格納されるプログラム及び情報は、記憶装置103に格納されてもよい。この場合、CPU101が、記憶装置103からプログラム及び情報を読み出し、メモリ102上にロードする。 The storage device 103 stores programs and information. The storage device 103 may be an HDD, an SSD, or the like. Note that the program and information stored in the memory 102 may be stored in the storage device 103. In this case, the CPU 101 reads out the program and information from the storage device 103 and loads it onto the memory 102.
 HBA104は、ネットワーク150を介してストレージ装置130と接続するためのインタフェースである。HBA104は、複数のHBAコア120及びレジスタ群125を備える。なお、HBA104は、図示しないメモリを備える。 The HBA 104 is an interface for connecting to the storage apparatus 130 via the network 150. The HBA 104 includes a plurality of HBA cores 120 and a register group 125. The HBA 104 includes a memory (not shown).
 HBAコア120は、所定の処理を実行するファームウェア(FW)121を実現するプログラムを実行する。レジスタ群125は、I/O処理の割り込みを制御するためのレジスタの集合である。 The HBA core 120 executes a program that realizes firmware (FW) 121 that executes predetermined processing. The register group 125 is a set of registers for controlling interrupts of I / O processing.
 実施例1の計算機は、マルチキュー機能に対応している。マルチキュー機能に対応する計算機では、割り込み要因は、CPU101、HBAコア120、及びゲストOS等の組み合わせ毎に定義できる。また、実施例1では、割り込み要因と、I/O起動キュー及びI/O応答キューのペアとを1対1に対応づけるものとする。 The computer of Example 1 supports the multi-queue function. In a computer that supports the multi-queue function, an interrupt factor can be defined for each combination of the CPU 101, the HBA core 120, and the guest OS. In the first embodiment, it is assumed that an interrupt factor and a pair of an I / O activation queue and an I / O response queue are associated one-to-one.
 以下の説明では、割り込み要因を定義する、CPU101、HBAコア120、及びゲストOS等のそれぞれ要素を、割り込み要素とも記載する。また、I/O起動キュー及びI/O応答キューを区別しない場合、単にI/Oキューとも記載し、I/O起動キュー及びI/O応答キューのペアをI/Oキューのペアとも記載する。 In the following description, elements such as the CPU 101, the HBA core 120, and the guest OS that define interrupt factors are also described as interrupt elements. When the I / O activation queue and the I / O response queue are not distinguished from each other, the I / O activation queue and the I / O response queue pair are also simply referred to as an I / O queue. .
 割り込み要素が、CPU101、HBAコア120、及びゲストOSの場合、本実施例では、CPU101、HBAコア120、及びゲストOSのそれぞれが取り得る数の乗算値の数だけI/Oキューのペアが生成される。このとき、I/Oキューのペア及び割り込みベクタを1対1に対応づけた場合、最もI/O処理の性能が高くなる。 When the interrupt elements are the CPU 101, the HBA core 120, and the guest OS, in this embodiment, I / O queue pairs are generated by the number of multiplication values that the CPU 101, the HBA core 120, and the guest OS can take. Is done. At this time, when the I / O queue pair and the interrupt vector are associated one-to-one, the performance of the I / O processing is the highest.
 しかし、ハイパバイザ110及びゲストOS等のOSは、確保できる割り込みベクタの数に制限がある。そのため、I/O性能が最大となる割り込みベクタの数が、OSが確保可能な割り込みベクタの数より大きい場合、複数の割り込み要因が一つの割り込みベクタを共有するように設定する必要がある。 However, the hypervisor 110 and the OS such as the guest OS have a limit on the number of interrupt vectors that can be secured. For this reason, when the number of interrupt vectors with the maximum I / O performance is larger than the number of interrupt vectors that can be secured by the OS, it is necessary to set so that a plurality of interrupt factors share one interrupt vector.
 割り込みベクタの共有は、一つの割り込み要素が取り得る値に対して一つの割り込みベクタを割り当てることによって実現できる。例えば、ゲストOSが二つ稼働する計算機システムの場合、CPU101及びHBAコアが同一であり、ゲストOSの種別のみが異なる二つの割り込み要因に対して一つの割り込みベクタを割り当てることによって、計算機100に設定する割り込みベクタの数は、最大割り込みベクタ数の半分となる。 Interrupt vector sharing can be realized by assigning one interrupt vector to possible values of one interrupt element. For example, in the case of a computer system in which two guest OSs are operating, the CPU 101 and the HBA core are the same, and one interrupt vector is assigned to two interrupt factors that are different only in the guest OS type, so that the computer 100 is set. The number of interrupt vectors to be used is half of the maximum number of interrupt vectors.
 複数の割り込み要因が一つの割り込みベクタを共有するように設定されている場合、従来のレジスタ群125には、HBAコア120毎の割り込み要因レジスタ、及びHBAコア120毎の割り込み要因リセットレジスタが含まれる。また、従来のレジスタ群125には、割り込み要因を特定するためにゲストOS、CPU101等の割り込み要素を判定するためのレジスタが含まれる。 When a plurality of interrupt factors are set so as to share one interrupt vector, the conventional register group 125 includes an interrupt factor register for each HBA core 120 and an interrupt factor reset register for each HBA core 120. . In addition, the conventional register group 125 includes registers for determining interrupt elements such as the guest OS and the CPU 101 in order to specify an interrupt factor.
 一方、実施例1のレジスタ群125は、後述するように割り込み要因番号通知レジスタ251(図2)及び割り込み要因番号のリセット用のレジスタのみを含む点に特徴がある。 On the other hand, the register group 125 of the first embodiment is characterized in that it includes only an interrupt factor number notification register 251 (FIG. 2) and an interrupt factor number reset register as will be described later.
 NIC105は、ネットワーク160を介してクライアント装置140と接続するためのインタフェースである。 The NIC 105 is an interface for connecting to the client device 140 via the network 160.
 ここで、メモリ102に格納されるプログラム及びメモリ空間について説明する。メモリ102は、ハイパバイザ110及びHBAデバイスドライバ111を実現するプログラムを格納する。また、メモリ102の記憶領域の一部は、PCIメモリ空間112及びデータ転送領域113として確保される。また、メモリ102の記憶領域の一部には、VM114の実体であるデータが格納される。 Here, the program and memory space stored in the memory 102 will be described. The memory 102 stores a program for realizing the hypervisor 110 and the HBA device driver 111. A part of the storage area of the memory 102 is secured as a PCI memory space 112 and a data transfer area 113. In addition, data that is the substance of the VM 114 is stored in a part of the storage area of the memory 102.
 ハイパバイザ110は、前述した計算機資源を用いて仮想環境を提供する。具体的には、ハイパバイザ110は、計算機資源を論理的に分割することによって複数のVM114を生成し、各VM114上でゲストOSを稼働させる。図1に示す例では、三つのVM114がハイパバイザ110によって管理される。 The hypervisor 110 provides a virtual environment using the computer resources described above. Specifically, the hypervisor 110 generates a plurality of VMs 114 by logically dividing computer resources, and operates a guest OS on each VM 114. In the example illustrated in FIG. 1, three VMs 114 are managed by the hypervisor 110.
 HBAデバイスドライバ111は、HBA104を制御するドライバである。具体的には、HBAデバイスドライバ111は、ストレージ装置130へアクセスするためにHBA104を制御する。 The HBA device driver 111 is a driver that controls the HBA 104. Specifically, the HBA device driver 111 controls the HBA 104 in order to access the storage apparatus 130.
 PCIメモリ空間112は、CPU101がHBA104等のI/Oデバイスにアクセスするための記憶領域(MMIO空間)である。データ転送領域113は、HBAデバイスドライバ111及びFW121が互いに読み出すデータ又は書き込むデータを転送するための記憶領域(DMA領域)である。 The PCI memory space 112 is a storage area (MMIO space) for the CPU 101 to access an I / O device such as the HBA 104. The data transfer area 113 is a storage area (DMA area) for transferring data read or written by the HBA device driver 111 and the FW 121.
 PCIメモリ空間112は、HBA104内のレジスタ群125等そのものをメモリ102のアドレス空間にマッピングしたメモリ空間である。一般的に、CPU101がアクセスするメモリ空間には、メモリ102等の主記憶装置にアクセスするためのアドレス領域、及びHBA104等のI/Oデバイスにアクセスするためのアドレス領域がある。実施例1のPCIメモリ空間112は、I/Oデバイスにアクセスするためのアドレス領域である。CPU101がPCIメモリ空間112にアクセスした場合、I/Oデバイスは自身がマッピングされるメモリアドレスへのアクセスがあったことを認識し、I/Oデバイスが保持するレジスタへのアクセスに対する応答をCPU101に返す。 The PCI memory space 112 is a memory space in which the register group 125 or the like in the HBA 104 is mapped to the address space of the memory 102. In general, the memory space accessed by the CPU 101 includes an address area for accessing a main storage device such as the memory 102 and an address area for accessing an I / O device such as the HBA 104. The PCI memory space 112 according to the first embodiment is an address area for accessing an I / O device. When the CPU 101 accesses the PCI memory space 112, the I / O device recognizes that there is an access to the memory address to which the I / O device is mapped, and sends a response to the access to the register held by the I / O device to the CPU 101. return.
 以上がメモリ102に格納されるプログラム及びメモリ空間の説明である。次に、図2を用いて、計算機100におけるI/O処理及びFW121とHBAデバイスドライバ111との間の通信処理の流れについて説明する。以下の説明では、FW121とHBAデバイスドライバ111との間の通信処理を、単に、通信処理とも記載する。 The above is the description of the program and memory space stored in the memory 102. Next, the flow of I / O processing and communication processing between the FW 121 and the HBA device driver 111 in the computer 100 will be described with reference to FIG. In the following description, communication processing between the FW 121 and the HBA device driver 111 is also simply referred to as communication processing.
 図2は、実施例1の計算機100における処理の流れの概要を説明するブロック図である。 FIG. 2 is a block diagram for explaining an overview of the processing flow in the computer 100 according to the first embodiment.
 まず、HBAデバイスドライバ111の構成について説明する。HBAデバイスドライバ111は、割り込みハンドラ200及び送信部220を有し、また、マッピングテーブル210及びI/Oキュー情報230を保持する。 First, the configuration of the HBA device driver 111 will be described. The HBA device driver 111 includes an interrupt handler 200 and a transmission unit 220, and holds a mapping table 210 and I / O queue information 230.
 割り込みハンドラ200は、HBA104からの割り込みに対応する処理又は制御を実現する機能部である。送信部220は、ゲストOSから受信した要求に応じて、各種指示及び情報を送信する機能部である。 The interrupt handler 200 is a functional unit that realizes processing or control corresponding to an interrupt from the HBA 104. The transmission unit 220 is a functional unit that transmits various instructions and information in response to a request received from the guest OS.
 マッピングテーブル210は、割り込み要因番号及び割り込みベクタ(ベクタ番号)の対応関係を管理する情報である。割り込み要因番号の詳細は、図3を用いて後述する。また、マッピングテーブル210の詳細は、図9を用いて後述する。 The mapping table 210 is information for managing the correspondence between interrupt factor numbers and interrupt vectors (vector numbers). Details of the interrupt factor number will be described later with reference to FIG. Details of the mapping table 210 will be described later with reference to FIG.
 I/Oキュー情報230は、割り込み要因番号、割り込み要因、及びI/Oキューの対応関係を管理する情報である。なお、I/Oキューには、I/O起動キュー及びI/O応答キューの二つのキューが存在する。I/Oキュー情報230の詳細は、図7を用いて後述する。 The I / O queue information 230 is information for managing the correspondence between interrupt factor numbers, interrupt factors, and I / O queues. In the I / O queue, there are two queues: an I / O activation queue and an I / O response queue. Details of the I / O queue information 230 will be described later with reference to FIG.
 次に、PCIメモリ空間112及びデータ転送領域113の詳細について説明する。 Next, details of the PCI memory space 112 and the data transfer area 113 will be described.
 データ転送領域113は、I/O起動キュー群260、I/O応答キュー群270、及びFW-ドライバインタフェース領域280を含む。 The data transfer area 113 includes an I / O activation queue group 260, an I / O response queue group 270, and an FW-driver interface area 280.
 I/O起動キュー群260は、複数のI/O起動キューを含む。I/O応答キュー群270は、複数のI/O応答キューを含む。 The I / O activation queue group 260 includes a plurality of I / O activation queues. The I / O response queue group 270 includes a plurality of I / O response queues.
 FW-ドライバインタフェース領域280は、FW121とHBAデバイスドライバ111との間の通信時に操作される記憶領域である。FW-ドライバインタフェース領域280は、共有情報領域281及び通信用領域282を含む。 The FW-driver interface area 280 is a storage area operated during communication between the FW 121 and the HBA device driver 111. The FW-driver interface area 280 includes a shared information area 281 and a communication area 282.
 共有情報領域281は、FW121及びHBAデバイスドライバ111が共有する情報を格納する記憶領域である。実施例1の共有情報領域281には、I/Oキューアドレステーブル700(図7参照)が格納される。通信用領域282は、通信処理の実行時にアクセスされる記憶領域である。また、共有情報領域281には、後述する割り込み要因番号の定義情報等が格納される。 The shared information area 281 is a storage area for storing information shared by the FW 121 and the HBA device driver 111. The shared information area 281 of the first embodiment stores an I / O queue address table 700 (see FIG. 7). The communication area 282 is a storage area that is accessed when communication processing is executed. The shared information area 281 stores interrupt factor number definition information, which will be described later.
 PCIメモリ空間112は、割り込みベクタテーブル240及びレジスタ群250を含む。 The PCI memory space 112 includes an interrupt vector table 240 and a register group 250.
 割り込みベクタテーブル240は、割り込みベクタ及び割り込みハンドラ200の対応関係を管理する情報である。なお、割り込みベクタテーブル240は、公知のものであるため詳細な説明は省略する。 The interrupt vector table 240 is information for managing the correspondence between the interrupt vector and the interrupt handler 200. The interrupt vector table 240 is a well-known one, and a detailed description thereof will be omitted.
 レジスタ群250は、HBAデバイスドライバ111がHBA104のレジスタ群125そのものにアクセスするためのメモリアドレスである。 The register group 250 is a memory address for the HBA device driver 111 to access the register group 125 itself of the HBA 104.
 次に、従来の通信処理及びI/O処理の流れについて説明する。以下の説明では、一つの割り込みベクタを複数の割り込み要因が共有しているものとする。まず、従来の通信処理の流れについて説明する。 Next, the flow of conventional communication processing and I / O processing will be described. In the following description, it is assumed that one interrupt vector is shared by a plurality of interrupt factors. First, the flow of conventional communication processing will be described.
 HBAデバイスドライバ111は、VM114上のゲストOSから通信処理の実行要求を受けつけた場合、FW-ドライバインタフェース領域280にアクセスすることによって、FW121に処理の実行を指示する。 When the HBA device driver 111 receives a communication processing execution request from the guest OS on the VM 114, the HBA device driver 111 instructs the FW 121 to execute the processing by accessing the FW-driver interface area 280.
 FW121は、指示された処理を実行し、その後、所定の割り込みベクタを含む割り込みを発生させる。この場合、CPU101は、割り込みベクタテーブル240を参照し、通知された割り込みベクタに対応する割り込みハンドラ200を呼び出す。 The FW 121 executes the instructed process, and then generates an interrupt including a predetermined interrupt vector. In this case, the CPU 101 refers to the interrupt vector table 240 and calls the interrupt handler 200 corresponding to the notified interrupt vector.
 HBAデバイスドライバ111の割り込みハンドラ200は、レジスタ群250に含まれるレジスタを参照して、割り込み要因を特定する。さらに、割り込みハンドラ200は、特定された割り込み要因に基づいて応答先のゲストOSを特定し、特定されたゲストOSに要求された通信処理の完了を通知する。 The interrupt handler 200 of the HBA device driver 111 refers to a register included in the register group 250 and identifies an interrupt factor. Furthermore, the interrupt handler 200 identifies a response destination guest OS based on the identified interrupt factor, and notifies the identified guest OS of the completion of the requested communication process.
 なお、一つの割り込み要因が一つの割り込みベクタを占有している場合、HBAデバイスドライバ111は、割り込みベクタから割り込み要因を一意に特定できるため、レジスタ群250にアクセスする必要がない。以上が、従来の通信処理の流れの説明である。 Note that when one interrupt factor occupies one interrupt vector, the HBA device driver 111 can uniquely identify the interrupt factor from the interrupt vector, and therefore does not need to access the register group 250. The above is the description of the flow of conventional communication processing.
 次に、従来のI/O処理の流れについて説明する。 Next, the flow of conventional I / O processing will be described.
 HBAデバイスドライバ111は、VM114上のゲストOSからI/O処理の実行要求を受けつけた場合、FW-ドライバインタフェース領域280にアクセスすることによって、FW121に処理の実行を指示する。 When the HBA device driver 111 receives an I / O processing execution request from the guest OS on the VM 114, the HBA device driver 111 instructs the FW 121 to execute the processing by accessing the FW-driver interface area 280.
 FW121は、ストレージ装置130に対して指示された処理を実行し、その後、所定の割り込みベクタを含む割り込みを発生させる。この場合、CPU101は、割り込みベクタテーブル240を参照し、通知された割り込みベクタに対応する割り込みハンドラ200を呼び出す。 The FW 121 executes processing instructed to the storage apparatus 130, and then generates an interrupt including a predetermined interrupt vector. In this case, the CPU 101 refers to the interrupt vector table 240 and calls the interrupt handler 200 corresponding to the notified interrupt vector.
 HBAデバイスドライバ111の割り込みハンドラ200は、レジスタ群250に含まれるレジスタを参照して、割り込み要因を特定する。さらに、割り込みハンドラ200は、特定された割り込み要因に基づいて応答先のゲストOSを特定し、特定されたゲストOSに要求されたI/O処理の完了を通知する。 The interrupt handler 200 of the HBA device driver 111 refers to a register included in the register group 250 and identifies an interrupt factor. Furthermore, the interrupt handler 200 identifies the response destination guest OS based on the identified interrupt factor, and notifies the identified guest OS of the completion of the requested I / O processing.
 なお、一つの割り込み要因が一つの割り込みベクタを占有している場合、HBAデバイスドライバ111は、割り込みベクタから割り込み要因を一意に特定できるため、レジスタ群250にアクセスする必要がない。以上が、従来のI/O処理の流れの説明である。 Note that when one interrupt factor occupies one interrupt vector, the HBA device driver 111 can uniquely identify the interrupt factor from the interrupt vector, and therefore does not need to access the register group 250. The above is the description of the flow of conventional I / O processing.
 一つの割り込みベクタを複数の割り込み要因が共有している場合、従来の通信処理及びI/O処理では、HBAデバイスドライバ111は、割り込み要因を特定するために、複数種類のレジスタに複数回アクセスする必要がある。しかし、PCIメモリ空間112を介したアクセス処理は処理コストが高くなるためI/O処理の性能が低下する原因となる。 When a single interrupt vector is shared by a plurality of interrupt factors, in conventional communication processing and I / O processing, the HBA device driver 111 accesses a plurality of types of registers multiple times in order to identify the interrupt factor. There is a need. However, the access processing via the PCI memory space 112 increases the processing cost and causes the performance of the I / O processing to deteriorate.
 そのため、I/O処理の性能を高めるためには、レジスタ群250へのアクセス回数を可能な限り削減する必要がある。実施例1では、割り込み要因番号という新たな識別番号を用いることによって、前述した課題を解決する。 Therefore, in order to improve the performance of I / O processing, it is necessary to reduce the number of accesses to the register group 250 as much as possible. In the first embodiment, the above-described problem is solved by using a new identification number called an interrupt factor number.
 図3及び図4を用いて割り込み要因番号の定義方法、及び割り込み要因番号の意味について説明する。 The method of defining interrupt factor numbers and the meaning of interrupt factor numbers will be described with reference to FIGS.
 図3は、実施例1の割り込み要因番号の構造の一例を示す説明図である。図4は、実施例1の割り込み要因番号通知レジスタ251の一例を示す説明図である。 FIG. 3 is an explanatory diagram showing an example of the structure of the interrupt factor number according to the first embodiment. FIG. 4 is an explanatory diagram illustrating an example of the interrupt factor number notification register 251 according to the first embodiment.
 実施例1では、HBAデバイスドライバ111が、割り込み要因に基づいて、図3に示すような割り込み要因番号を生成する。割り込み要因番号はビット列に基づいて定義される。図3は、11ビットのビット列から構成される割り込み要因番号を示す。したがって、HBAデバイスドライバ111は、512個の割り込み要因番号を生成できる。なお、ビット列の長さが12ビットである場合、生成可能な割り込み要因番号の数は1024個である。 In the first embodiment, the HBA device driver 111 generates an interrupt factor number as shown in FIG. 3 based on the interrupt factor. The interrupt factor number is defined based on the bit string. FIG. 3 shows an interrupt factor number composed of an 11-bit bit string. Therefore, the HBA device driver 111 can generate 512 interrupt factor numbers. When the length of the bit string is 12 bits, the number of interrupt factor numbers that can be generated is 1024.
 HBAデバイスドライバ111は、予め、一つの割り込み要素に対して一つ以上のビットを対応づける。例えば、割り込み要因番号を生成するための定義情報を、割り込み要因番号の定義情報として予めHBAデバイスドライバ111に登録しておく。当該定義情報は、割り込み要因番号を定義するビット長、割り込み要素の種別、割り込み要因番号を定義するビット列における割り込み要素に対応するビットの位置、割り込み要素のビット長等を含む。 The HBA device driver 111 associates one or more bits with one interrupt element in advance. For example, definition information for generating an interrupt factor number is registered in the HBA device driver 111 in advance as interrupt factor number definition information. The definition information includes a bit length defining an interrupt factor number, a type of interrupt element, a bit position corresponding to the interrupt element in a bit string defining the interrupt factor number, a bit length of the interrupt element, and the like.
 本実施例では、割り込み要素及びビットの関係は以下のように定義されているものとする。なお、実施例1の割り込み要素は、CPU101、HBAコア120、割り込み種別、割り込み優先度、及びゲストOSを含むものとする。 In this embodiment, it is assumed that the relationship between interrupt elements and bits is defined as follows. The interrupt elements according to the first embodiment include the CPU 101, the HBA core 120, the interrupt type, the interrupt priority, and the guest OS.
 ビット列の上位2ビットは、CPU101の識別番号に対応するビットである。次の2ビットは、HBAコア120の識別番号に対応するビットである。次の2ビットは、割り込み種別に対応するビットである。ここで、割り込み種別は、I/O処理の割り込み、又は通信処理の割り込みを識別するための情報である。 The upper 2 bits of the bit string are bits corresponding to the CPU 101 identification number. The next 2 bits are bits corresponding to the identification number of the HBA core 120. The next 2 bits are bits corresponding to the interrupt type. Here, the interrupt type is information for identifying an interrupt of an I / O process or an interrupt of a communication process.
 割り込み種別の次の1ビットは、割り込みの優先順番を示す割り込み優先度に対応するビットである。次の4ビットは、割り込みの応答を通知するゲストOSに対応するビットである。 The next 1 bit of the interrupt type is a bit corresponding to the interrupt priority indicating the priority order of interrupts. The next 4 bits are bits corresponding to the guest OS that notifies the interrupt response.
 なお、各割り込み要素のビットの長さ、及び各割り込み要素に対応づけるビットの位置は計算機100のハードウェア構成及びソフトウェア構成に応じて適宜変更することができる。 Note that the bit length of each interrupt element and the position of the bit associated with each interrupt element can be appropriately changed according to the hardware configuration and software configuration of the computer 100.
 実施例1では、予め、HBA104に、所定の大きさのビットマップを割り込み要因番号通知レジスタ251として保持させる。ビットマップの各ビットは、図3に示すようなビット列を用いて定義された割り込み要因番号と1対1に対応づけられる。すなわち、ビットマップの一つのビットが、一つの割り込み要因番号に対応する。 In the first embodiment, the HBA 104 holds a bitmap having a predetermined size as the interrupt factor number notification register 251 in advance. Each bit of the bitmap is associated with an interrupt factor number defined using a bit string as shown in FIG. That is, one bit of the bitmap corresponds to one interrupt factor number.
 このとき、ビットマップ形式の割り込み要因番号通知レジスタ251は、図4に示すように解釈することができる。ここでは、ゲストOSの数は「16」、優先度は「0」と「1」のいずれかであるものとする。 At this time, the interrupt factor number notification register 251 in the bitmap format can be interpreted as shown in FIG. Here, it is assumed that the number of guest OSs is “16” and the priority is either “0” or “1”.
 1行が16ビットであるビットマップとして割り込み要因番号通知レジスタ251を表現した場合、ビットマップの列は、ビット列の最下位のビットに対応する割り込み要素、すなわち、ゲストOSの識別番号順に並べられる。また、ビットマップの各行は、ビット列の上位のビットに対応する割り込み要素の組み合わせ(優先度、割り込み種別、HBAコア120、及びCPU101の組み合わせ)に基づいて並べられる。より具体的には、割り込み要因番号を定義するビット列の最下位のビットから識別できるようにビットマップの行が構成される。 When the interrupt factor number notification register 251 is expressed as a bit map of 16 bits in one row, the bit map columns are arranged in the order of interrupt elements corresponding to the least significant bits of the bit string, that is, the guest OS identification numbers. Each row of the bitmap is arranged based on a combination of interrupt elements (priority, interrupt type, HBA core 120, and CPU 101) corresponding to the upper bits of the bit string. More specifically, the bitmap row is configured so that it can be identified from the least significant bit of the bit string defining the interrupt factor number.
 したがって、割り込み要因番号のビット列の構成を変更することによって、ビットマップの行及び列の意味づけを変更することができる。なお、ビットマップに含まれるビットの数(ビットマップのサイズ)は、割り込み要因番号の数より多くてもよい。FW121は、割り込み要因番号とビットマップのビットとを対応づける場合に、割り込み要因番号が存在しないビットについては管理対象として扱わない。 Therefore, the meaning of the row and column of the bitmap can be changed by changing the configuration of the bit string of the interrupt factor number. The number of bits included in the bitmap (bitmap size) may be larger than the number of interrupt factor numbers. When the FW 121 associates the interrupt factor number with the bit of the bitmap, the FW 121 does not handle a bit for which no interrupt factor number exists as a management target.
 HBAデバイスドライバ111は、割り込み要因番号の定義情報、及び割り込み要因番号通知レジスタ251の使用方法を示す操作情報を共有情報領域281に格納する。HBA104のFW121は、割り込み要因番号の定義情報に基づいてビットマップのビットの位置と、割り込み要因番号とが図4に示すような対応関係になるように管理する。また、HBA104のFW121は、操作情報に基づいて割り込み要因番号通知レジスタ251のビットを操作する。 The HBA device driver 111 stores the interrupt factor number definition information and operation information indicating how to use the interrupt factor number notification register 251 in the shared information area 281. The FW 121 of the HBA 104 manages the bit position of the bitmap and the interrupt factor number so as to correspond to each other as shown in FIG. 4 based on the definition information of the interrupt factor number. Also, the FW 121 of the HBA 104 operates the bit of the interrupt factor number notification register 251 based on the operation information.
 HBAデバイスドライバ111は、後述するようにビットマップのビットから割り込み要因を特定できる。具体的には、I/O処理又は通信処理では以下のような処理が実行される。 The HBA device driver 111 can specify the interrupt factor from the bit of the bitmap as will be described later. Specifically, the following processing is executed in the I / O processing or communication processing.
 HBA104のFW121は、I/O処理又は通信処理の実行時に、割り込み要因番号通知レジスタ251を参照し、当該I/O処理に対応する割り込み要因に一致するビットを操作する。 The FW 121 of the HBA 104 refers to the interrupt factor number notification register 251 when executing the I / O process or the communication process, and manipulates the bit that matches the interrupt factor corresponding to the I / O process.
 HBAデバイスドライバ111は、割り込み要因番号通知レジスタ251、すなわち、図4に示すようなビットマップを参照し、どのビットが操作されているかを特定する。前述したようにビットの位置と割り込み要因番号とは1対1に対応するため、HBAデバイスドライバ111は、割り込み要因番号通知レジスタ251のビットの値に基づいて、割り込み要因番号を特定できる。 The HBA device driver 111 refers to the interrupt factor number notification register 251, that is, the bit map as shown in FIG. 4, and identifies which bit is being operated. As described above, since the bit position and the interrupt factor number have a one-to-one correspondence, the HBA device driver 111 can specify the interrupt factor number based on the bit value of the interrupt factor number notification register 251.
 図5は、実施例1のI/Oキュー情報230の一例を示す説明図である。 FIG. 5 is an explanatory diagram illustrating an example of the I / O queue information 230 according to the first embodiment.
 I/Oキュー情報230は、割り込み要因番号、割り込み要因、及びI/Oキューの対応関係を管理するエントリを複数格納する。当該エントリは、割り込み要因番号501、HBAコア番号502、CPU番号503、ゲストOS番号504、I/O起動キューアドレス505、及びI/O応答キューアドレス506を含む。 The I / O queue information 230 stores a plurality of entries for managing interrupt factor numbers, interrupt factors, and I / O queue correspondences. The entry includes an interrupt factor number 501, an HBA core number 502, a CPU number 503, a guest OS number 504, an I / O activation queue address 505, and an I / O response queue address 506.
 割り込み要因番号501は、割り込み要因番号を格納するカラムである。本実施例では、各エントリの割り込み要因番号501は、昇順に格納されるものとする。 Interrupt factor number 501 is a column that stores interrupt factor numbers. In this embodiment, it is assumed that the interrupt factor number 501 of each entry is stored in ascending order.
 HBAコア番号502、CPU番号503、及びゲストOS番号504は、割り込み要素の識別情報である。HBAコア番号502は、I/O処理を実行するHBAコア120の識別番号を格納するカラムである。CPU番号503は、応答処理を実行するCPU101の識別番号を格納するカラムである。ゲストOS番号504は、I/O処理に対する応答を通知するゲストOSの識別番号を格納するカラムである。 The HBA core number 502, the CPU number 503, and the guest OS number 504 are interrupt element identification information. The HBA core number 502 is a column that stores the identification number of the HBA core 120 that executes the I / O processing. The CPU number 503 is a column that stores the identification number of the CPU 101 that executes the response process. The guest OS number 504 is a column that stores the identification number of the guest OS that notifies the response to the I / O processing.
 I/O起動キューアドレス505は、I/O処理を実現するI/Oコマンドが挿入されたI/O起動キューの位置を示すアドレスを格納するカラムである。I/O応答キューアドレス506は、応答処理を実現する応答用コマンドが挿入されたI/O応答キューの位置を示すアドレスを格納するカラムである。 The I / O activation queue address 505 is a column that stores an address indicating the position of the I / O activation queue in which an I / O command for realizing I / O processing is inserted. The I / O response queue address 506 is a column that stores an address indicating the position of the I / O response queue in which a response command for realizing response processing is inserted.
 図6A及び図6Bは、実施例1のマッピングテーブル210の一例を示す説明図である。 6A and 6B are explanatory diagrams illustrating an example of the mapping table 210 according to the first embodiment.
 マッピングテーブル210は、割り込みベクタ、割り込み要因番号、及び割り込みハンドラ200の対応関係を管理するエントリを複数格納する。当該エントリは、割り込みベクタ601、割り込み要因番号602、及び割り込みハンドラ603を含む。 The mapping table 210 stores a plurality of entries for managing the correspondence relationship between the interrupt vector, the interrupt factor number, and the interrupt handler 200. The entry includes an interrupt vector 601, an interrupt factor number 602, and an interrupt handler 603.
 割り込みベクタ601は、割り込みベクタを格納するカラムである。割り込み要因番号602は、割り込みベクタに対応づけられた割り込み要因番号を格納するカラムである。割り込みハンドラ603は、割り込みベクタを受けつけた場合に起動される割り込みハンドラ200の識別情報等を格納するカラムである。 The interrupt vector 601 is a column for storing an interrupt vector. The interrupt factor number 602 is a column for storing an interrupt factor number associated with an interrupt vector. The interrupt handler 603 is a column that stores identification information of the interrupt handler 200 that is activated when an interrupt vector is received.
 図6Aは、割り込みベクタと割り込み要因番号とが1対1に対応づけられた場合のマッピングテーブル210を示す。図6Bは、一つの割り込みベクタに対して複数の割り込み要因番号が対応づけられた場合のマッピングテーブル210を示す。 FIG. 6A shows the mapping table 210 when the interrupt vector and the interrupt factor number are associated one-to-one. FIG. 6B shows the mapping table 210 when a plurality of interrupt factor numbers are associated with one interrupt vector.
 図6Bに示すように、一つの割り込みベクタを複数の割り込み要因番号が共有する場合、HBAデバイスドライバ111は、割り込み要因番号が連続するように、割り込み要因番号を割り込みベクタに対応づける。 As shown in FIG. 6B, when a plurality of interrupt factor numbers are shared by one interrupt vector, the HBA device driver 111 associates the interrupt factor numbers with the interrupt vectors so that the interrupt factor numbers are continuous.
 図4に示すように、一つの行の連続する割り込み要因番号は、CPU101及びHBAコア120等の割り込み要素の値が同一であり、ゲストOSのみが異なる割り込み要因に対応する番号である。そのため、HBAデバイスドライバ111は、一つの割り込みベクタを複数の割り込み要因番号が共有する場合に、割り込みベクタが通知されたとき、ビットテーブルの連続するビットの値を一度に読み出すことによって、発生した割り込みに対応する割り込み要因番号を特定できる。 As shown in FIG. 4, consecutive interrupt factor numbers in one row are numbers corresponding to interrupt factors having different values of interrupt elements such as the CPU 101 and the HBA core 120, and different only in the guest OS. For this reason, the HBA device driver 111 reads the values of consecutive bits in the bit table at a time when an interrupt vector is notified when a plurality of interrupt factor numbers are shared by one interrupt vector. The interrupt factor number corresponding to can be specified.
 一般的なHBAデバイスドライバ111は、レジスタ群125から一度に読み出せるデータのサイズは4byteであるため、一度の読み出しで32個のビットの値を読み出せる。したがって、割り込み要因番号を特定するために必要なレジスタ群125の読み出し回数を削減できる。 The general HBA device driver 111 can read out the value of 32 bits by one reading because the size of data that can be read from the register group 125 at a time is 4 bytes. Therefore, it is possible to reduce the number of readings of the register group 125 necessary for specifying the interrupt factor number.
 図7は、実施例1のI/Oキューアドレステーブル700の一例を示す説明図である。 FIG. 7 is an explanatory diagram illustrating an example of the I / O queue address table 700 according to the first embodiment.
 I/Oキューアドレステーブル700は、割り込み要因番号及びI/Oキューの対応関係を管理するエントリを複数格納する。各エントリは、割り込み要因番号701、I/O起動キューアドレス702、及びI/O応答キューアドレス703を含む。 The I / O queue address table 700 stores a plurality of entries for managing the correspondence between interrupt factor numbers and I / O queues. Each entry includes an interrupt factor number 701, an I / O activation queue address 702, and an I / O response queue address 703.
 割り込み要因番号701、I/O起動キューアドレス702、及びI/O応答キューアドレス703は、それぞれ、割り込み要因番号501、I/O起動キューアドレス505、及びI/O応答キューアドレス506と同一のものである。 The interrupt factor number 701, the I / O activation queue address 702, and the I / O response queue address 703 are the same as the interrupt factor number 501, the I / O activation queue address 505, and the I / O response queue address 506, respectively. It is.
 図8は、実施例1のHBAデバイスドライバ111が実行する初期設定処理を説明するフローチャートである。 FIG. 8 is a flowchart illustrating an initial setting process executed by the HBA device driver 111 according to the first embodiment.
 HBAデバイスドライバ111は、所定のタイミングで初期設定処理を開始する。例えば、計算機100に電源が投入された場合、又は、計算機100の管理者によって実行が指示された場合等に初期設定処理が開始される。 The HBA device driver 111 starts the initial setting process at a predetermined timing. For example, the initial setting process is started when the computer 100 is turned on or when an execution instruction is given by the administrator of the computer 100.
 HBAデバイスドライバ111は、計算機100のシステム構成に基づいてI/Oキューのペアの数を決定し、I/Oキューを生成する(ステップS801)。 The HBA device driver 111 determines the number of I / O queue pairs based on the system configuration of the computer 100, and generates an I / O queue (step S801).
 本実施例では、I/Oキューのペアの数はI/O割り込み要因の数と一致しており、例えば、HBAデバイスドライバ111は、下式(1)を用いて、I/Oキューのペアの数を決定する。なお、ゲストOSの数は、計算機100に設定可能なゲストOSの最大数、又は現在計算機100上で稼働するゲストOSの数のいずれであってもよい。 In this embodiment, the number of I / O queue pairs coincides with the number of I / O interrupt factors. For example, the HBA device driver 111 uses the following equation (1) to calculate I / O queue pairs: Determine the number of. Note that the number of guest OSs may be either the maximum number of guest OSs that can be set in the computer 100 or the number of guest OSs currently running on the computer 100.
Figure JPOXMLDOC01-appb-M000001
Figure JPOXMLDOC01-appb-M000001
 HBAデバイスドライバ111は、各I/O割り込み要因に対応する割り込み要因番号を生成し、生成された割り込み要因番号を各I/Oキューに割り当てる(ステップS802)。ステップS802では、例えば、以下のような処理が実行される。 The HBA device driver 111 generates an interrupt factor number corresponding to each I / O interrupt factor, and assigns the generated interrupt factor number to each I / O queue (step S802). In step S802, for example, the following processing is executed.
 HBAデバイスドライバ111は、割り込み要因番号の定義情報に基づいて、所定の長さのビット列を用意し、各ビット列のビットと割り込み要素とを対応づける。さらに、HBAデバイスドライバ111は、割り込み要素の値を各ビットに設定することによって、I/O割り込み要因に対応する割り込み要因番号を生成する。 The HBA device driver 111 prepares a bit string of a predetermined length based on the definition information of the interrupt factor number, and associates the bit of each bit string with the interrupt element. Furthermore, the HBA device driver 111 generates an interrupt factor number corresponding to the I / O interrupt factor by setting the value of the interrupt element in each bit.
 HBAデバイスドライバ111は、ビット列において、最下位のビットに対応する割り込み要素のみが異なる割り込み要因に対して、連番となるように、割り込み要因番号を生成する。これによって、図4に示すようなビットマップの解釈が可能となる。 The HBA device driver 111 generates an interrupt factor number so that an interrupt factor is different for only an interrupt factor corresponding to the least significant bit in the bit string. As a result, the bitmap can be interpreted as shown in FIG.
 このとき、HBAデバイスドライバ111は、空のI/Oキュー情報230を用意し、I/Oキュー情報230の割り込み要因番号501に生成された割り込み要因番号を設定する。さらに、HBAデバイスドライバ111は、割り込み要因番号に対応する割り込み要因に基づいて、HBAコア番号502、CPU番号503、ゲストOS番号504のそれぞれに値を設定する。 At this time, the HBA device driver 111 prepares empty I / O queue information 230 and sets the generated interrupt factor number in the interrupt factor number 501 of the I / O queue information 230. Further, the HBA device driver 111 sets values for the HBA core number 502, the CPU number 503, and the guest OS number 504 based on the interrupt factor corresponding to the interrupt factor number.
 さらに、HBAデバイスドライバ111は、各I/Oキューのペアに一つの割り込み要因番号を割り当てる。すなわち、ペアを構成するI/O送信キュー及びI/O応答キューには、同一の割り込み要因番号が割り当てられる。 Furthermore, the HBA device driver 111 assigns one interrupt factor number to each I / O queue pair. That is, the same interrupt factor number is assigned to the I / O transmission queue and the I / O response queue constituting the pair.
 このとき、HBAデバイスドライバ111は、I/Oキュー情報230のI/O起動キューアドレス505にI/O送信キューのアドレスを設定し、また、I/O応答キューアドレス506にI/O応答キューのアドレスを設定する。 At this time, the HBA device driver 111 sets the address of the I / O transmission queue in the I / O activation queue address 505 of the I / O queue information 230, and also sets the I / O response queue in the I / O response queue address 506. Set the address.
 以上が、ステップS802に処理の説明である。 The above is the description of the process in step S802.
 次に、HBAデバイスドライバ111は、I/O割り込み要因以外の割り込み要因に対応する割り込み要因番号を生成し、生成された割り込み要因番号を各割り込み要因に割り当てる(ステップS803)。割り込み要因番号の生成方法は、ステップS802と同一の方法が用いられる。 Next, the HBA device driver 111 generates an interrupt factor number corresponding to an interrupt factor other than the I / O interrupt factor, and assigns the generated interrupt factor number to each interrupt factor (step S803). The method for generating the interrupt factor number is the same as that in step S802.
 HBAデバイスドライバ111は、割り込み要因番号と割り込み要因との対応関係を管理する情報(図示省略)をメモリ102上に格納する。当該情報は、割り込み要因番号、HBAコア120の識別番号、CPU101の識別番号、及びゲストOSの識別番号を含む複数のエントリを格納する。 The HBA device driver 111 stores information (not shown) for managing the correspondence between the interrupt factor number and the interrupt factor on the memory 102. The information stores a plurality of entries including an interrupt factor number, an identification number of the HBA core 120, an identification number of the CPU 101, and an identification number of the guest OS.
 HBAデバイスドライバ111は、I/O割り込み要因の数及びI/O以外の割り込み要因の数を足し合わせることによって、割り込み要因の総数を算出する(ステップS804)。 The HBA device driver 111 calculates the total number of interrupt factors by adding the number of I / O interrupt factors and the number of interrupt factors other than I / O (step S804).
 HBAデバイスドライバ111は、ハイパバイザ110に問い合わせて、当該ハイパバイザ110が確保可能な割り込みベクタの数を確認する(ステップS805)。さらに、HBAデバイスドライバ111は、ハイパバイザ110が確保可能な割り込みベクタの数が割り込み要因の総数以上であるか否かを判定する(ステップS806)。 The HBA device driver 111 makes an inquiry to the hypervisor 110 to check the number of interrupt vectors that can be secured by the hypervisor 110 (step S805). Further, the HBA device driver 111 determines whether or not the number of interrupt vectors that can be secured by the hypervisor 110 is equal to or greater than the total number of interrupt factors (step S806).
 ハイパバイザ110が確保可能な割り込みベクタの数が割り込み要因の総数より小さいと判定された場合、HBAデバイスドライバ111は、複数の割り込み要因が一つの割り込みベクタを共有するための共有方法を設定する(ステップS807)。なお、共有方法は、予め、HBAデバイスドライバ111に設定されているものとする。 When it is determined that the number of interrupt vectors that can be secured by the hypervisor 110 is smaller than the total number of interrupt factors, the HBA device driver 111 sets a sharing method for a plurality of interrupt factors to share one interrupt vector (step S807). It is assumed that the sharing method is set in the HBA device driver 111 in advance.
 HBAデバイスドライバ111は、設定された共有方法に基づいてベクタ共有モードを設定する(ステップS808)。その後、HBAデバイスドライバ111は、ステップS810に進む。具体的には、HBAデバイスドライバ111は、割り込み要因番号通知レジスタ251へアクセスできるように設定する。 The HBA device driver 111 sets the vector sharing mode based on the set sharing method (step S808). Thereafter, the HBA device driver 111 proceeds to step S810. Specifically, the HBA device driver 111 is set so that the interrupt factor number notification register 251 can be accessed.
 ステップS806において、ハイパバイザ110が確保可能な割り込みベクタの数が割り込み要因の総数以上であると判定された場合、HBAデバイスドライバ111は、ベクタ占有モードに設定する(ステップS809)。その後、HBAデバイスドライバ111は、ステップS810に進む。 If it is determined in step S806 that the number of interrupt vectors that can be secured by the hypervisor 110 is equal to or greater than the total number of interrupt factors, the HBA device driver 111 sets the vector occupation mode (step S809). Thereafter, the HBA device driver 111 proceeds to step S810.
 ステップS810では、HBAデバイスドライバ111は、それぞれの動作モード(ベクタ占有モード又はベクタ共有モード)に応じて、割り込みベクタ及び割り込み要因を対応づけることによって、マッピングテーブル210を生成する(ステップS810)。ここで、各動作モードにおけるステップS810の具体的な処理について説明する。 In step S810, the HBA device driver 111 generates the mapping table 210 by associating the interrupt vector and the interrupt factor in accordance with each operation mode (vector occupation mode or vector sharing mode) (step S810). Here, the specific process of step S810 in each operation mode will be described.
 (1)動作モードがベクタ占有モードの場合 (1) When the operation mode is the vector occupation mode
 HBAデバイスドライバ111は、割り込みベクタと割り込み要因番号とを1対1に対応づける。なお、対応づけの方法は、予め設定されているものとする。 The HBA device driver 111 associates the interrupt vector with the interrupt factor number on a one-to-one basis. Assume that the association method is preset.
 HBAデバイスドライバ111は、空のマッピングテーブル210を生成し、割り込みベクタ601に、昇順に割り込みベクタを設定する。さらに、HBAデバイスドライバ111は、割り込み要因番号602に、各割り込みベクタに対応づけられた割り込み要因番号を設定する。 The HBA device driver 111 generates an empty mapping table 210 and sets interrupt vectors in the ascending order in the interrupt vector 601. Further, the HBA device driver 111 sets an interrupt factor number associated with each interrupt vector in the interrupt factor number 602.
 さらに、HBAデバイスドライバ111は、割り込みハンドラ603に割り込み要因に対応する割り込みハンドラへのアクセス情報を設定する。 Furthermore, the HBA device driver 111 sets access information to the interrupt handler corresponding to the interrupt factor in the interrupt handler 603.
 (2)動作モードがベクタ共有モードの場合 (2) When the operation mode is the vector sharing mode
 HBAデバイスドライバ111は、連続する複数の割り込み要因番号を、一つの割り込みベクタに対応づける。具体的には、上位ビットに対応する割り込み要素が同一であり、かつ、最下位のビットに対応する割り込み要素が異なる複数の割り込み要因が一つの割り込みベクタを共有する。別の観点では、同一の割り込みハンドラ200が呼び出される複数の割り込み要因番号が一つの割り込みベクタを共有する。 The HBA device driver 111 associates a plurality of consecutive interrupt factor numbers with one interrupt vector. Specifically, a plurality of interrupt factors having the same interrupt element corresponding to the upper bit and different interrupt elements corresponding to the lowest bit share one interrupt vector. From another viewpoint, a plurality of interrupt factor numbers for calling the same interrupt handler 200 share one interrupt vector.
 なお、共有方法によっては、連続した割り込み要因番号にならない場合がある。この場合には、HBAデバイスドライバ111は、可能な限り、割り込み要因番号が連番となるように、割り込みベクタ及び割り込み要因番号を対応づける。 Note that, depending on the sharing method, consecutive interrupt factor numbers may not be obtained. In this case, the HBA device driver 111 associates the interrupt vector and the interrupt factor number so that the interrupt factor number is a serial number as much as possible.
 HBAデバイスドライバ111は、空のマッピングテーブル210を生成し、割り込みベクタ601に、昇順に割り込みベクタを設定する。さらに、HBAデバイスドライバ111は、割り込み要因番号602に、各割り込みベクタに対応づけられた複数の割り込み要因番号を設定する。 The HBA device driver 111 generates an empty mapping table 210 and sets interrupt vectors in the ascending order in the interrupt vector 601. Further, the HBA device driver 111 sets a plurality of interrupt factor numbers associated with each interrupt vector in the interrupt factor number 602.
 さらに、HBAデバイスドライバ111は、割り込みハンドラ603に割り込み要因に対応する割り込みハンドラへのアクセス情報を設定する。 Furthermore, the HBA device driver 111 sets access information to the interrupt handler corresponding to the interrupt factor in the interrupt handler 603.
 以上がステップS810の処理の説明である。 The above is the description of the processing in step S810.
 次に、HBAデバイスドライバ111は、共有情報領域281にI/Oキューアドレステーブル700を生成する(ステップS811)。その後、HBAデバイスドライバ111は、初期設定処理を終了する。 Next, the HBA device driver 111 generates the I / O queue address table 700 in the shared information area 281 (step S811). Thereafter, the HBA device driver 111 ends the initial setting process.
 具体的には、HBAデバイスドライバ111は、空のI/Oキューアドレステーブル700に、I/Oキュー情報230に登録されたエントリ数と同一の数のエントリを登録する。HBAデバイスドライバ111は、各エントリの割り込み要因番号701、I/O起動キューアドレス702、及びI/O応答キューアドレス703に、割り込み要因番号501、I/O起動キューアドレス505、及びI/O応答キューアドレス506と同一の値を設定する。 Specifically, the HBA device driver 111 registers the same number of entries as the number of entries registered in the I / O queue information 230 in the empty I / O queue address table 700. The HBA device driver 111 adds an interrupt factor number 501, an I / O activation queue address 505, and an I / O response to the interrupt factor number 701, I / O activation queue address 702, and I / O response queue address 703 of each entry. The same value as the queue address 506 is set.
 また、HBAデバイスドライバ111は、FW121に対して、割り込み要因番号の定義情報及び操作情報等を通知する。操作情報には、ベクタ共有モードで動作し、かつ、割り込み要因番号を含むI/Oコマンドの実行指示を受けつけた場合、FW121が割り込み要因番号通知レジスタ251を操作することが定義されている。これによって、FW121は、HBAデバイスドライバ111と協調して、割り込み要因番号通知レジスタ251を操作できる。 Also, the HBA device driver 111 notifies the FW 121 of the definition information and operation information of the interrupt factor number. The operation information defines that the FW 121 operates the interrupt factor number notification register 251 when operating in the vector sharing mode and receiving an instruction to execute an I / O command including an interrupt factor number. Thereby, the FW 121 can operate the interrupt factor number notification register 251 in cooperation with the HBA device driver 111.
 次に、実施例1の通信処理及びI/O処理の具体的な処理の流れについて説明する。 Next, a specific processing flow of communication processing and I / O processing according to the first embodiment will be described.
 まず、通信処理の流れについて説明する。図9は、実施例1の通信処理における計算機100内部の動作を示す説明図である。 First, the flow of communication processing will be described. FIG. 9 is an explanatory diagram illustrating an internal operation of the computer 100 in the communication processing according to the first embodiment.
 まず、VM114が、ハイパバイザ110を介して、HBAデバイスドライバ111に通信処理の実行を要求する。 First, the VM 114 requests the HBA device driver 111 to execute communication processing via the hypervisor 110.
 HBAデバイスドライバ111の送信部220は、通信用領域282を介して、HBA104のFW121に通信処理の実行を指示する。当該指示には割り込みベクタ及び割り込み通知番号が含まれる。 The transmission unit 220 of the HBA device driver 111 instructs the FW 121 of the HBA 104 to execute communication processing via the communication area 282. The instruction includes an interrupt vector and an interrupt notification number.
 HBA104のFW121は、通信処理を実行する。さらに、HBA104のFW121は、割り込み要因番号通知レジスタ251を参照し、当該通信処理に対応する割り込み要因番号に一致するビットを操作する。その後、HBA104のFW121は、割り込みベクタを含む割り込みを発生させる。 The FW 121 of the HBA 104 executes communication processing. Further, the FW 121 of the HBA 104 refers to the interrupt factor number notification register 251 and manipulates a bit that matches the interrupt factor number corresponding to the communication process. Thereafter, the FW 121 of the HBA 104 generates an interrupt including an interrupt vector.
 CPU101は、発生した割り込みに含まれる割り込みベクタに基づいて割り込みベクタテーブル240を参照し、割り込みベクタに対応する割り込みハンドラ200を呼び出す。割り込みハンドラ200は、割り込みベクタが共有されているか否かを判定する。 The CPU 101 refers to the interrupt vector table 240 based on the interrupt vector included in the generated interrupt and calls the interrupt handler 200 corresponding to the interrupt vector. The interrupt handler 200 determines whether or not the interrupt vector is shared.
 割り込みベクタが共有されていない場合、割り込みハンドラ200は一意に割り込み要因を特定できるため、そのまま、割り込みの応答先のVM114に応答する。 When the interrupt vector is not shared, the interrupt handler 200 can uniquely identify the interrupt factor, and thus responds to the VM 114 that is the response destination of the interrupt as it is.
 割り込みベクタが共有されている場合、割り込みハンドラ200は、以下のような処理を実行する。 When the interrupt vector is shared, the interrupt handler 200 executes the following process.
 (1)割り込みハンドラ200は、割り込みベクタに基づいてマッピングテーブル210を参照し、割り込みベクタに対応づけられた複数の割り込み要因番号を特定する。 (1) The interrupt handler 200 refers to the mapping table 210 based on the interrupt vector, and specifies a plurality of interrupt factor numbers associated with the interrupt vector.
 本実施例では、図6Bに示すように、一つの割り込みベクタに対して連続した複数の割り込み要因番号が対応づけられている。そのため、割り込みハンドラ200は、始点となる割り込み要因番号から四つのビットの値を読み出すことによって、割り込み要因を特定できる。ここでは、始点となる割り込み要因番号は、割り込み要因番号602に登録される割り込み要因番号のうち最小の割り込み要因番号である。 In this embodiment, as shown in FIG. 6B, a plurality of consecutive interrupt factor numbers are associated with one interrupt vector. Therefore, the interrupt handler 200 can identify the interrupt factor by reading the values of the four bits from the interrupt factor number as the starting point. Here, the interrupt factor number as the starting point is the smallest interrupt factor number among the interrupt factor numbers registered in the interrupt factor number 602.
 (2)割り込みハンドラ200は、割り込み要因番号通知レジスタ251から、始点となるビットから四つのビットの値を読み出す。さらに、割り込みハンドラ200は、読み出されたビットの値に基づいて、発生した割り込みに対応する割り込み要因番号を特定する。 (2) The interrupt handler 200 reads the value of four bits from the bit as the starting point from the interrupt factor number notification register 251. Furthermore, the interrupt handler 200 specifies an interrupt factor number corresponding to the generated interrupt based on the read bit value.
 (3)割り込みハンドラ200は、特定された割り込み要因番号を解析することによって、割り込みの応答先のVM114を特定する。さらに、割り込みハンドラ200は、割り込みの応答先のVM114に応答する。 (3) The interrupt handler 200 identifies the interrupt response destination VM 114 by analyzing the identified interrupt factor number. Furthermore, the interrupt handler 200 responds to the VM 114 that is the response destination of the interrupt.
 次にI/O処理の具体的な流れについて説明する。図10は、実施例1のI/O処理における計算機100内部の動作を示す説明図である。図11、図12A、図12B、図13A及び図13Bは、実施例1のI/O処理の流れを説明するシーケンス図である。なお、図11は、ベクタ占有モードにおけるI/O処理の流れを示し、図12A、図12B、図13A、及び図13Bは、ベクタ共有モードにおけるI/O処理の流れを示す。 Next, a specific flow of I / O processing will be described. FIG. 10 is an explanatory diagram illustrating an internal operation of the computer 100 in the I / O processing according to the first embodiment. 11, FIG. 12A, FIG. 12B, FIG. 13A, and FIG. 13B are sequence diagrams illustrating the flow of I / O processing according to the first embodiment. 11 shows the flow of I / O processing in the vector occupation mode, and FIGS. 12A, 12B, 13A, and 13B show the flow of I / O processing in the vector sharing mode.
 図10及び図11を用いて、ベクタ占有モードにおけるI/O処理について説明する。 The I / O processing in the vector occupation mode will be described with reference to FIGS.
 HBAデバイスドライバ111は、ハイパバイザ110を介して、VM114からI/O要求を受信した場合、I/O処理を開始する。 When the HBA device driver 111 receives an I / O request from the VM 114 via the hypervisor 110, the HBA device driver 111 starts I / O processing.
 まず、HBAデバイスドライバ111の送信部220は、I/Oキュー情報230を参照して、割り込み要因に対応するI/O起動キューにI/Oコマンドを挿入する(ステップS1101)。ここでは、割り込み要因番号が「32」であるものとする。また、マッピングテーブル210は、図6Aに示す状態であるものとする。したがって、割り込み要因番号「32」に割り当てられた割り込みベクタは「2」である。 First, the transmission unit 220 of the HBA device driver 111 refers to the I / O queue information 230 and inserts an I / O command into the I / O activation queue corresponding to the interrupt factor (step S1101). Here, it is assumed that the interrupt factor number is “32”. The mapping table 210 is in the state shown in FIG. 6A. Therefore, the interrupt vector assigned to the interrupt factor number “32” is “2”.
 HBAデバイスドライバ111の送信部220は、HBA104にI/O処理キューに挿入されたI/Oコマンドの実行を指示する(ステップS1102)。具体的には、HBAデバイスドライバ111は、マッピングテーブル210を参照して、割り込み要因番号に対応づけられる割り込みベクタを特定する。さらに、HBAデバイスドライバ111は、割り込みベクタ及び割り込み要因番号を含むI/Oコマンドの実行指示をHBA104のFW121に出力する。ここでは、当該指示には、割り込みベクタ「2」、及び割り込み要因番号「32」が含まれる。 The transmission unit 220 of the HBA device driver 111 instructs the HBA 104 to execute the I / O command inserted in the I / O processing queue (step S1102). Specifically, the HBA device driver 111 refers to the mapping table 210 and specifies an interrupt vector associated with the interrupt factor number. Further, the HBA device driver 111 outputs an I / O command execution instruction including an interrupt vector and an interrupt factor number to the FW 121 of the HBA 104. Here, the instruction includes an interrupt vector “2” and an interrupt factor number “32”.
 HBA104のFW121は、HBAデバイスドライバ111からI/Oコマンドの実行指示を受信した場合、割り込み要因番号に対応づけられるI/O起動キュー及びI/O応答キューのアドレスを取得する(ステップS1103)。 When the FW 121 of the HBA 104 receives an I / O command execution instruction from the HBA device driver 111, the FW 121 acquires the addresses of the I / O activation queue and the I / O response queue associated with the interrupt factor number (step S1103).
 具体的には、FW121は、割り込み要因番号に基づいてI/Oキューアドレステーブル700を参照し、割り込み要因番号701が実行指示に含まれる割り込み要因番号と一致するエントリを検索する。FW121は、検索されたエントリのI/O起動キューアドレス702及びI/O応答キューアドレス703から、I/Oコマンドが挿入されたI/O送信キュー、及び応答時に使用するI/O応答キューのアドレスを取得する。 Specifically, the FW 121 refers to the I / O queue address table 700 based on the interrupt factor number, and searches for an entry in which the interrupt factor number 701 matches the interrupt factor number included in the execution instruction. The FW 121 uses the I / O activation queue address 702 and the I / O response queue address 703 of the retrieved entry to determine the I / O transmission queue in which the I / O command is inserted and the I / O response queue used at the time of response. Get the address.
 HBA104のFW121は、取得されたアドレスに基づいてI/O起動キューからI/Oコマンドを読み出し、当該I/Oコマンドを実行する(ステップS1104)。これによって、ストレージ装置130に対するI/O処理が実行される。HBA104のFW121は、I/O処理の処理内容に応じて、ストレージ装置130へアクセスする。 The FW 121 of the HBA 104 reads the I / O command from the I / O activation queue based on the acquired address, and executes the I / O command (step S1104). As a result, the I / O processing for the storage apparatus 130 is executed. The FW 121 of the HBA 104 accesses the storage device 130 according to the processing content of the I / O processing.
 HBA104のFW121は、ストレージ装置130からI/O完了の通知を受信した場合(ステップS1105)、I/O応答キューに応答用コマンドを挿入し、さらに、HBAデバイスドライバ111から通知された割り込みベクタに対する割り込みを発生させる(ステップS1106)。ここでは、HBA104のFW121は、割り込みベクタ「2」に対する割り込みを発生させる。 When the FW 121 of the HBA 104 receives an I / O completion notification from the storage device 130 (step S1105), it inserts a response command into the I / O response queue, and further responds to the interrupt vector notified from the HBA device driver 111. An interrupt is generated (step S1106). Here, the FW 121 of the HBA 104 generates an interrupt for the interrupt vector “2”.
 CPU101は、発生した割り込みに含まれる割り込みベクタに基づいて割り込みベクタテーブル240を参照し、割り込みベクタに対応する割り込みハンドラ200を呼び出す。割り込みハンドラ200は、マッピングテーブル210を参照して割り込みベクタが共有されているか否かを判定する。図6Aに示すマッピングテーブル210の場合、一つの割り込みベクタに一つの割り込み要因番号が割り当てられているため、割り込みハンドラ200は、割り込みベクタが共有されていないと判定する。 The CPU 101 refers to the interrupt vector table 240 based on the interrupt vector included in the generated interrupt and calls the interrupt handler 200 corresponding to the interrupt vector. The interrupt handler 200 refers to the mapping table 210 and determines whether or not the interrupt vector is shared. In the mapping table 210 shown in FIG. 6A, since one interrupt factor number is assigned to one interrupt vector, the interrupt handler 200 determines that the interrupt vector is not shared.
 割り込みベクタが共有されていない場合、割り込みハンドラ200は、一意に割り込み要因を特定できる。したがって、割り込みハンドラ200は、マッピングテーブル210を参照し、割り込みベクタに対応する割り込み要因番号を取得する(ステップS1107)。さらに、割り込みハンドラ200は、I/Oキュー情報230を参照し、割り込み要因番号501が取得された割り込み要因番号と一致するエントリを検索する。割り込みハンドラ200は、検索されたエントリのI/O応答キューアドレス506からI/O応答キューのアドレスを取得する。 If the interrupt vector is not shared, the interrupt handler 200 can uniquely identify the interrupt factor. Therefore, the interrupt handler 200 refers to the mapping table 210 and acquires the interrupt factor number corresponding to the interrupt vector (step S1107). Further, the interrupt handler 200 refers to the I / O queue information 230 and searches for an entry in which the interrupt factor number 501 matches the acquired interrupt factor number. The interrupt handler 200 acquires the address of the I / O response queue from the I / O response queue address 506 of the retrieved entry.
 割り込みハンドラ200は、割り込み要因番号に対応するI/O応答キューから応答用コマンドを読み出し、応答用コマンドに基づいて応答処理を実行する(ステップS1108)。これによって、I/O要求を送信したVM114に応答を通知できる。 The interrupt handler 200 reads a response command from the I / O response queue corresponding to the interrupt factor number, and executes response processing based on the response command (step S1108). As a result, a response can be notified to the VM 114 that has transmitted the I / O request.
 次に、図10、図12A及び図12Bを用いて、ベクタ共有モードにおけるI/O処理について説明する。 Next, I / O processing in the vector sharing mode will be described with reference to FIGS. 10, 12A, and 12B.
 HBAデバイスドライバ111は、ハイパバイザ110を介して、VM114からI/O要求を受信した場合、I/O処理を開始する。ここでは、割り込み要因番号が「32」であるものとする。また、マッピングテーブル210は、図6Bに示す状態であるものとする。したがって、割り込み要因番号「32」に割り当てられた割り込みベクタは「1」である。また、割り込みベクタ「1」は、他の割り込み要因番号「33」、「34」、及び「35」が共有される。 When the HBA device driver 111 receives an I / O request from the VM 114 via the hypervisor 110, the HBA device driver 111 starts I / O processing. Here, it is assumed that the interrupt factor number is “32”. The mapping table 210 is in the state shown in FIG. 6B. Therefore, the interrupt vector assigned to the interrupt factor number “32” is “1”. The interrupt vector “1” is shared with other interrupt factor numbers “33”, “34”, and “35”.
 ステップS1201からステップS1205までの処理は、ステップS1101からステップS1105までの処理と同様の内容であるため、説明を省略する。 Since the processing from step S1201 to step S1205 has the same contents as the processing from step S1101 to step S1105, description thereof will be omitted.
 HBA104のFW121は、ストレージ装置130からI/O完了の通知を受信した場合、割り込み要因番号通知レジスタ251に含まれるビットのうち、通知された割り込み要因番号に対応するビットを操作する(ステップS1206)。ここでは、HBA104のFW121は、割り込み要因番号「32」に対応するビットを操作する。 When receiving the I / O completion notification from the storage device 130, the FW 121 of the HBA 104 operates the bit corresponding to the notified interrupt factor number among the bits included in the interrupt factor number notification register 251 (step S1206). . Here, the FW 121 of the HBA 104 operates the bit corresponding to the interrupt factor number “32”.
 HBA104のFW121は、I/O応答キューに応答用コマンドを挿入し、さらに、HBAデバイスドライバ111から割り込みベクタに対する割り込みを発生させる(ステップS1207)。ここでは、HBA104のFW121は、割り込みベクタ「1」に対する割り込みを発生させる。 The FW 121 of the HBA 104 inserts a response command into the I / O response queue, and further generates an interrupt for the interrupt vector from the HBA device driver 111 (step S1207). Here, the FW 121 of the HBA 104 generates an interrupt for the interrupt vector “1”.
 CPU101は、発生した割り込みに含まれる割り込みベクタに基づいて割り込みベクタテーブル240を参照し、割り込みベクタに対応する割り込みハンドラ200を呼び出す。割り込みハンドラ200は、マッピングテーブル210を参照して割り込みベクタが共有されているか否かを判定する。図6Bに示すマッピングテーブル210の場合、一つの割り込みベクタを四つの割り込み要因番号が共有しているため、割り込みハンドラ200は、割り込みベクタが共有されていると判定する。 The CPU 101 refers to the interrupt vector table 240 based on the interrupt vector included in the generated interrupt and calls the interrupt handler 200 corresponding to the interrupt vector. The interrupt handler 200 refers to the mapping table 210 and determines whether or not the interrupt vector is shared. In the mapping table 210 shown in FIG. 6B, the interrupt handler 200 determines that the interrupt vector is shared because four interrupt factor numbers share one interrupt vector.
 割り込みハンドラ200は、マッピングテーブル210から、HBAデバイスドライバ111から通知された割り込みベクタを共有する全ての割り込み要因番号を取得する(ステップS1208)。ここでは、割り込みベクタが「1」であるため、割り込みハンドラ200は、「32」、「33」、「34」及び「35」の四つの割り込み要因番号を取得する。 The interrupt handler 200 acquires all interrupt factor numbers sharing the interrupt vector notified from the HBA device driver 111 from the mapping table 210 (step S1208). Here, since the interrupt vector is “1”, the interrupt handler 200 acquires four interrupt factor numbers “32”, “33”, “34”, and “35”.
 割り込みハンドラ200は、割り込み要因番号通知レジスタ251を参照して、発生した割り込みに対応する割り込み通知番号を特定する(ステップS1209)。具体的には、以下のような処理が実行される。 The interrupt handler 200 refers to the interrupt factor number notification register 251 and identifies an interrupt notification number corresponding to the generated interrupt (step S1209). Specifically, the following processing is executed.
 割り込みハンドラ200は、マッピングテーブル210から取得された複数の割り込み要因番号の中から基準の割り込み要因番号を選択する。ここでは、割り込みハンドラ200は、最も値が小さい割り込み要因番号を基準の割り込み要因番号として選択する。すなわち、「32」が基準の割り込み要因番号として選択される。 The interrupt handler 200 selects a reference interrupt factor number from among a plurality of interrupt factor numbers acquired from the mapping table 210. Here, the interrupt handler 200 selects the interrupt factor number having the smallest value as the reference interrupt factor number. That is, “32” is selected as the reference interrupt factor number.
 割り込みハンドラ200は、割り込み要因番号通知レジスタ251を参照し、基準の割り込み要因番号に対応するビットを含む所定ビット分のビットの値を読み出す。例えば、割り込みハンドラ200は、基準の割り込み要因番号より値が大きく、かつ、基準の割り込み要因番号から連続する4ビット分のビットの値を読み出すものとする。この場合、割り込みハンドラ200は、「32」から「35」までの四つのビットの値を読み出す。 The interrupt handler 200 refers to the interrupt factor number notification register 251 and reads the value of a predetermined number of bits including the bit corresponding to the reference interrupt factor number. For example, it is assumed that the interrupt handler 200 reads a value of a 4-bit bit that is larger than the reference interrupt factor number and that is continuous from the reference interrupt factor number. In this case, the interrupt handler 200 reads values of four bits from “32” to “35”.
 割り込みハンドラ200は、読み出されたビットの値に基づいて操作されているビットを特定することによって、当該ビットに対応する割り込み要因番号を特定できる。 The interrupt handler 200 can specify the interrupt factor number corresponding to the bit by specifying the bit being operated based on the read bit value.
 割り込みハンドラ200は、一度に所定範囲のビットの値を読み出す。そのため、一つの割り込みベクタに不連続な複数の割り込み要因番号が割り当てられている場合、割り込みハンドラ200は、割り込み要因番号通知レジスタ251に頻繁にアクセスする必要がある。 The interrupt handler 200 reads a predetermined range of bit values at a time. Therefore, when a plurality of discontinuous interrupt factor numbers are assigned to one interrupt vector, the interrupt handler 200 needs to frequently access the interrupt factor number notification register 251.
 本実施例では、前述したような割り込み要因番号通知レジスタ251に対するアクセス回数を削減させるために、HBAデバイスドライバ111が、連続する複数の割り込み要因番号を一つの割り込みベクタに割り当てている。これによって、割り込みハンドラ200は、少ない回数の読出処理で、一つの割り込みベクタを共有する複数の割り込み要因番号の操作状態を把握できる。 In this embodiment, in order to reduce the number of accesses to the interrupt factor number notification register 251 as described above, the HBA device driver 111 assigns a plurality of consecutive interrupt factor numbers to one interrupt vector. Thus, the interrupt handler 200 can grasp the operation states of a plurality of interrupt factor numbers sharing one interrupt vector with a small number of read processes.
 割り込みハンドラ200は、前述した処理を実行することによって、割り込みに対応する割り込み要因番号が「32」であることを特定できる。以上がステップS1209の処理の説明である。 The interrupt handler 200 can specify that the interrupt factor number corresponding to the interrupt is “32” by executing the processing described above. The above is the description of the processing in step S1209.
 割り込みハンドラ200は、割り込み要因番号通知レジスタ251のビットのうち、ステップS1208において読み出したビットの値をリセットする(ステップS1210)。 The interrupt handler 200 resets the value of the bit read in step S1208 among the bits of the interrupt factor number notification register 251 (step S1210).
 具体的には、割り込みハンドラ200は、値が読み出された複数のビットの値をリセットする。例えば、割り込みハンドラ200は、割り込み要因番号「32」から4ビットの分の値を1回読み出した場合、割り込み要因番号「32」から「35」までの四つのビットの値をリセットする。また、割り込みハンドラ200は、割り込み要因番号「32」から4ビット分の値を2回読み出した場合、割り込み要因番号「32」から「39」までの八つのビットの値をリセットする。 Specifically, the interrupt handler 200 resets the values of a plurality of bits whose values have been read. For example, when the interrupt handler 200 reads the 4-bit value from the interrupt factor number “32” once, the interrupt handler 200 resets the values of the four bits from the interrupt factor numbers “32” to “35”. Further, when the interrupt handler 200 reads the 4-bit value from the interrupt factor number “32” twice, the interrupt handler 200 resets the values of the eight bits from the interrupt factor numbers “32” to “39”.
 割り込みハンドラ200は、特定された割り込み要因番号に対応するI/O応答キューから応答用コマンドを読み出し、応答用コマンドに基づいて応答処理を実行する(ステップS1211)。 The interrupt handler 200 reads a response command from the I / O response queue corresponding to the specified interrupt factor number, and executes a response process based on the response command (step S1211).
 次に、図10、図13A及び図13Bを用いて、ベクタ共有モードにおけるI/O処理について説明する。図13A及び図13Bは、複数のI/O処理が連続して発生した時のI/O処理の流れを示す。 Next, I / O processing in the vector sharing mode will be described with reference to FIGS. 10, 13A, and 13B. 13A and 13B show the flow of I / O processing when a plurality of I / O processing occurs continuously.
 従来、HBA104は、割り込み要因を特定するためにHBAコア120毎にレジスタを保持していた。そのため、同一のHBAコア120を使用する複数のI/O処理を実行する場合、複数のI/O処理を並列的に処理できず、逐次的に処理(シリアライズ)する必要があった。 Conventionally, the HBA 104 holds a register for each HBA core 120 in order to specify an interrupt factor. For this reason, when a plurality of I / O processes using the same HBA core 120 are executed, the plurality of I / O processes cannot be processed in parallel, and must be sequentially processed (serialized).
 なぜならば、HBAデバイスドライバ111は、割り込みが発生した場合に、割り込み要因を特定するためにHBAコア120が保持するレジスタを参照し、リセットを行うまで、当該レジスタを操作できないためである。 This is because, when an interrupt occurs, the HBA device driver 111 refers to a register held by the HBA core 120 in order to identify the cause of the interrupt and cannot operate the register until the reset is performed.
 一方、実施例1のHBA104は、割り込み要因番号通知レジスタ251のみを保持すればよく、HBAコア毎にレジスタを保持する必要がない。そのため、前述したような問題が発生しない。したがって、実施例1の計算機100は、I/O処理に対応する割り込み要因にかかわらず、複数のI/O処理を並列的に実行できる。 On the other hand, the HBA 104 of the first embodiment only needs to hold the interrupt factor number notification register 251 and does not need to hold a register for each HBA core. Therefore, the problem as described above does not occur. Therefore, the computer 100 according to the first embodiment can execute a plurality of I / O processes in parallel regardless of the interrupt factor corresponding to the I / O process.
 以下、具体的な処理の流れについて説明する。ここでは、同一のHBAコア120を使用するI/O処理として、割り込み要因番号が「32」及び「33」に対応する二つのI/O処理が実行されることを想定する。なお、一般的には、割り込み要因番号は連続していなくてもよい。 Hereinafter, a specific processing flow will be described. Here, it is assumed that two I / O processes corresponding to interrupt factor numbers “32” and “33” are executed as I / O processes using the same HBA core 120. In general, interrupt factor numbers do not have to be consecutive.
 HBAデバイスドライバ111の送信部220は、I/Oキュー情報230を参照して、割り込み要因に対応するI/O起動キューにI/Oコマンドを挿入する(ステップS1301、S1302)。具体的には、送信部220は、割り込み要因番号「32」に対応するI/O起動キュー及び割り込み要因番号「33」に対応するI/O起動キューのそれぞれに、I/Oコマンドを挿入する。 The transmission unit 220 of the HBA device driver 111 refers to the I / O queue information 230 and inserts an I / O command into the I / O activation queue corresponding to the interrupt factor (steps S1301 and S1302). Specifically, the transmission unit 220 inserts an I / O command into each of the I / O activation queue corresponding to the interrupt factor number “32” and the I / O activation queue corresponding to the interrupt factor number “33”. .
 HBAデバイスドライバ111の送信部220は、HBA104のFW121にI/O処理キューに挿入されたI/Oコマンドの実行を指示する(ステップS1303、S1304)。具体的には、HBAデバイスドライバ111は、割り込みベクタ「1」及び割り込み要因番号「32」を含むI/Oコマンドの実行指示をHBA104のFW121に送信し、また、割り込みベクタ「1」及び割り込み要因番号「33」を含むI/Oコマンドの実行指示をHBA104のFW121に送信する。 The transmission unit 220 of the HBA device driver 111 instructs the FW 121 of the HBA 104 to execute the I / O command inserted in the I / O processing queue (steps S1303 and S1304). Specifically, the HBA device driver 111 transmits an I / O command execution instruction including the interrupt vector “1” and the interrupt factor number “32” to the FW 121 of the HBA 104, and the interrupt vector “1” and the interrupt factor An instruction to execute an I / O command including the number “33” is transmitted to the FW 121 of the HBA 104.
 HBA104のFW121は、HBAデバイスドライバ111から、割り込みベクタ「1」及び割り込み要因番号「32」を含むI/Oコマンドの実行指示を受信した場合、割り込み要因番号に対応づけられるI/O起動キュー及びI/O応答キューのアドレスを取得する(ステップS1305)。さらに、HBA104のFW121は、取得されたアドレスに基づいてI/O起動キューからI/Oコマンドを読み出し、当該I/Oコマンドを実行する(ステップS1306)。 When the FW 121 of the HBA 104 receives an instruction to execute an I / O command including the interrupt vector “1” and the interrupt factor number “32” from the HBA device driver 111, the FW 121 and the I / O activation queue associated with the interrupt factor number The address of the I / O response queue is acquired (step S1305). Further, the FW 121 of the HBA 104 reads the I / O command from the I / O activation queue based on the acquired address, and executes the I / O command (step S1306).
 また、HBA104のFW121は、HBAデバイスドライバ111から、割り込みベクタ「1」及び割り込み要因番号「33」を含むI/Oコマンドの実行指示を受信した場合、割り込み要因番号に対応づけられるI/O起動キュー及びI/O応答キューのアドレスを取得する(ステップS1307)。さらに、HBA104のFW121は、取得されたアドレスに基づいてI/O起動キューからI/Oコマンドを読み出し、当該I/Oコマンドを実行する(ステップS1308)。 When the FW 121 of the HBA 104 receives an instruction to execute an I / O command including the interrupt vector “1” and the interrupt factor number “33” from the HBA device driver 111, the I / O activation associated with the interrupt factor number is performed. The addresses of the queue and the I / O response queue are acquired (step S1307). Further, the FW 121 of the HBA 104 reads the I / O command from the I / O activation queue based on the acquired address, and executes the I / O command (step S1308).
 HBA104のFW121は、ストレージ装置130から、割り込み要因番号「32」に対応するI/O完了の通知を受信した場合(ステップS1309)、割り込み要因番号通知レジスタ251に含まれるビットのうち、割り込み要因番号「32」に対応するビットを操作する(ステップS1311)。さらに、HBA104のFW121は、I/O応答キューに応答用コマンドを挿入し、さらに、割り込みベクタ「1」に対する割り込みを発生させる(ステップS1313)。 When the FW 121 of the HBA 104 receives a notification of completion of I / O corresponding to the interrupt factor number “32” from the storage device 130 (step S1309), the interrupt factor number among the bits included in the interrupt factor number notification register 251 The bit corresponding to “32” is manipulated (step S1311). Further, the FW 121 of the HBA 104 inserts a response command into the I / O response queue, and further generates an interrupt for the interrupt vector “1” (step S1313).
 また、HBA104のFW121は、ストレージ装置130から、割り込み要因番号「33」に対応するI/O完了の通知を受信した場合(ステップS1310)、割り込み要因番号通知レジスタ251に含まれるビットのうち、割り込み要因番号「33」に対応するビットを操作する(ステップS1312)。さらに、HBA104のFW121は、I/O応答キューに応答用コマンドを挿入し、さらに、割り込みベクタ「1」に対する割り込みを発生させる(ステップS1314)。 In addition, when the FW 121 of the HBA 104 receives a notification of completion of I / O corresponding to the interrupt factor number “33” from the storage device 130 (step S1310), among the bits included in the interrupt factor number notification register 251, the interrupt The bit corresponding to the factor number “33” is manipulated (step S1312). Further, the FW 121 of the HBA 104 inserts a response command into the I / O response queue, and further generates an interrupt for the interrupt vector “1” (step S1314).
 割り込みハンドラ200は、マッピングテーブル210から割り込みベクタを共有する全ての割り込み要因番号を取得する(ステップS1315)。ここでは、割り込みベクタが「1」であるため、割り込みハンドラ200は、「32」、「33」、「34」及び「35」の四つの割り込み要因番号を取得する。 The interrupt handler 200 acquires all interrupt factor numbers sharing the interrupt vector from the mapping table 210 (step S1315). Here, since the interrupt vector is “1”, the interrupt handler 200 acquires four interrupt factor numbers “32”, “33”, “34”, and “35”.
 割り込みハンドラ200は、割り込み要因番号通知レジスタ251を参照して、発生した割り込みに対応する割り込み通知番号が「32」及び「33」であることを特定する(ステップS1316)。 The interrupt handler 200 refers to the interrupt factor number notification register 251 and specifies that the interrupt notification numbers corresponding to the generated interrupt are “32” and “33” (step S1316).
 割り込みハンドラ200は、割り込み要因番号通知レジスタ251のビットのうち、ステップS1315において読み出したビットの値をリセットする(ステップS1317)。 The interrupt handler 200 resets the value of the bit read in step S1315 among the bits of the interrupt factor number notification register 251 (step S1317).
 割り込みハンドラ200は、割り込み要因番号「32」及び「33」のそれぞれに対応するI/O応答キューから応答用コマンドを読み出し、応答用コマンドに基づいて応答処理を実行する(ステップS1318)。 The interrupt handler 200 reads a response command from the I / O response queue corresponding to each of the interrupt factor numbers “32” and “33”, and executes response processing based on the response command (step S1318).
 従来技術では、ステップS1313の割り込みの発生後、ステップS1317のようなリセット処理が実行されるまで、ステップS1314の割り込みを発生させることができなかった。一方、本実施例では、HBA104は、HBAコア121毎のレジスタを保持する必要はなく、割り込み要因番号通知レジスタ251のみを保持すればよい。そのため、前述したような問題点を解消できる。 In the prior art, after the interrupt in step S1313 occurs, the interrupt in step S1314 cannot be generated until the reset process as in step S1317 is executed. On the other hand, in this embodiment, the HBA 104 does not need to hold a register for each HBA core 121, and only holds the interrupt factor number notification register 251. Therefore, the problems as described above can be solved.
 以上で説明したように、実施例1によれば、計算機100は、割り込み要因を特定するためのレジスタとして、割り込み要因番号通知レジスタ251のみを保持すればよい。そのため、ハードウェアのコストを削減することができる。 As described above, according to the first embodiment, the computer 100 may hold only the interrupt factor number notification register 251 as a register for specifying an interrupt factor. Therefore, the hardware cost can be reduced.
 また、実施例1の割り込みハンドラ200は、割り込み要因番号通知レジスタ251にアクセスすることによって、高速に割り込み要因を特定できる。特に、HBAデバイスドライバ111は連続する割り込み要因番号が一つの割り込みベクタを共有するように設定するため、割り込み要因番号通知レジスタ251の連続するビットの値を読み出すことによって割り込み要因を高速に特定できる。すなわち、HBAデバイスドライバ111は、割り込み要因番号通知レジスタ251へ一回又は少ない回数のアクセスによって、割り込み要因を特定できる。 Also, the interrupt handler 200 of the first embodiment can identify the interrupt factor at high speed by accessing the interrupt factor number notification register 251. In particular, since the HBA device driver 111 sets so that consecutive interrupt factor numbers share one interrupt vector, the interrupt factor can be identified at high speed by reading the value of consecutive bits in the interrupt factor number notification register 251. That is, the HBA device driver 111 can specify the interrupt factor by accessing the interrupt factor number notification register 251 once or a small number of times.
 また、実施例1の計算機は、HBAコア120毎にレジスタを保持する必要がないため、複数のI/O処理が連続して発生した場合であっても、並列的に処理を実行することができる。また、割り込み要因番号の決定、管理、及び割り込み要因番号を用いた割り込み処理は、HBAデバイスドライバ111及びFW121によって行われる。そのため、計算機100の構成に限定されることなく、柔軟に対応することができる。 In addition, since the computer according to the first embodiment does not need to hold a register for each HBA core 120, even when a plurality of I / O processes occur continuously, the computer can execute the processes in parallel. it can. In addition, the determination of the interrupt factor number, management, and interrupt processing using the interrupt factor number are performed by the HBA device driver 111 and the FW 121. Therefore, it is possible to respond flexibly without being limited to the configuration of the computer 100.
 なお、本発明は上記した実施例に限定されるものではなく、様々な変形例が含まれる。また、例えば、上記した実施例は本発明を分かりやすく説明するために構成を詳細に説明したものであり、必ずしも説明した全ての構成を備えるものに限定されるものではない。また、各実施例の構成の一部について、他の構成に追加、削除、置換することが可能である。 In addition, this invention is not limited to the above-mentioned Example, Various modifications are included. Further, for example, the above-described embodiments are described in detail for easy understanding of the present invention, and are not necessarily limited to those provided with all the described configurations. Further, a part of the configuration of each embodiment can be added to, deleted from, or replaced with another configuration.
 また、上記の各構成、機能、処理部、処理手段等は、それらの一部又は全部を、例えば集積回路で設計する等によりハードウェアで実現してもよい。また、本発明は、実施例の機能を実現するソフトウェアのプログラムコードによっても実現できる。この場合、プログラムコードを記録した記憶媒体をコンピュータに提供し、そのコンピュータが備えるCPUが記憶媒体に格納されたプログラムコードを読み出す。この場合、記憶媒体から読み出されたプログラムコード自体が前述した実施例の機能を実現することになり、そのプログラムコード自体、及びそれを記憶した記憶媒体は本発明を構成することになる。このようなプログラムコードを供給するための記憶媒体としては、例えば、フレキシブルディスク、CD-ROM、DVD-ROM、ハードディスク、SSD(Solid State Drive)、光ディスク、光磁気ディスク、CD-R、磁気テープ、不揮発性のメモリカード、ROMなどが用いられる。 In addition, each of the above-described configurations, functions, processing units, processing means, and the like may be realized by hardware by designing a part or all of them with, for example, an integrated circuit. The present invention can also be realized by software program codes that implement the functions of the embodiments. In this case, a storage medium in which the program code is recorded is provided to the computer, and a CPU included in the computer reads the program code stored in the storage medium. In this case, the program code itself read from the storage medium realizes the functions of the above-described embodiments, and the program code itself and the storage medium storing it constitute the present invention. Examples of storage media for supplying such program codes include flexible disks, CD-ROMs, DVD-ROMs, hard disks, SSDs (Solid State Drives), optical disks, magneto-optical disks, CD-Rs, magnetic tapes, A non-volatile memory card, ROM, or the like is used.
 また、本実施例に記載の機能を実現するプログラムコードは、例えば、アセンブラ、C/C++、perl、Shell、PHP、Java等の広範囲のプログラム又はスクリプト言語で実装できる。 Further, the program code for realizing the functions described in this embodiment can be implemented by a wide range of programs or script languages such as assembler, C / C ++, Perl, Shell, PHP, Java, and the like.
 さらに、実施例の機能を実現するソフトウェアのプログラムコードを、ネットワークを介して配信することによって、それをコンピュータのハードディスクやメモリ等の記憶手段又はCD-RW、CD-R等の記憶媒体に格納し、コンピュータが備えるCPUが当該記憶手段や当該記憶媒体に格納されたプログラムコードを読み出して実行するようにしてもよい。 Furthermore, by distributing the program code of the software that realizes the functions of the embodiments via a network, the program code is stored in a storage means such as a hard disk or memory of a computer or a storage medium such as a CD-RW or CD-R. The CPU included in the computer may read and execute the program code stored in the storage unit or the storage medium.
 上述の実施例において、制御線や情報線は、説明上必要と考えられるものを示しており、製品上必ずしも全ての制御線や情報線を示しているとは限らない。全ての構成が相互に接続されていてもよい。 In the above-described embodiments, the control lines and information lines indicate those that are considered necessary for the explanation, and do not necessarily indicate all the control lines and information lines on the product. All the components may be connected to each other.

Claims (10)

  1.  少なくとも一つのオペレーティングシステムが稼動する計算機であって、
     前記計算機は、
     複数のプロセッサコアを含む少なくとも一つのプロセッサ、前記少なくとも一つのプロセッサに接続される記憶装置、及び複数のI/Oデバイスコア含み、前記少なくとも一つのプロセッサに接続される少なくとも一つのI/Oデバイスを備え、
     前記少なくとも一つのI/Oデバイスを制御するI/Oデバイスドライバを有し、
     割り込みベクタと割り込み処理を実行する割り込みハンドラとの対応関係を示す割り込みベクタ情報を管理し、
     前記割り込み要因は、複数の割り込み要素の組み合わせに基づいて定義され、
     複数の割り込み要因の各々に、複数のI/Oキューが割り当てられ、
     前記I/Oデバイスは、前記複数のI/Oキューを用いて並列的に複数のI/O処理を実行し、
     前記I/Oデバイスドライバは、
     複数の割り込みハンドラを含み、
     割り込み要因番号を管理し、
     前記割り込みベクタと前記割り込み要因番号との対応関係を示すマッピング情報を管理し、
     前記割り込み要因番号は、前記複数の割り込み要素の各々に対応する一つ以上のビットから構成されるビット列に基づいて定義され、
     前記I/Oデバイスは、
     前記I/Oデバイスドライバからの要求に応じてI/O処理を実行する制御部を有し、
     前記割り込み要因番号を管理するビットマップ形式のレジスタを保持し、
     前記割り込み要因番号と、前記レジスタに対応するビットマップにおけるビットの位置とが対応づくように管理し、
     前記I/Oデバイスドライバは、
     第1の割り込みベクタに第1の割り込み要因番号及び前記第2の割り込み要因番号が対応づけられている場合に、オペレーティングシステムから前記第1の割り込み要因番号に対応するI/O処理の実行要求を受けつけ、
     前記第1の割り込み要因番号に対応するI/Oキューに第1のI/Oコマンドを挿入し、
     前記第1の割り込みベクタ及び前記第1の割り込み要因番号を含む第1のI/O処理の実行指示を前記制御部に送信し、
     前記制御部は、
     前記第1のI/O処理の実行指示を受信した場合、前記第1のI/Oコマンドに対応するI/O処理を実行し、
     前記レジスタを参照して、前記第1の割り込み要因番号に対応するビットを操作し、
     前記第1の割り込み要因番号に対応するI/Oキューに第1の応答用のコマンドを挿入し、
     前記第1の割り込みベクタを含む第1の割り込みを発生させ、
     前記I/Oデバイスドライバは、
     前記第1の割り込みの発生を検知した場合、前記割り込みベクタ情報に基づいて、前記第1の割り込みベクタに対応する割り込みハンドラを起動させ、
     前記マッピング情報を参照して、前記第1の割り込みベクタに対応づけられる前記第1の割り込み要因番号及び前記第2の割り込み要因番号を特定し、
     前記レジスタから、前記第1の割り込み要因番号及び前記第2の割り込み要因番号の各々に対応するビットの値を読み出すことによって、前記第1の割り込み要因番号に対応する割り込み要因の割り込みが発生したことを特定し、
     前記第1の割り込み要因番号に対応するI/Oキューから前記第1の応答用のコマンドを取得し、前記第1の応答用のコマンドに対応する応答処理を実行することを特徴とする計算機。
    A computer running at least one operating system,
    The calculator is
    At least one processor including a plurality of processor cores, a storage device connected to the at least one processor, and a plurality of I / O device cores, and at least one I / O device connected to the at least one processor Prepared,
    An I / O device driver for controlling the at least one I / O device;
    Manages interrupt vector information indicating the correspondence between interrupt vectors and interrupt handlers that execute interrupt processing.
    The interrupt factor is defined based on a combination of a plurality of interrupt elements,
    A plurality of I / O queues are assigned to each of a plurality of interrupt factors,
    The I / O device executes a plurality of I / O processes in parallel using the plurality of I / O queues,
    The I / O device driver is
    Contains multiple interrupt handlers,
    Manage interrupt source numbers
    Managing mapping information indicating the correspondence between the interrupt vector and the interrupt factor number;
    The interrupt factor number is defined based on a bit string composed of one or more bits corresponding to each of the plurality of interrupt elements,
    The I / O device is
    A control unit that executes I / O processing in response to a request from the I / O device driver;
    Holds a bitmap format register that manages the interrupt factor number,
    The interrupt factor number and the bit position in the bit map corresponding to the register are managed to correspond to each other,
    The I / O device driver is
    When the first interrupt factor number and the second interrupt factor number are associated with the first interrupt vector, the operating system issues an I / O processing execution request corresponding to the first interrupt factor number. Accept,
    Inserting a first I / O command into the I / O queue corresponding to the first interrupt factor number;
    An instruction to execute a first I / O process including the first interrupt vector and the first interrupt factor number is transmitted to the control unit;
    The controller is
    When the execution instruction of the first I / O process is received, the I / O process corresponding to the first I / O command is executed,
    Referring to the register, manipulating a bit corresponding to the first interrupt factor number;
    Insert a first response command into the I / O queue corresponding to the first interrupt factor number,
    Generating a first interrupt including the first interrupt vector;
    The I / O device driver is
    If the occurrence of the first interrupt is detected, an interrupt handler corresponding to the first interrupt vector is activated based on the interrupt vector information,
    Referring to the mapping information, identifying the first interrupt factor number and the second interrupt factor number associated with the first interrupt vector;
    The interrupt of the interrupt factor corresponding to the first interrupt factor number has occurred by reading the value of the bit corresponding to each of the first interrupt factor number and the second interrupt factor number from the register Identify
    A computer that acquires the first response command from an I / O queue corresponding to the first interrupt factor number and executes response processing corresponding to the first response command.
  2.  請求項1に記載の計算機であって、
     前記複数の割り込み要素は、前記プロセッサ、前記I/Oデバイスコア、前記オペレーティングシステム、割り込みの種別、及び割り込みの優先度であり、
     前記I/Oデバイスドライバは、
     前記複数の割り込み要因の数だけ前記複数のI/Oキューを生成して、前記複数の割り込み要因と前記複数のI/Oキューとを対応づけ、
     前記複数の割り込み要素の各々に対応する一つ以上のビットに、前記複数の割り込み要素の各々の値を設定することによって前記割り込み要因番号を生成し、
     前記割り込みベクタと前記割り込み要因番号との対応関係を決定し、
     前記割り込みベクタと前記割り込み要因番号との対応関係を前記マッピング情報に登録し、
     前記制御部に前記割り込み要因番号の定義情報及び前記レジスタの操作方法を送信し、
     前記制御部は、
     前記割り込み要因番号の定義情報に基づいて、前記割り込み要因番号と、前記レジスタに対応するビットマップにおけるビットの位置とが対応づくように管理し、
     前記レジスタの操作方法に基づいて、前記レジスタに対応するビットマップを操作することを特徴とする計算機。
    The computer according to claim 1,
    The plurality of interrupt elements are the processor, the I / O device core, the operating system, an interrupt type, and an interrupt priority.
    The I / O device driver is
    Generating the plurality of I / O queues by the number of the plurality of interrupt factors, and associating the plurality of interrupt factors with the plurality of I / O queues;
    Generating the interrupt factor number by setting the value of each of the plurality of interrupt elements to one or more bits corresponding to each of the plurality of interrupt elements;
    Determining the correspondence between the interrupt vector and the interrupt factor number;
    Registering the correspondence between the interrupt vector and the interrupt factor number in the mapping information,
    Sending the interrupt factor number definition information and the register operation method to the control unit,
    The controller is
    Based on the definition information of the interrupt factor number, the interrupt factor number and the bit position in the bit map corresponding to the register are managed to correspond to each other,
    A computer that operates a bitmap corresponding to the register based on an operation method of the register.
  3.  請求項2に記載の計算機であって、
     前記I/Oデバイスドライバは、
     前記ビット列の最下位のビットに対応する割り込み要素によって識別可能な前記複数の割り込み要因に対して、前記割り込み要因番号が連番となるように当該割り込み要因番号を生成し、
     一つの前記割り込みベクタに対して前記複数の割り込み要因番号を対応づけて前記マッピング情報に登録する場合に、前記複数の割り込み要因番号が連番となるように前記一つの割り込みベクタに対して前記複数の割り込み要因番号を対応づけることを特徴とする計算機。
    The computer according to claim 2,
    The I / O device driver is
    For the plurality of interrupt factors identifiable by the interrupt element corresponding to the least significant bit of the bit string, generate the interrupt factor number so that the interrupt factor number is a serial number,
    When the plurality of interrupt factor numbers are associated with one interrupt vector and registered in the mapping information, the plurality of interrupt factor numbers are serially assigned to the plurality of interrupt factor numbers. A computer characterized by associating interrupt factor numbers.
  4.  請求項3に記載の計算機であって、
     前記I/Oデバイスドライバは、
     前記オペレーティングシステムから前記第1の割り込み要因番号に対応するI/O処理の実行要求を受けつけた後に、前記オペレーティングシステムから前記第2の割り込み要因番号に対応するI/O処理の実行要求を受けつけ、
     前記第1の割り込み要因番号に対応するI/Oキューに前記第1のI/Oコマンドを挿入した後に、前記第2の割り込み要因番号に対応するI/Oキューに第2のI/Oコマンドを挿入し、
     前記第1のI/O処理の実行指示を前記制御部に送信した後に、前記第1の割り込みベクタ及び前記第2の割り込み要因番号を含む第2のI/O処理の実行指示を前記制御部に送信し、
     前記制御部は、
     前記第1のI/O処理の実行指示及び前記第2のI/O処理の実行指示を受信した場合、前記第1のI/Oコマンドに対応するI/O処理を実行した後、前記第2のI/Oコマンドに対応するI/O処理を実行し、
     前記第1の割り込み要因番号に対応するビットを操作した後に、前記第2の割り込み要因番号に対応するビットを操作し、
     前記第1の割り込み要因番号に対応するI/Oキューに前記第1の応答用のコマンドを挿入した後に、前記第2の割り込み要因番号に対応するI/Oキューに第2の応答用のコマンドを挿入し、
     前記第1の割り込みを発生させた後、前記第1の割り込みベクタを含む第2の割り込みを発生させ、
     前記I/Oデバイスドライバは、
     前記第1の割り込み及び前記第2の割り込みの発生を検知した場合、前記割り込みベクタを参照して、前記第1の割り込みベクタに対応する割り込みハンドラを起動させ、
     前記マッピング情報を参照して、前記第1の割り込みベクタに対応づけられる前記第1の割り込み要因番号及び前記第2の割り込み要因番号を特定し、
     前記レジスタから、前記第1の割り込み要因番号及び前記第2の割り込み要因番号のそれぞれに対応するビットの値を読み出すことによって、前記第1の割り込み要因番号及び前記第2の割り込み要因番号のそれぞれに対応する割り込み要因の割り込みが発生したことを特定し、
     前記第1の割り込み要因番号に対応するI/Oキューから前記第1の応答用のコマンドを取得し、前記第1の応答用のコマンドに対応する応答処理を実行し、
     前記第2の割り込み要因番号に対応するI/Oキューから前記第2の応答用コマンドを取得し、前記第2の応答用のコマンドに対応する応答処理を実行することを特徴とする計算機。
    The computer according to claim 3, wherein
    The I / O device driver is
    After receiving an I / O process execution request corresponding to the first interrupt factor number from the operating system, receiving an I / O process execution request corresponding to the second interrupt factor number from the operating system;
    After inserting the first I / O command into the I / O queue corresponding to the first interrupt factor number, the second I / O command into the I / O queue corresponding to the second interrupt factor number Insert
    After transmitting an instruction to execute the first I / O process to the control unit, an instruction to execute a second I / O process including the first interrupt vector and the second interrupt factor number is sent to the control unit. To
    The controller is
    When an instruction to execute the first I / O process and an instruction to execute the second I / O process are received, the I / O process corresponding to the first I / O command is executed, and then the first I / O process is executed. I / O processing corresponding to the I / O command of 2 is executed,
    After manipulating the bit corresponding to the first interrupt factor number, manipulating the bit corresponding to the second interrupt factor number;
    After inserting the first response command into the I / O queue corresponding to the first interrupt factor number, the second response command into the I / O queue corresponding to the second interrupt factor number Insert
    After generating the first interrupt, generating a second interrupt including the first interrupt vector;
    The I / O device driver is
    When the occurrence of the first interrupt and the second interrupt is detected, the interrupt vector corresponding to the first interrupt vector is activated with reference to the interrupt vector.
    Referring to the mapping information, identifying the first interrupt factor number and the second interrupt factor number associated with the first interrupt vector;
    By reading the value of the bit corresponding to each of the first interrupt factor number and the second interrupt factor number from the register, each of the first interrupt factor number and the second interrupt factor number is read. Identify that an interrupt with the corresponding interrupt factor has occurred,
    Obtaining the first response command from the I / O queue corresponding to the first interrupt factor number, executing response processing corresponding to the first response command;
    A computer that acquires the second response command from an I / O queue corresponding to the second interrupt factor number, and executes a response process corresponding to the second response command.
  5.  請求項3に記載の計算機であって、
     前記I/Oデバイスドライバは、
     第2の割り込みベクタに第3の割り込み要因番号が対応づけられている場合に、前記オペレーティングシステムから前記第3の割り込み要因番号に対応するI/O処理の実行要求を受け付け、
     前記第3の割り込み要因番号に対応するI/Oキューに第3のI/Oコマンドを挿入し、
     前記第2の割り込みベクタ及び前記第3の割り込み要因番号を含む第3のI/O処理の実行指示を前記制御部に送信し、
     前記制御部は、
     前記第3のI/O処理の実行指示を受信した場合、前記第3のI/Oコマンドに対応するI/O処理を実行し、
     前記第3の割り込み要因番号に対応するI/Oキューに第3の応答用のコマンドを挿入し、
     前記第2の割り込みベクタを含む第3の割り込みを発生させ、
     前記I/Oデバイスドライバは、
     前記第3の割り込みの発生を検知した場合、前記割り込みベクタ情報に基づいて、前記第2の割り込みベクタに対応する割り込みハンドラを起動させ、
     前記マッピング情報を参照して、前記第2の割り込みベクタに対応づけられる前記第3の割り込み要因番号を特定し、
     前記第3の割り込み要因番号に対応するI/Oキューから前記第3の応答用のコマンドを取得し、前記第3の応答用のコマンドに対応する応答処理を実行することを特徴とする計算機。
    The computer according to claim 3, wherein
    The I / O device driver is
    When a third interrupt factor number is associated with the second interrupt vector, an I / O processing execution request corresponding to the third interrupt factor number is received from the operating system;
    A third I / O command is inserted into the I / O queue corresponding to the third interrupt factor number;
    An instruction to execute a third I / O process including the second interrupt vector and the third interrupt factor number is transmitted to the control unit;
    The controller is
    When the execution instruction of the third I / O process is received, the I / O process corresponding to the third I / O command is executed,
    Insert a third response command into the I / O queue corresponding to the third interrupt factor number,
    Generating a third interrupt including the second interrupt vector;
    The I / O device driver is
    When the occurrence of the third interrupt is detected, an interrupt handler corresponding to the second interrupt vector is activated based on the interrupt vector information,
    With reference to the mapping information, the third interrupt factor number associated with the second interrupt vector is specified,
    A computer that acquires the third response command from an I / O queue corresponding to the third interrupt factor number and executes response processing corresponding to the third response command.
  6.  少なくとも一つのオペレーティングシステムが稼動する計算機におけるI/O処理の制御方法であって、
     前記計算機は、
     複数のプロセッサコアを含む少なくとも一つのプロセッサ、前記少なくとも一つのプロセッサに接続される記憶装置、及び複数のI/Oデバイスコア含み、前記少なくとも一つのプロセッサに接続される少なくとも一つのI/Oデバイスを備え、
     前記少なくとも一つのI/Oデバイスを制御するI/Oデバイスドライバを有し、
     割り込みベクタと割り込み処理を実行する割り込みハンドラとの対応関係を示す割り込みベクタ情報を管理し、
     前記割り込み要因は、複数の割り込み要素の組み合わせに基づいて定義され、
     複数の割り込み要因の各々に、複数のI/Oキューが割り当てられ、
     前記I/Oデバイスは、前記複数のI/Oキューを用いて並列的に複数のI/O処理を実行し、
     前記I/Oデバイスドライバは、
     複数の割り込みハンドラを含み、
     割り込み要因番号を管理し、
     前記割り込みベクタと前記割り込み要因番号との対応関係を示すマッピング情報を管理し、
     前記割り込み要因番号は、前記複数の割り込み要素の各々に対応する一つ以上のビットから構成されるビット列に基づいて定義され、
     前記I/Oデバイスは、
     前記I/Oデバイスドライバからの要求に応じてI/O処理を実行する制御部を有し、
     前記割り込み要因番号を管理するビットマップ形式のレジスタを保持し、
     前記割り込み要因番号と、前記レジスタに対応するビットマップにおけるビットの位置とが対応づくように管理し、
     前記I/O処理の制御方法は、
     前記I/Oデバイスドライバが、第1の割り込みベクタに第1の割り込み要因番号及び前記第2の割り込み要因番号が対応づけられている場合に、オペレーティングシステムから前記第1の割り込み要因番号に対応するI/O処理の実行要求を受けつける第1のステップと、
     前記I/Oデバイスドライバが、前記第1の割り込み要因番号に対応するI/Oキューに第1のI/Oコマンドを挿入する第2のステップと、
     前記I/Oデバイスドライバが、前記第1の割り込みベクタ及び前記第1の割り込み要因番号を含む第1のI/O処理の実行指示を前記制御部に送信する第3のステップと、
     前記制御部が、前記第1のI/O処理の実行指示を受信した場合、前記第1のI/Oコマンドに対応するI/O処理を実行する第4のステップと、
     前記制御部が、前記レジスタを参照して、前記第1の割り込み要因番号に対応するビットを操作する第5のステップと、
     前記制御部が、前記第1の割り込み要因番号に対応するI/Oキューに第1の応答用のコマンドを挿入する第6のステップと、
     前記制御部が、前記第1の割り込みベクタを含む第1の割り込みを発生させる第7のステップと、
     前記I/Oデバイスドライバが、前記第1の割り込みの発生を検知した場合、前記割り込みベクタ情報に基づいて、前記第1の割り込みベクタに対応する割り込みハンドラを起動させる第8のステップと、
     前記I/Oデバイスドライバが、前記マッピング情報を参照して、前記第1の割り込みベクタに対応づけられる前記第1の割り込み要因番号及び前記第2の割り込み要因番号を特定する第9のステップと、
     前記I/Oデバイスドライバが、前記レジスタから、前記第1の割り込み要因番号及び前記第2の割り込み要因番号の各々に対応するビットの値を読み出すことによって、前記第1の割り込み要因番号に対応する割り込み要因の割り込みが発生したことを特定する第10のステップと、
     前記I/Oデバイスドライバが、前記第1の割り込み要因番号に対応するI/Oキューから前記第1の応答用のコマンドを取得し、前記第1の応答用のコマンドに対応する応答処理を実行する第11のステップと、を含むことを特徴とするI/O処理の制御方法。
    A method for controlling I / O processing in a computer running at least one operating system, comprising:
    The calculator is
    At least one processor including a plurality of processor cores, a storage device connected to the at least one processor, and a plurality of I / O device cores, and at least one I / O device connected to the at least one processor Prepared,
    An I / O device driver for controlling the at least one I / O device;
    Manages interrupt vector information indicating the correspondence between interrupt vectors and interrupt handlers that execute interrupt processing.
    The interrupt factor is defined based on a combination of a plurality of interrupt elements,
    A plurality of I / O queues are assigned to each of a plurality of interrupt factors,
    The I / O device executes a plurality of I / O processes in parallel using the plurality of I / O queues,
    The I / O device driver is
    Contains multiple interrupt handlers,
    Manage interrupt source numbers
    Managing mapping information indicating the correspondence between the interrupt vector and the interrupt factor number;
    The interrupt factor number is defined based on a bit string composed of one or more bits corresponding to each of the plurality of interrupt elements,
    The I / O device is
    A control unit that executes I / O processing in response to a request from the I / O device driver;
    Holds a bitmap format register that manages the interrupt factor number,
    The interrupt factor number and the bit position in the bit map corresponding to the register are managed to correspond to each other,
    The control method of the I / O process is as follows:
    When the I / O device driver associates the first interrupt factor number and the second interrupt factor number with the first interrupt vector, the I / O device driver responds to the first interrupt factor number from the operating system. A first step of accepting an I / O processing execution request;
    A second step in which the I / O device driver inserts a first I / O command into an I / O queue corresponding to the first interrupt factor number;
    A third step in which the I / O device driver transmits an instruction to execute a first I / O process including the first interrupt vector and the first interrupt factor number to the control unit;
    A fourth step of executing an I / O process corresponding to the first I / O command when the control unit receives an instruction to execute the first I / O process;
    A fifth step in which the control unit manipulates a bit corresponding to the first interrupt factor number with reference to the register;
    A sixth step in which the control unit inserts a first response command into the I / O queue corresponding to the first interrupt factor number;
    A seventh step for causing the control unit to generate a first interrupt including the first interrupt vector;
    An eighth step of activating an interrupt handler corresponding to the first interrupt vector based on the interrupt vector information when the I / O device driver detects the occurrence of the first interrupt;
    A ninth step in which the I / O device driver refers to the mapping information and identifies the first interrupt factor number and the second interrupt factor number associated with the first interrupt vector;
    The I / O device driver reads the value of the bit corresponding to each of the first interrupt factor number and the second interrupt factor number from the register, thereby corresponding to the first interrupt factor number. A tenth step of specifying that an interrupt factor has occurred;
    The I / O device driver acquires the first response command from the I / O queue corresponding to the first interrupt factor number, and executes a response process corresponding to the first response command An I / O processing control method comprising: an eleventh step.
  7.  請求項6に記載のI/O処理の制御方法であって、
     前記複数の割り込み要素は、前記プロセッサ、前記I/Oデバイスコア、前記オペレーティングシステム、割り込みの種別、及び割り込みの優先度であり、
     前記I/O処理の制御方法は、
     前記I/Oデバイスドライバが、前記複数の割り込み要因の数だけ前記複数のI/Oキューを生成して、前記複数の割り込み要因と前記複数のI/Oキューとを対応づける第12のステップと、
     前記I/Oデバイスドライバが、前記複数の割り込み要素の各々に対応する一つ以上のビットに、前記複数の割り込み要素の各々の値を設定することによって前記割り込み要因番号を生成する第13のステップと、
     前記I/Oデバイスドライバが、前記割り込みベクタと前記割り込み要因番号との対応関係を決定する第14のステップと、
     前記I/Oデバイスドライバが、前記割り込みベクタと前記割り込み要因番号との対応関係を前記マッピング情報に登録する第15のステップと、
     前記I/Oデバイスドライバが、前記制御部に前記割り込み要因番号の定義情報及び前記レジスタの操作方法を送信する第16のステップと、を含み、
     前記制御部は、
     前記割り込み要因番号の定義情報に基づいて、前記割り込み要因番号と、前記レジスタに対応するビットマップにおけるビットの位置とが対応づくように管理し、
     前記レジスタの操作方法に基づいて、前記レジスタに対応するビットマップを操作することを特徴とするI/O処理の制御方法。
    The I / O processing control method according to claim 6,
    The plurality of interrupt elements are the processor, the I / O device core, the operating system, an interrupt type, and an interrupt priority.
    The control method of the I / O process is as follows:
    A twelfth step in which the I / O device driver generates the plurality of I / O queues by the number of the plurality of interrupt factors and associates the plurality of interrupt factors with the plurality of I / O queues; ,
    A thirteenth step in which the I / O device driver generates the interrupt factor number by setting a value of each of the plurality of interrupt elements in one or more bits corresponding to each of the plurality of interrupt elements. When,
    A fourteenth step in which the I / O device driver determines a correspondence relationship between the interrupt vector and the interrupt factor number;
    A fifteenth step in which the I / O device driver registers a correspondence relationship between the interrupt vector and the interrupt factor number in the mapping information;
    The I / O device driver includes a sixteenth step of transmitting definition information of the interrupt factor number and a method of operating the register to the control unit,
    The controller is
    Based on the definition information of the interrupt factor number, the interrupt factor number and the bit position in the bit map corresponding to the register are managed to correspond to each other,
    A control method of I / O processing, wherein a bitmap corresponding to the register is operated based on an operation method of the register.
  8.  請求項7に記載のI/O処理の制御方法であって、
     前記第13のステップは、前記ビット列の最下位のビットに対応する割り込み要素によって識別可能な前記複数の割り込み要因に対して、前記割り込み要因番号が連番となるように当該割り込み要因番号を生成するステップを含み、
     前記第14のステップは、一つの前記割り込みベクタに対して前記複数の割り込み要因番号を対応づけて前記マッピング情報に登録する場合に、前記複数の割り込み要因番号が連番となるように前記一つの割り込みベクタに対して前記複数の割り込み要因番号を対応づけるステップを含むことを特徴とするI/O処理の制御方法。
    The I / O processing control method according to claim 7,
    The thirteenth step generates the interrupt factor numbers so that the interrupt factor numbers are serial numbers for the plurality of interrupt factors identifiable by the interrupt element corresponding to the least significant bit of the bit string. Including steps,
    In the fourteenth step, when the plurality of interrupt factor numbers are associated with one interrupt vector and registered in the mapping information, the one interrupt factor number is a serial number. A method for controlling an I / O process, comprising a step of associating the plurality of interrupt factor numbers with an interrupt vector.
  9.  請求項8に記載のI/O処理の制御方法であって、
     前記第1のステップは、前記オペレーティングシステムから前記第1の割り込み要因番号に対応するI/O処理の実行要求を受けつけた後に、前記オペレーティングシステムから前記第2の割り込み要因番号に対応するI/O処理の実行要求を受けつけるステップを含み、
     前記第2のステップは、前記第1の割り込み要因番号に対応するI/Oキューに前記第1のI/Oコマンドを挿入した後に、前記第2の割り込み要因番号に対応するI/Oキューに第2のI/Oコマンドを挿入するステップを含み、
     前記第3のステップは、前記第1のI/O処理の実行指示を前記制御部に送信した後に、前記第1の割り込みベクタ及び前記第2の割り込み要因番号を含む第2のI/O処理の実行指示を前記制御部に送信するステップを含み、
     前記第4のステップは、前記第1のI/O処理の実行指示及び前記第2のI/O処理の実行指示を受信した場合、前記第1のI/Oコマンドに対応するI/O処理を実行した後、前記第2のI/Oコマンドに対応するI/O処理を実行するステップを含み、
     前記第5のステップは、前記第1の割り込み要因番号に対応するビットを操作した後に、前記第2の割り込み要因番号に対応するビットを操作するステップを含み、
     前記第6のステップは、前記第1の割り込み要因番号に対応するI/Oキューに前記第1の応答用のコマンドを挿入した後に、前記第2の割り込み要因番号に対応するI/Oキューに第2の応答用のコマンドを挿入するステップを含み、
     前記第7のステップは、前記第1の割り込みを発生させた後、前記第1の割り込みベクタを含む第2の割り込みを発生させるステップを含み、
     前記第8のステップは、前記第1の割り込み及び前記第2の割り込みの発生を検知した場合、前記割り込みベクタを参照して、前記第1の割り込みベクタに対応する割り込みハンドラを起動させるステップを含み、
     前記第9のステップは、前記マッピング情報を参照して、前記第1の割り込みベクタに対応づけられる前記第1の割り込み要因番号及び前記第2の割り込み要因番号を特定するステップを含み、
     前記第10のステップは、前記レジスタから、前記第1の割り込み要因番号及び前記第2の割り込み要因番号のそれぞれに対応するビットの値を読み出すことによって、前記第1の割り込み要因番号及び前記第2の割り込み要因番号のそれぞれに対応する割り込み要因の割り込みが発生したことを特定するステップを含み、
     前記第11のステップは、
     前記第1の割り込み要因番号に対応するI/Oキューから前記第1の応答用のコマンドを取得し、前記第1の応答用のコマンドに対応する応答処理を実行するステップと、
     前記第2の割り込み要因番号に対応するI/Oキューから前記第2の応答用コマンドを取得し、前記第2の応答用のコマンドに対応する応答処理を実行するステップと、を含むことを特徴とするI/O処理の制御方法。
    The I / O processing control method according to claim 8, comprising:
    The first step receives an I / O processing execution request corresponding to the first interrupt factor number from the operating system, and then receives an I / O corresponding to the second interrupt factor number from the operating system. Including a step of accepting a process execution request,
    In the second step, after the first I / O command is inserted into the I / O queue corresponding to the first interrupt factor number, the I / O queue corresponding to the second interrupt factor number is inserted. Inserting a second I / O command;
    The third step includes a second I / O process including the first interrupt vector and the second interrupt factor number after the execution instruction of the first I / O process is transmitted to the control unit. Transmitting the execution instruction to the control unit,
    In the fourth step, when an instruction to execute the first I / O process and an instruction to execute the second I / O process are received, the I / O process corresponding to the first I / O command is received. And executing an I / O process corresponding to the second I / O command after executing
    The fifth step includes the step of manipulating the bit corresponding to the second interrupt factor number after manipulating the bit corresponding to the first interrupt factor number,
    In the sixth step, after the first response command is inserted into the I / O queue corresponding to the first interrupt factor number, the I / O queue corresponding to the second interrupt factor number is inserted. Inserting a second response command;
    The seventh step includes generating a second interrupt including the first interrupt vector after generating the first interrupt,
    The eighth step includes a step of activating an interrupt handler corresponding to the first interrupt vector with reference to the interrupt vector when the occurrence of the first interrupt and the second interrupt is detected. ,
    The ninth step includes the step of referring to the mapping information and identifying the first interrupt factor number and the second interrupt factor number associated with the first interrupt vector,
    The tenth step reads the value of the bit corresponding to each of the first interrupt factor number and the second interrupt factor number from the register, whereby the first interrupt factor number and the second interrupt factor number are read out. Including the step of identifying the occurrence of an interrupt factor corresponding to each of the interrupt factor numbers of
    The eleventh step includes
    Obtaining the first response command from the I / O queue corresponding to the first interrupt factor number, and executing response processing corresponding to the first response command;
    Obtaining the second response command from the I / O queue corresponding to the second interrupt factor number, and executing a response process corresponding to the second response command. I / O processing control method.
  10.  請求項8に記載のI/O処理の制御方法であって、
     前記I/Oデバイスドライバが、第2の割り込みベクタに第3の割り込み要因番号が対応づけられている場合に、前記オペレーティングシステムから前記第3の割り込み要因番号に対応するI/O処理の実行要求を受け付けるステップと、
     前記I/Oデバイスドライバが、前記第3の割り込み要因番号に対応するI/Oキューに第3のI/Oコマンドを挿入するステップと、
     前記I/Oデバイスドライバが、前記第2の割り込みベクタ及び前記第3の割り込み要因番号を含む第3のI/O処理の実行指示を前記制御部に送信するステップと、
     前記制御部が、前記第3のI/O処理の実行指示を受信した場合、前記第3のI/Oコマンドに対応するI/O処理を実行するステップと、
     前記制御部が、前記第3の割り込み要因番号に対応するI/Oキューに第3の応答用のコマンドを挿入するステップと、
     前記制御部が、前記第2の割り込みベクタを含む第3の割り込みを発生させるステップと、
     前記I/Oデバイスドライバが、前記第3の割り込みの発生を検知した場合、前記割り込みベクタ情報に基づいて、前記第2の割り込みベクタに対応する割り込みハンドラを起動させるステップと、
     前記I/Oデバイスドライバが、前記マッピング情報を参照して、前記第2の割り込みベクタに対応づけられる前記第3の割り込み要因番号を特定するステップと、
     前記I/Oデバイスドライバが、前記第3の割り込み要因番号に対応するI/Oキューから前記第3の応答用のコマンドを取得し、前記第3の応答用のコマンドに対応する応答処理を実行するステップと、を含むことを特徴とするI/O処理の制御方法。
    The I / O processing control method according to claim 8, comprising:
    When the third interrupt factor number is associated with the second interrupt vector, the I / O device driver requests the I / O processing execution corresponding to the third interrupt factor number from the operating system. A step of accepting,
    The I / O device driver inserting a third I / O command into an I / O queue corresponding to the third interrupt factor number;
    The I / O device driver transmitting an instruction to execute a third I / O process including the second interrupt vector and the third interrupt factor number to the control unit;
    A step of executing an I / O process corresponding to the third I / O command when the control unit receives an instruction to execute the third I / O process;
    The control unit inserting a third response command into an I / O queue corresponding to the third interrupt factor number;
    The control unit generating a third interrupt including the second interrupt vector;
    When the I / O device driver detects the occurrence of the third interrupt, starting an interrupt handler corresponding to the second interrupt vector based on the interrupt vector information;
    The I / O device driver refers to the mapping information and identifies the third interrupt factor number associated with the second interrupt vector;
    The I / O device driver acquires the third response command from the I / O queue corresponding to the third interrupt factor number, and executes a response process corresponding to the third response command And a step of controlling the I / O processing.
PCT/JP2014/077507 2014-10-16 2014-10-16 Computer and i/o processing control method WO2016059692A1 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
PCT/JP2014/077507 WO2016059692A1 (en) 2014-10-16 2014-10-16 Computer and i/o processing control method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/JP2014/077507 WO2016059692A1 (en) 2014-10-16 2014-10-16 Computer and i/o processing control method

Publications (1)

Publication Number Publication Date
WO2016059692A1 true WO2016059692A1 (en) 2016-04-21

Family

ID=55746262

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/JP2014/077507 WO2016059692A1 (en) 2014-10-16 2014-10-16 Computer and i/o processing control method

Country Status (1)

Country Link
WO (1) WO2016059692A1 (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2018008103A1 (en) * 2016-07-06 2018-01-11 株式会社日立製作所 Interrupt control method and interface device
CN108984350A (en) * 2017-06-01 2018-12-11 龙芯中科技术有限公司 A kind of interrupt processing functional verification system and method
WO2020060450A1 (en) * 2018-09-17 2020-03-26 Telefonaktiebolaget Lm Ericsson (Publ) Bit register in shared memory indicating the processor and the software handlers
CN111722916A (en) * 2020-06-29 2020-09-29 长沙新弘软件有限公司 Method for processing MSI-X interruption by mapping table

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2005107695A (en) * 2003-09-29 2005-04-21 Sanyo Electric Co Ltd Information processor and its interrupt control method
US20110153935A1 (en) * 2009-12-17 2011-06-23 Yadong Li Numa-aware scaling for network devices
JP2012073660A (en) * 2010-09-27 2012-04-12 Hitachi Ltd I/o adapter control method, computer, and method for creating virtual machine
JP2013026680A (en) * 2011-07-15 2013-02-04 Hitachi Ltd Network device and transmission frame control method

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2005107695A (en) * 2003-09-29 2005-04-21 Sanyo Electric Co Ltd Information processor and its interrupt control method
US20110153935A1 (en) * 2009-12-17 2011-06-23 Yadong Li Numa-aware scaling for network devices
JP2012073660A (en) * 2010-09-27 2012-04-12 Hitachi Ltd I/o adapter control method, computer, and method for creating virtual machine
JP2013026680A (en) * 2011-07-15 2013-02-04 Hitachi Ltd Network device and transmission frame control method

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2018008103A1 (en) * 2016-07-06 2018-01-11 株式会社日立製作所 Interrupt control method and interface device
CN108984350A (en) * 2017-06-01 2018-12-11 龙芯中科技术有限公司 A kind of interrupt processing functional verification system and method
CN108984350B (en) * 2017-06-01 2023-06-27 龙芯中科技术股份有限公司 Interrupt processing function verification system and method
WO2020060450A1 (en) * 2018-09-17 2020-03-26 Telefonaktiebolaget Lm Ericsson (Publ) Bit register in shared memory indicating the processor and the software handlers
US11615023B2 (en) 2018-09-17 2023-03-28 Telefonaktiebolaget Lm Ericsson (Publ) Bit register in shared memory indicating the processor and the software handlers
CN111722916A (en) * 2020-06-29 2020-09-29 长沙新弘软件有限公司 Method for processing MSI-X interruption by mapping table
CN111722916B (en) * 2020-06-29 2023-11-14 长沙新弘软件有限公司 Method for processing MSI-X interrupt through mapping table

Similar Documents

Publication Publication Date Title
CN107209681B (en) Storage device access method, device and system
US20230054866A1 (en) System and method to extend nvme queues to user space
CN108139928B (en) Method, computing device, and readable medium for migrating operations between CPU cores
US20190243757A1 (en) Systems and methods for input/output computing resource control
EP2808786B1 (en) Method of controlling computer system and computer system
US8527666B2 (en) Accessing a configuration space of a virtual function
EP4220419B1 (en) Modifying nvme physical region page list pointers and data pointers to facilitate routing of pcie memory requests
JP7504092B2 (en) Safe Memory Access in Virtualized Computing Environments
US10826848B2 (en) Balanced, opportunistic multicore I/O scheduling from non-SMP applications
WO2010116402A1 (en) Information processor
WO2016059692A1 (en) Computer and i/o processing control method
WO2016056060A1 (en) Computer and vector setting method
US10169062B2 (en) Parallel mapping of client partition memory to multiple physical adapters
US10684900B2 (en) Enhanced message control banks
JP6653786B2 (en) I / O control method and I / O control system
US20200151118A1 (en) Method and apparatus for offloading file i/o based on remote direct memory access using unikernel
US20200241939A1 (en) System and methods of zero-copy data path among user level processes
US8713569B2 (en) Dynamic association and disassociation of threads to device functions based on requestor identification
WO2016092667A1 (en) Computer and interrupt control method
Hellwig High Performance Storage with blkmq and scsi-mq
KR20240025020A (en) System and method for transferring data from non-volatile memory to process accelerator
JP2024524070A (en) System and method for transferring data from a non-volatile memory to a process accelerator - Patents.com

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 14903957

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 14903957

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: JP