WO2018008103A1 - 割込制御方法、及び、インタフェース装置 - Google Patents

割込制御方法、及び、インタフェース装置 Download PDF

Info

Publication number
WO2018008103A1
WO2018008103A1 PCT/JP2016/069983 JP2016069983W WO2018008103A1 WO 2018008103 A1 WO2018008103 A1 WO 2018008103A1 JP 2016069983 W JP2016069983 W JP 2016069983W WO 2018008103 A1 WO2018008103 A1 WO 2018008103A1
Authority
WO
WIPO (PCT)
Prior art keywords
interrupt
command
queue
completion
interface device
Prior art date
Application number
PCT/JP2016/069983
Other languages
English (en)
French (fr)
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/JP2016/069983 priority Critical patent/WO2018008103A1/ja
Publication of WO2018008103A1 publication Critical patent/WO2018008103A1/ja

Links

Images

Classifications

    • 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
    • G06F13/12Program control for peripheral devices using hardware independent of the central processor, e.g. channel or peripheral processor
    • 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/14Handling requests for interconnection or transfer
    • G06F13/20Handling requests for interconnection or transfer for access to input/output bus
    • G06F13/24Handling requests for interconnection or transfer for access to input/output bus using 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/14Handling requests for interconnection or transfer
    • G06F13/36Handling requests for interconnection or transfer for access to common bus or bus system

Definitions

  • the present invention generally relates to interrupt control in a computer system.
  • HBA Hyper Bus Adapter
  • processing multiplicity and performance are improved by making the control LSI multi-core.
  • the number of multi-CPUs and the number of cores are remarkably increased.
  • multi-queue aiming at performance improvement by multiple processing by using a larger number of I / O queues than the number of cores of the HBA.
  • Patent Document 1 waits for a certain period from the start of a timer to a timeout, merges and notifies the interrupts generated during that period, thereby reducing the number of interrupt notifications and reducing the load of interrupt processing. It is disclosed.
  • timers are prepared in parallel for the number of I / O issue queues and I / O completion queues, and interrupt merging is performed for each queue.
  • Patent Document 1 does not disclose an interrupt notification method in a multi-queue environment. Therefore, with the technology disclosed in this document, it is not possible to appropriately notify a related interrupt to each queue, and it is not possible to transmit an I / O processing completion notification to an application as intended.
  • an object of the present invention is to provide a method and an interface device for appropriately controlling interrupts in a multi-queue environment.
  • the computer system includes a processor, a memory, and an interface device.
  • the memory includes a plurality of issue queues that store issue commands issued from the processor to the interface device, and a plurality of completion queues that store completion commands issued from the interface device to the processor.
  • the interface device dequeues an issuance command from a certain issuance queue, the issuance command is transmitted to an external device connected to the interface device, and command information related to the issuance command is held in the storage area.
  • the interface device When the interface device receives a completion command corresponding to the issue command from the external device, the interface device enqueues the received completion command into a certain completion queue, holds the ID of the completion queue, and issues an issue command corresponding to the received completion command.
  • the command information is deleted from the storage area.
  • FIG. 2 shows an example of a hardware configuration of a computer system.
  • An example of a functional configuration of a computer system is shown.
  • An example of an interrupt flag management table is shown.
  • An example of a queue ID management table is shown.
  • An example of a round robin management table is shown.
  • information may be described in terms of “xxx table”, “xxx queue”, or “xxx list”, but the information may be expressed in any data structure. That is, in order to show that the information does not depend on the data structure, the “xxx table”, “xxx queue”, or “xxx list” can be called “xxx information”.
  • the process may be described using “program” as a subject.
  • the program is executed by a processor (for example, a CPU (Central Processing Unit)), so that a predetermined process is appropriately performed. Since the processing is performed using at least one of a storage resource (for example, a memory) and a communication interface device, the subject of the processing may be a processor and an apparatus having the processor. Part or all of the processing performed by the processor may be performed by a hardware circuit.
  • the computer program may be installed from a program source.
  • the program source may be a program distribution server or a storage medium (for example, a portable storage medium).
  • FIG. 1 shows an example of the hardware configuration of the computer system 2.
  • the computer system 2 may include a CPU 10, a memory 12, an HBA 14, a NIC (Network Interface Card) 11, and an RC (Root Complex) 13.
  • the HBA 14 is an example of an interface device.
  • the CPU 10, the HBA 14, and the NIC 11 may be connected to the RC 13 via a PCIe (PCI-Express) bus. That is, the CPU 10, the HBA 14, and the NIC 11 may be connected so as to be capable of bidirectional communication.
  • PCIe PCI-Express
  • the memory 12 may be connected to the CPU 10 via a memory bus. Various programs and data may be stored in the memory 12. Examples of the memory 12 are a DRAM (Dynamic Random Access Memory), a PRAM (Phase Change Random Access Memory), a FeRAM (Ferroelectric Random Access Memory), a MRAM (Memory Memory), and a MRAM (Magic Memory Memory).
  • DRAM Dynamic Random Access Memory
  • PRAM Phase Change Random Access Memory
  • FeRAM Feroelectric Random Access Memory
  • MRAM Magnety Memory
  • MRAM Magnetic Memory Memory
  • the CPU 10 may realize various functions of the computer system 2 by executing a program stored in the memory 12.
  • the NIC 11 may control data transmitted / received via the communication network 34.
  • Examples of the communication network 34 are a LAN (Local Area Network), a WAN (Wide Area Network), a VPN (Virtual Private Network), and the like.
  • a setting management server 32 for managing settings of the computer system 2 may be connected to the communication network 34. That is, the user may be able to change the settings of the computer system 2 by operating the setting management server 32.
  • the storage apparatus 30 that is an example of an external apparatus may be connected to the HBA 14 via an external bus.
  • Examples of the storage device 30 are an HDD (Hard Disk Drive), an SSD (Solid State Drive), a flash memory, and the like.
  • the HBA 14 may control data transmitted to and received from the storage device 30.
  • the HBA 14 is a device that complies with PCIe, and may have a PCIe Function.
  • the LSI of the HBA 14 may have a plurality of cores 20 (multicore).
  • Each core 20 may include a storage area 22 capable of storing data, and a firmware (FW) 24 capable of executing a program.
  • FW firmware
  • FIG. 2 shows an example of the functional configuration of the computer system 2.
  • the computer system 2 may include a VM (Virtual Machine) 100 and an HBA driver 102 as functions.
  • the HBA driver 102 is a program that controls the HBA 14.
  • the computer system 2 may have a plurality of VMs 100.
  • the VM 100 may be a program executed by the CPU 10 or a program executed on a hypervisor (not shown).
  • the HBA driver 102 may be shared by a plurality of VMs 100.
  • the HBA driver 102 may include a transmission unit 122 and an interrupt handler 120.
  • the transmission unit 122 may enqueue the I / O issue queue.
  • the interrupt handler 120 may dequeue the I / O completion command from the I / O completion queue and transmit it to the VM 100.
  • the memory 12 may have a system memory space 106 and a PCI memory space 104.
  • an HBA communication area 340 In the system memory space 106, an HBA communication area 340, an I / O issue queue group 300, and an I / O completion queue group 320 may be arranged.
  • the HBA communication area 340 is used for communication between the HBA driver 102 and the FW 24 of the HBA 14.
  • the I / O issue queue group 300 may include a plurality of I / O issue queues.
  • the HBA driver 102 (transmission unit 122) may enqueue an I / O issue command to be transmitted to the FW 24 into one I / O issue queue in the I / O issue queue group 300.
  • the FW 24 may dequeue the I / O issue command from the I / O issue queue.
  • the I / O completion queue group 320 may include a plurality of I / O completion queues.
  • the FW 24 may enqueue an I / O completion command to be transmitted to the HBA driver 102 into one I / O completion queue in the I / O completion queue group 320.
  • the HBA driver 102 (interrupt handler 120) may dequeue an I / O completion command from the I / O completion queue.
  • an interrupt vector table 200 and a queue ID register 220 may be arranged.
  • the interrupt vector table 200 may include a plurality of interrupt vectors.
  • One interrupt may be managed by one interrupt vector.
  • a plurality of FWs 24 may be associated with one interrupt vector, and a plurality of interrupt vectors may be associated with one FW 24.
  • the queue ID register 220 may store the ID of the I / O completion queue in which the I / O completion command is enqueued. In this embodiment, it is assumed that one queue ID register 220 is associated with one interrupt vector, but other correspondence relationships may be used.
  • a queue ID management table 400 In the storage area 22 of the core 20 of the HBA 14, a queue ID management table 400, an interrupt flag management table 420, and a command management table 440 may be arranged.
  • FIG. 3 shows an example of the interrupt flag management table 420.
  • the interrupt flag management table 420 is a table for managing whether or not an interrupt has occurred for each interrupt factor number. For example, the interrupt flag management table 420 sets the flag 424 of the interrupt factor number 422 in which an interrupt has occurred to “1”, and sets the flag 424 of the interrupt factor number 422 in which no interrupt has occurred to “0”. May be managed.
  • the interrupt flag management table 420 may be configured as a so-called bitmap.
  • FIG. 4 shows an example of the queue ID management table 400.
  • the queue ID management table 400 is a table for managing the correspondence between interrupt factor numbers and queue IDs.
  • the interrupt flag management table 420 of FIG. 3 the interrupt factor numbers 422 “0” and “2” flags 424 are “1”.
  • the interrupt factor number 402 “0” is associated with the queue ID 404 “1”
  • the interrupt factor number 402 “2” is associated with the queue ID 404 “5”. This indicates that an I / O completion command is enqueued in each of the I / O completion queues with queue IDs 404 “1” and “5” at that time.
  • the interrupt flag management table 420 and the queue ID management table 400 may be collectively referred to as interrupt management information.
  • FIG. 5 is a sequence chart showing an overall outline of the I / O processing.
  • the VM 100 transmits an I / O issue command to the HBA driver 102 (S100).
  • the HBA driver 102 When the HBA driver 102 receives the I / O issue command of S100, the HBA driver 102 enqueues the I / O issue command into the I / O issue queue of the queue ID specified by the I / O issue command (S102).
  • the I / O issue command received from the VM 100 and the I / O issue command enqueued in the I / O issue queue may be the same or different.
  • the HBA driver 102 transmits an I / O issue command execution instruction to the FW 24 of the HBA 14 (S104).
  • This execution instruction may include a queue ID in which the I / O issue command is enqueued in S102.
  • the FW 24 executes the issue command process (S110). Although details of the issue command process will be described later (see FIG. 6), the I / O issue command enqueued in S102 is transmitted to the storage apparatus 30 by the process.
  • the FW 24 executes a completion command process (S114). Although details of the completion command processing will be described later (see FIG. 7), the I / O completion command received in S114 is enqueued in the I / O completion queue by this processing.
  • the FW 24 executes an interrupt process after the process of S114 or periodically (S120). The details of this interrupt processing will be described later (see FIG. 8), but by this processing, the queue ID of the I / O completion queue to which the I / O completion command has been enqueued is written to the interrupt queue ID register 220. An interrupt notification is sent to the interrupt vector corresponding to FW 24 of the interrupt vector table 200.
  • the HBA driver 102 that has detected the interrupt notification for the interrupt vector in S120 activates the interrupt handler 120 corresponding to the interrupt vector (S124).
  • the interrupt handler 120 reads the queue ID from the interrupt queue ID register 220 (S130).
  • the interrupt handler 120 dequeues the I / O completion command from the I / O completion queue corresponding to the queue ID read in S130 (S132).
  • the interrupt handler 120 transmits an I / O completion command to the VM 100 based on the I / O completion command dequeued in S132 (S134).
  • the I / O issue command issued from the VM 100 is transmitted to the storage apparatus 30, and the I / O completion command issued from the storage apparatus 30 is transmitted to the VM 100.
  • the issue command process (S110), the completion command process (S114), and the interrupt process (S120) may be independent processes.
  • FIG. 6 is a flowchart showing an example of the issue command process. This corresponds to the processing of S110 in FIG.
  • the FW 24 When the FW 24 receives an instruction to execute the I / O issue command of S104 from the HBA driver 102, the FW 24 starts the next process (S400).
  • the FW 24 dequeues the I / O issue command from the I / O issue queue corresponding to the queue ID designated by the received I / O issue command execution instruction (S402).
  • the FW 24 registers information (including the queue ID) related to the I / O issue command in S402 in the command management table 440 (S404).
  • the FW 24 transmits the I / O issue command of S402 to the storage device 30 (S406).
  • an I / O issue command is transmitted to the storage device 30. Also, information related to the I / O issue command is registered in the command management table 440.
  • FIG. 7 is a flowchart showing an example of the completion command process. This corresponds to the process of S114 of FIG.
  • the I / O completion command may include information related to the result of the storage apparatus 30 executing the I / O issue command.
  • the FW 24 acquires information (including the queue ID) related to the I / O issue command corresponding to the I / O completion command received in S420 from the command management table 440, and corresponds to the I / O completion command.
  • a queue ID is specified (S422).
  • the FW 24 enqueues the I / O completion command received in S420 into the I / O completion queue of the queue ID specified in S422 (S424).
  • the FW 24 refers to the queue ID management table 400 and identifies the interrupt factor number 402 corresponding to the queue ID 404 identified in S422 (S426).
  • the FW 24 changes the flag corresponding to the interrupt factor number 422 specified in S426 of the interrupt flag management table 420 to “1” (S428).
  • the FW 24 deletes the information related to the I / O issue command specified in S422 from the command management table 440 (S430). As a result, an empty space is generated in the command management table 440, so that a new I / O issue command can be accepted accordingly.
  • FIG. 8 is a flowchart showing an example of interrupt processing. This corresponds to the process of S120 in FIG.
  • FW24 starts the next process after the process of S430 or periodically.
  • the FW 24 determines whether an interrupt is occurring in the interrupt vector associated with the FW 24 (S440).
  • the FW 24 executes S440 again after a predetermined time. That is, the FW 24 waits until the interrupt of the interrupt vector is completed. If no interrupt has occurred in the interrupt vector (S440: NO), the FW 24 proceeds to the next S442.
  • the FW 24 selects one interrupt factor number 422 whose flag 424 is “1” from the interrupt flag management table 420 (S442).
  • the FW 24 may select the interrupt factor number 422 in which the flag 424 is changed to “1” in S428.
  • the FW 24 may select the interrupt factor number 422 according to the set interrupt method. For example, when the “round robin method” is set as the interrupt method, the FW 24 may sequentially select the interrupt factor numbers 422 in accordance with the round robin method. For example, when “priority method” is set as the interrupt method, the FW 24 may sequentially select the interrupt factor numbers 422 according to the priority method. Details of the round robin method and the priority method will be described later.
  • the FW 24 refers to the queue ID management table 400 and identifies the queue ID corresponding to the interrupt factor number selected in S442 (S444).
  • the FW 24 writes the queue ID specified in S444 to the queue ID register 220 (S446).
  • the FW 24 generates an interrupt for the interrupt vector assigned to the FW 24 (S448).
  • the FW 24 changes the flag 424 corresponding to the interrupt factor number 422 selected in S442 in the interrupt flag management table 420 to “0” (S450).
  • the queue ID 404 corresponding to the flag 424 “1” of the interrupt flag management table 420 is sequentially written to the queue ID register 220.
  • FIG. 9 is a sequence chart showing an example of an interrupt method setting process.
  • the setting management server 32 transmits an issuance command (referred to as “setting issuance command”) including interrupt method settings (for example, round robin or priority order) to the HBA driver 102 (S200).
  • setting issuance command an issuance command including interrupt method settings (for example, round robin or priority order)
  • the HBA driver 102 When the HBA driver 102 receives the setting issuance command in S200, the HBA driver 102 enqueues it in the admin issue queue (S202).
  • the HBA driver 102 transmits to the FW 24 an instruction to execute an admin issue queue setting issue command (S204).
  • the FW 24 executes an interrupt method setting process (S210). Although details of the interrupt method setting process will be described later (see FIG. 10), an interrupt method is set in the HBA 14 by this process. Then, a setting completion command is enqueued in the admin completion queue, and an interrupt notification is issued to the interrupt vector.
  • the setting completion command may include information related to the execution result of the setting issue command.
  • the HBA driver 102 that has detected the interrupt notification for the interrupt vector in S210 activates the interrupt handler 120 corresponding to the interrupt vector (S214).
  • the HBA driver 102 that has detected the interrupt notification in S210 dequeues the setting completion command from the admin completion queue (S216).
  • the HBA driver 102 transmits the setting completion command dequeued in S214 to the setting management server 32 (S218).
  • the user can change the interrupt method setting.
  • FIG. 10 is a flowchart showing an example of the interrupt method setting process. This corresponds to the process of S210 in FIG.
  • the FW 24 When the FW 24 receives an instruction to execute the setting issue command from the HBA driver 102, the FW 24 starts the next process (S500).
  • the FW 24 dequeues the setting issue command from the admin issue queue (S502).
  • the FW 24 determines which interrupt method is instructed in round robin or priority order in the setting issue command in S502 (S504).
  • the FW 24 When the priority order is instructed in S504 (S504: priority order), the FW 24 first acquires priority information from the HBA communication area 340 of the system memory space 106 (S520). This priority information may include the priority of each interrupt factor number. Then, the FW 24 rearranges the entries in the queue ID management table 400 (the set of the interrupt factor number 402 and the queue ID 404) in descending order of priority based on the priority information in S520 (S522). Then, the FW 24 sets the interrupt method to “priority order” (S524), and proceeds to S530.
  • priority information may include the priority of each interrupt factor number.
  • the FW 24 rearranges the entries in the queue ID management table 400 (the set of the interrupt factor number 402 and the queue ID 404) in descending order of priority based on the priority information in S520 (S522). Then, the FW 24 sets the interrupt method to “priority order” (S524), and proceeds to S530.
  • the FW 24 enqueues the setting completion command to the Admin completion queue (S530).
  • the FW 24 determines whether or not an interrupt is occurring in the interrupt vector associated with the FW 24 (S532).
  • the FW 24 executes S532 again after a predetermined time.
  • FIG. 11 shows an example of the round robin management table 450.
  • the round robin management table 450 may be used when determining the interrupt factor number to be selected in S442 of the interrupt process (FIG. 8) when round robin is set in the interrupt method.
  • the round robin management table 450 may have a previous interrupt factor number 452 and a maximum interrupt factor number 454.
  • the previous interrupt factor number 452 is the interrupt factor number selected in S442 of the previous interrupt process.
  • the maximum interrupt factor number 454 is the maximum interrupt factor number managed in the interrupt flag management table 420 and the queue ID management table 400.
  • FW 24 may select an interrupt factor number in which the flag 424 next to the previous interrupt factor number 452 is “1” in S442 of the current interrupt process. That is, an interrupt factor number with a flag 424 of “1” between the interrupt factor number “0” and the maximum interrupt factor number 454 may be selected in round robin.
  • Computer system 10 CPU 14: HBA (Host Bus Adapter) 24: FW (Firmware) 30: Storage device 120: HBA driver 400: Queue ID management table 420: Interrupt flag management table 440: Command management table

Landscapes

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

Abstract

計算機システムにおいて、メモリは、プロセッサからインタフェース装置への発行コマンドが格納される複数の発行キューと、インタフェース装置からプロセッサへの完了コマンドが格納される複数の完了キューとを有する。インタフェース装置は、発行キューから発行コマンドをデキューすると、その発行コマンドを外部装置へ送信し、その発行コマンドに係るコマンド情報を記憶領域に保持する。インタフェース装置は、外部装置から完了コマンドを受領すると、その受領した完了コマンドを或る完了キューにエンキューし、その完了キューのIDを保持し、その受領した完了コマンドに対応する発行コマンド係るコマンド情報を記憶領域から削除する。

Description

割込制御方法、及び、インタフェース装置
 本発明は、概して、計算機システムにおける割込制御に関する。
 計算機に装着されるHBA(Host Bus Adapter)において、制御LSIのマルチコア化による処理多重度向上および性能向上が行われている。また、計算機側においてもマルチCPU及びコア数の増大が著しい。
 HBAの制御において、HBAのコア数より多い数のI/Oキューを用いることによって多重処理による性能向上を目指すマルチキューという手法が知られている。
 特許文献1には、タイマ開始からタイムアウトまでの一定時間待機し、その間に発生した割込をマージして通知することにより、割込通知の発生回数を削減し、割込処理の負荷を軽減することが開示されている。当該文献では、I/O発行キュー及びI/O完了キューの数の分、並列にタイマを用意し、タイマによる割込みマージをキュー毎に実施している。
国際公開第2015/173853号
 しかしながら、特許文献1には、マルチキュー環境における割込通知方法については開示されていない。したがって、当該文献に開示されている技術では、各キューに対して関連する割込みを適切に通知することができず、I/O処理の完了通知を意図通りにアプリケーションに伝えることができない。
 そこで本発明の目的は、マルチキュー環境における割込を適切に制御する方法及びインタフェース装置を提供することにある。
 一実施例に係る、計算機システムにおける割込制御方法において、計算機システムは、プロセッサとメモリとインタフェース装置とを有する。メモリは、プロセッサからインタフェース装置へ発行される発行コマンドが格納される複数の発行キューと、インタフェース装置から前記プロセッサへ発行される完了コマンドが格納される複数の完了キューとを有する。インタフェース装置は、或る発行キューから発行コマンドをデキューすると、その発行コマンドをインタフェース装置に接続されている外部装置へ送信し、その発行コマンドに係るコマンド情報を記憶領域に保持する。インタフェース装置は、外部装置から発行コマンドに対する完了コマンドを受領すると、その受領した完了コマンドを或る完了キューにエンキューし、その完了キューのIDを保持し、その受領した完了コマンドに対応する発行コマンドに係るコマンド情報を記憶領域から削除する。
 本発明によれば、マルチキュー環境における割込を適切に制御することができる。
計算機システムのハードウェア構成の一例を示す。 計算機システムの機能構成の一例を示す。 割込フラグ管理テーブルの一例を示す。 キューID管理テーブルの一例を示す。 I/O処理の全体概要を示すシーケンスチャートである。 発行コマンド処理の一例を示すフローチャートである。 完了コマンド処理の一例を示すフローチャートである。 割込処理の一例を示すフローチャートである。 割込方式の設定処理の一例を示すシーケンスチャートである。 割込方式設定処理の一例を示すフローチャートである。 ラウンドロビン管理テーブルの一例を示す。
 以下、実施例を説明する。
 以下の説明では、「xxxテーブル」、「xxxキュー」又は「xxxリスト」の表現にて情報を説明することがあるが、情報は、どのようなデータ構造で表現されていてもよい。すなわち、情報がデータ構造に依存しないことを示すために、「xxxテーブル」、「xxxキュー」又は「xxxリスト」を「xxx情報」と呼ぶことができる。
 さらに、各情報の内容を説明する際に、「識別情報」、「識別子」、「名」、「名前」、「ID」という表現を用いるが、これらについてはお互いに置換が可能である。
 また、以下の説明では、「プログラム」を主語として処理を説明する場合があるが、プログラムは、プロセッサ(例えばCPU(Central Processing Unit))によって実行されることで、定められた処理を、適宜に記憶資源(例えばメモリ)及び通信インターフェイスデバイスのうちの少なくとも1つを用いながら行うため、処理の主語が、プロセッサ、そのプロセッサを有する装置とされてもよい。プロセッサが行う処理の一部又は全部が、ハードウェア回路で行われてもよい。コンピュータプログラムは、プログラムソースからインストールされてよい。プログラムソースは、プログラム配布サーバ又は記憶メディア(例えば可搬型の記憶メディア)であってもよい。
 図1は、計算機システム2のハードウェア構成の一例を示す。
 計算機システム2は、CPU10、メモリ12、HBA14、NIC(Network Interface Card)11、RC(Root Complex)13を有してよい。HBA14は、インタフェース装置の例である。
 CPU10、HBA14、NIC11は、PCIe(PCI-Express)バスを介してRC13に接続されてよい。すなわち、CPU10、HBA14、NIC11は、双方向通信可能に接続されてよい。
 メモリ12は、メモリバスを介してCPU10に接続されてよい。メモリ12には、様々なプログラム及びデータが格納されてよい。メモリ12の例は、DRAM(Dynamic Random Access Memory)、PRAM(Phase Change Random Access Memory)、FeRAM(Ferroelectric Random Access Memory)、MRAM(Magnetoresistive Random Access Memory)、フラッシュメモリなどである。
 CPU10は、メモリ12に格納されているプログラムを実行することにより、計算機システム2の有する様々な機能を実現してよい。
 NIC11は、通信ネットワーク34を介して送受信されるデータを制御してよい。通信ネットワーク34の例は、LAN(Local Area Network)、WAN(Wide Area Network)、VPN(Virtual Private Network)などである。
 通信ネットワーク34には、計算機システム2の設定を管理するための設定管理サーバ32が接続されてよい。すなわち、ユーザは、設定管理サーバ32を操作して、計算機システム2の設定を変更できてよい。
 HBA14には、外部バスを介して、外部装置の例であるストレージ装置30が接続されてよい。ストレージ装置30の例は、HDD(Hard Disk Drive)、SSD(Solid State Drive)、フラッシュメモリなどである。HBA14は、ストレージ装置30に対して送受信されるデータを制御してよい。HBA14は、PCIeに準拠するデバイスであり、PCIe Functionを有してよい。
 HBA14のLSIは、複数のコア20(マルチコア)を有してよい。各コア20は、データを記憶可能な記憶領域22と、プログラムを実行可能なFirmware(FW)24とを含んでよい。
 図2は、計算機システム2の機能構成の一例を示す。
 計算機システム2は、機能として、VM(Virtual Machine)100及びHBAドライバ102を有してよい。HBAドライバ102は、HBA14を制御するプログラムである。計算機システム2は、複数のVM100を有してよい。
 VM100は、CPU10で実行されるプログラムであってもよいし、ハイパーバイザ(不図示)上で実行されるプログラムであってもよい。HBAドライバ102は、複数のVM100によって共有されてよい。
 HBAドライバ102は、送信部122及び割込ハンドラ120を有してよい。
 送信部122は、VM100からI/O発行コマンドを受領すると、I/O発行キューにエンキューしてよい。
 割込ハンドラ120は、HBA14から割込通知を受けると、I/O完了キューからI/O完了コマンドをデキューし、VM100に送信してよい。
 メモリ12は、システムメモリ空間106と、PCIメモリ空間104とを有してよい。
 システムメモリ空間106には、HBA通信用領域340、I/O発行キュー群300、及びI/O完了キュー群320が配置されてよい。
 HBA通信用領域340は、HBAドライバ102と、HBA14のFW24との間の通信に使用される。
 I/O発行キュー群300は、複数のI/O発行キューを含んでよい。HBAドライバ102(送信部122)は、FW24へ送信するI/O発行コマンドを、I/O発行キュー群300のうちの1つのI/O発行キューにエンキューしてよい。FW24は、I/O発行キューから、I/O発行コマンドをデキューしてよい。
 I/O完了キュー群320は、複数のI/O完了キューを含んでよい。FW24は、HBAドライバ102へ送信するI/O完了コマンドを、I/O完了キュー群320のうちの1つのI/O完了キューにエンキューしてよい。HBAドライバ102(割込ハンドラ120)は、I/O完了キューから、I/O完了コマンドをデキューしてよい。
 PCIメモリ空間104には、割込ベクタテーブル200、及び、キューIDレジスタ220が配置されてよい。
 割込ベクタテーブル200は、複数の割込ベクタを含んでよい。1つの割込ベクタによって、1つの割込が管理されてよい。本実施例では、1つの割込ベクタに1つのFW24が対応付けられているとする。しかし、1つの割り込みベクタに複数のFW24が対応付けられてもよいし、1つのFW24に複数の割り込みベクタが対応付けられてもよい。
 キューIDレジスタ220には、I/O完了コマンドがエンキューされたI/O完了キューのIDが格納されてよい。本実施例では、1つの割込ベクタに1つのキューIDレジスタ220が対応付けられているとするが、それ以外の対応関係であってもよい。
 HBA14のコア20が有する記憶領域22には、キューID管理テーブル400、割込フラグ管理テーブル420、及び、コマンド管理テーブル440が配置されてよい。
 図3は、割込フラグ管理テーブル420の一例を示す。
 割込フラグ管理テーブル420は、割込要因番号のそれぞれについて割込が発生しているか否かを管理するためのテーブルである。例えば、割込フラグ管理テーブル420は、割込が発生している割込要因番号422のフラグ424を「1」、割込が発生していない割込要因番号422のフラグ424を「0」として管理してよい。割込フラグ管理テーブル420は、いわゆるビットマップとして構成されてもよい。
 図4は、キューID管理テーブル400の一例を示す。
 キューID管理テーブル400は、割込要因番号とキューIDとの対応関係を管理するためのテーブルである。図3の割込フラグ管理テーブル420において、割込要因番号422「0」及び「2」のフラグ424は「1」である。そして、図4のキューID管理テーブル400において、割込要因番号402「0」はキューID404「1」と、割込要因番号402「2」はキューID404「5」と対応付けられている。これは、その時点において、キューID404「1」及び「5」のI/O完了キューに、それぞれ、I/O完了コマンドがエンキューされていることを示す。なお、割込フラグ管理テーブル420とキューID管理テーブル400とをまとめて割込管理情報と呼んでもよい。
 図5は、I/O処理の全体概要を示すシーケンスチャートである。
 VM100は、HBAドライバ102に対してI/O発行コマンドを送信する(S100)。
 HBAドライバ102は、S100のI/O発行コマンドを受領すると、そのI/O発行コマンドが指定するキューIDのI/O発行キューに、I/O発行コマンドをエンキューする(S102)。VM100から受領するI/O発行コマンドと、I/O発行キューにエンキューされるI/O発行コマンドとは、同じであってもよいし、異なってもよい。
 そして、HBAドライバ102は、HBA14のFW24に対してI/O発行コマンドの実行指示を送信する(S104)。この実行指示には、S102でI/O発行コマンドがエンキューされたキューIDが含まれてよい。
 FW24は、S104のI/O発行コマンドの実行指示を受領すると、発行コマンド処理を実行する(S110)。この発行コマンド処理の詳細については後述するが(図6参照)、当該処理により、S102でエンキューされたI/O発行コマンドがストレージ装置30に送信される。
 また、FW24は、ストレージ装置30からI/O完了コマンドを受領すると、完了コマンド処理を実行する(S114)。この完了コマンド処理の詳細については後述するが(図7参照)、当該処理により、S114で受領したI/O完了コマンドがI/O完了キューにエンキューされる。
 また、FW24は、S114の処理後、又は、定期的に、割込処理を実行する(S120)。この割込処理の詳細については後述するが(図8参照)、当該処理により、I/O完了コマンドがエンキューされたI/O完了キューのキューIDが、割込キューIDレジスタ220に書き込まれ、割込ベクタテーブル200のFW24に対応する割込ベクタに対して割込通知が行われる。
 S120の割込ベクタに対する割込通知を検知したHBAドライバ102は、その割込ベクタに対応する割込ハンドラ120を起動する(S124)。
 割込ハンドラ120は、割込キューIDレジスタ220から、キューIDを読み出す(S130)。
 そして、割込ハンドラ120は、S130で読み出したキューIDに対応するI/O完了キューから、I/O完了コマンドをデキューする(S132)。
 そして、割込ハンドラ120は、S132でデキューしたI/O完了コマンドに基づき、VM100に対してI/O完了コマンドを送信する(S134)。
 以上の処理により、VM100から発行されたI/O発行コマンドがストレージ装置30に送信され、ストレージ装置30から発行されたI/O完了コマンドがVM100に送信される。
 なお、発行コマンド処理(S110)、完了コマンド処理(S114)、及び、割込処理(S120)は、それぞれ、独立したプロセスであってよい。
 図6は、発行コマンド処理の一例を示すフローチャートである。これは、図5のS110の処理に相当する。
 FW24は、HBAドライバ102からS104のI/O発行コマンドの実行指示を受領すると、次の処理を開始する(S400)。
 FW24は、その受領したI/O発行コマンドの実行指示が指定するキューIDに対応するI/O発行キューから、I/O発行コマンドをデキューする(S402)。
 そして、FW24は、S402のI/O発行コマンドに係る情報(キューIDを含む)を、コマンド管理テーブル440に登録する(S404)。
 そして、FW24は、S402のI/O発行コマンドを、ストレージ装置30へ送信する(S406)。
 以上の処理により、I/O発行コマンドがストレージ装置30へ送信される。また、I/O発行コマンドに係る情報が、コマンド管理テーブル440に登録される。
 図7は、完了コマンド処理の一例を示すフローチャートである。これは、図5のS114の処理に相当する。
 FW24は、ストレージ装置30からI/O完了コマンドを受領すると、次の処理を開始する(S420)。I/O完了コマンドは、ストレージ装置30がI/O発行コマンドを実行した結果に関する情報を含んでよい。
 そして、FW24は、コマンド管理テーブル440から、S420で受領したI/O完了コマンドに対応するI/O発行コマンドに係る情報(キューIDを含む)を取得し、そのI/O完了コマンドに対応するキューIDを特定する(S422)。
 そして、FW24は、S422で特定したキューIDのI/O完了キューに、S420で受領したI/O完了コマンドをエンキューする(S424)。
 そして、FW24は、キューID管理テーブル400を参照し、S422で特定したキューID404に対応する割込要因番号402を特定する(S426)。
 そして、FW24は、割込フラグ管理テーブル420の、S426で特定した割込要因番号422に対応するフラグを「1」に変更する(S428)。
 そして、FW24は、コマンド管理テーブル440から、S422で特定したI/O発行コマンドに係る情報を削除する(S430)。これにより、コマンド管理テーブル440に空きが発生するので、その分、新たなI/O発行コマンドを受け付けることができる。
 図8は、割込処理の一例を示すフローチャートである。これは、図5のS120の処理に相当する。
 FW24は、S430の処理後、又は、定期的に、次の処理を開始する。
 FW24は、当該FW24に対応付けられている割込ベクタで割り込みが発生中であるか否かを判定する(S440)。
 その割込ベクタで割り込みが発生中の場合(S440:YES)、FW24は、一定時間後、再度S440を実行する。すなわち、FW24は、その割込ベクタの割込が終了するまで待機する。その割込ベクタで割り込みが発生していない場合(S440:NO)、FW24は、次のS442へ進む。
 FW24は、割込フラグ管理テーブル420から、フラグ424が「1」の割込要因番号422を1つ選択する(S442)。当該割込処理がS430の直後の処理である場合、FW24は、S428でフラグ424を「1」に変更した割込要因番号422を選択してよい。当該割込処理が定期的に実行される処理である場合、FW24は、設定されている割込方式に従って割込要因番号422を選択してよい。例えば、割込方式に「ラウンドロビン方式」が設定されている場合、FW24は、ラウンドロビン方式に従って、順次、割込要因番号422を選択してよい。例えば、割込方式に「優先度方式」が設定されている場合、FW24は、優先度方式に従って、順次、割込要因番号422を選択してよい。ラウンドロビン方式、及び、優先度方式の詳細については後述する。
 そして、FW24は、キューID管理テーブル400を参照し、S442で選択した割込要因番号に対応するキューIDを特定する(S444)。
 そして、FW24は、S444で特定したキューIDを、キューIDレジスタ220に書き込む(S446)。
 そして、FW24は、当該FW24に割り当てられている割込ベクタに割り込みを発生させる(S448)。
 そして、FW24は、割込フラグ管理テーブル420の、S442で選択した割込要因番号422に対応するフラグ424を「0」に変更する(S450)。
 以上の処理により、割込フラグ管理テーブル420のフラグ424「1」に対応するキューID404が、順次、キューIDレジスタ220に書き込まれる。
 図9は、割込方式の設定処理の一例を示すシーケンスチャートである。
 設定管理サーバ32は、HBAドライバ102に対して、割込方式の設定(例えば、ラウンドロビン又は優先度順)を含む発行コマンド(「設定発行コマンド」という)を送信する(S200)。
 HBAドライバ102は、S200の設定発行コマンドを受領すると、admin発行キューにエンキューする(S202)。
 そして、HBAドライバ102は、FW24に対して、admin発行キューの設定発行コマンドの実行指示を送信する(S204)。
 FW24は、S204の実行指示を受領すると、割込方式設定処理を実行する(S210)。割込方式設定処理の詳細については後述するが(図10参照)、この処理により、HBA14に割込方式が設定される。そして、admin完了キューに設定完了コマンドがエンキューされ、割込ベクタに対して割込通知が発行される。設定完了コマンドは、設定発行コマンドの実行結果に関する情報を含んでよい。
 S210の割込ベクタに対する割込通知を検知したHBAドライバ102は、その割込ベクタに対応する割込ハンドラ120を起動する(S214)。S210の割込通知を検知したHBAドライバ102は、admin完了キューから、設定完了コマンドをデキューする(S216)。
 そして、HBAドライバ102は、S214でデキューした設定完了コマンドを、設定管理サーバ32へ送信する(S218)。
 以上の処理により、ユーザは、割込方式の設定を変更することができる。
 図10は、割込方式設定処理の一例を示すフローチャートである。これは、図9のS210の処理に相当する。
 FW24は、HBAドライバ102から、設定発行コマンドの実行指示を受領すると、次の処理を開始する(S500)。
 FW24は、admin発行キューから、設定発行コマンドをデキューする(S502)。
 FW24は、S502の設定発行コマンドに、ラウンドロビン又は優先度順の何れの割込方式が指示されているかを判定する(S504)。
 S504においてラウンドロビンが指示されている場合(S504:ラウンドロビン)、FW24は、割込方式を「ラウンドロビン」に設定し(S510)、S530へ進む。
 S504において優先度順が指示されている場合(S504:優先度順)、FW24は、まず、システムメモリ空間106のHBA通信用領域340から優先度情報を取得する(S520)。この優先度情報には、各割込要因番号の優先度が含まれてよい。そして、FW24は、S520の優先度情報に基づき、キューID管理テーブル400のエントリ(割込要因番号402及びキューID404のセット)を、優先度の高い順に並び替える(S522)。そして、FW24は、割込方式を「優先度順」に設定し(S524)、S530へ進む。
 FW24は、設定完了コマンドを、Admin完了キューにエンキューする(S530)。
 そして、FW24は、当該FW24に対応付けられている割込ベクタにおいて、割り込みが発生中であるか否かを判定する(S532)。
 その割込ベクタで割り込みが発生中である場合(S532:YES)、FW24は、一定時間後、再度S532を実行する。
 その割込ベクタで割り込みが発生していない場合(S532:NO)、FW24は、その割込ベクタに割り込みを発生させる(S534)。
 図11は、ラウンドロビン管理テーブル450の一例を示す。
 ラウンドロビン管理テーブル450は、割込方式においてラウンドロビンが設定されている場合において、割込処理(図8)のS442で選択する割込要因番号を決定する際に利用されてよい。
 ラウンドロビン管理テーブル450は、前回の割込要因番号452と、最大の割込要因番号454とを有してよい。
 前回の割込要因番号452は、前回の割込処理のS442で選択された割込要因番号である。
 最大の割込要因番号454は、割込フラグ管理テーブル420及びキューID管理テーブル400で管理されている最大の割込要因番号である。
 FW24は、今回の割込処理のS442では、前回の割込要因番号452の次のフラグ424が「1」である割込要因番号を選択してよい。すなわち、割込要因番号「0」から最大の割込要因番号454の間で、フラグ424が「1」の割込要因番号をラウンドロビンで選択してよい。
 上述した実施例は、本発明の説明のための例示であり、本発明の範囲を実施例にのみ限定する趣旨ではない。当業者は、本発明の要旨を逸脱することなしに、他の様々な態様で本発明を実施することができる。
 2:計算機システム 10:CPU 14:HBA(Host Bus Adapter) 24:FW(Firmware) 30:ストレージ装置 120:HBAドライバ 400:キューID管理テーブル 420:割込フラグ管理テーブル 440:コマンド管理テーブル

Claims (10)

  1.  計算機システムにおける割込制御方法であって、前記計算機システムは、プロセッサとメモリとインタフェース装置とを有し、
     前記メモリは、
      前記プロセッサから前記インタフェース装置へ発行される発行コマンドが格納される複数の発行キューと、
      前記インタフェース装置から前記プロセッサへ発行される完了コマンドが格納される複数の完了キューと、を有し、
     前記インタフェース装置は、
      或る発行キューから発行コマンドをデキューすると、
      その発行コマンドを前記インタフェース装置に接続されている外部装置へ送信し、
      その発行コマンドに係るコマンド情報を記憶領域に保持し、
     前記インタフェース装置は、
      前記外部装置から前記発行コマンドに対する完了コマンドを受領すると、
      その受領した完了コマンドを或る完了キューにエンキューし、
      その完了キューのIDを保持し、
      その受領した完了コマンドに対応する発行コマンドに係るコマンド情報を、前記記憶領域から削除する
    割込制御方法。
  2.  前記メモリは、前記完了キューのIDが格納されるキューIDレジスタをさらに有し、
     前記インタフェース装置は、複数のコアを有し、
     前記複数のコアが、それぞれ、完了キューのIDを管理し、
     各コアは、所定の割込ベクタに割り込みが発生していない場合に、自分が管理する完了キューのIDを前記キューIDレジスタに書き込み、前記割込ベクタに割り込みを発生させる
    請求項1に記載の割込制御方法。
  3.  前記メモリは、前記インタフェース装置に係るドライバをさらに有し、
     前記プロセッサで実行される前記ドライバは、前記割込ベクタに割り込みが発生すると、
      前記割込ベクタに関連付けられているキューIDレジスタから完了キューのIDを読み出し、
      その読み出した完了キューのIDが対応付けられている完了キューから完了コマンドをデキューし、
      そのデキューした完了コマンドを、前記割込ベクタに対応付けられている仮想マシンに通知する
    請求項2に記載の割込制御方法。
  4.  前記ドライバは、複数の完了キューのIDの中から前記キューIDレジスタに書き込むものを選択する方式を設定するための割込方式設定コマンドを、前記インタフェース装置に対して発行する
    請求項3に記載の割込制御方法。
  5.  前記割込方式設定コマンドには、ラウンドロビンによって選択する方式と、優先度の高さに基づいて選択する方式と、の何れかが設定されている
    請求項4に記載の割込制御方法。
  6.  前記インタフェース装置のコアは、
      優先度の高さに基づいて完了キューのIDを選択する方式が設定されている場合、
      複数の完了キューのIDの中から最も優先度の高い完了キューのIDを、前記キューIDレジスタに書き込む
    請求項5に記載の割込制御方法。
  7.  複数のコアを有し、
     各コアは、
      ファームウェアと、
      或る発行キューからデキューされた発行コマンドに係るコマンド情報が登録され、その発行コマンドに対する完了コマンドが複数の完了キューのうちの1つにエンキューされると、その完了コマンドに対応する発行コマンドに係るコマンド情報が削除される、コマンド管理情報と、
      前記完了コマンドがエンキューされた完了キューのIDを管理する割込管理情報と、を有する
    インタフェース装置。
  8.  前記ファームウェアは、所定の割込ベクタに割り込みが発生していない場合に、前記割込管理情報に含まれる完了キューのIDの1つを、所定のメモリ上のキューIDレジスタに書き込み、当該割込ベクタに係る割り込みを発生させる
    請求項7に記載のインタフェース装置。
  9.  前記ファームウェアは、前記割込管理情報に含まれる複数の完了キューのIDの中から前記キューIDレジスタに書き込むものを選択する方式を設定するための割込方式設定コマンドを受け付ける
    請求項8に記載のインタフェース装置。
  10.  前記割込方式設定コマンドには、ラウンドロビンによって選択する方式と、優先度の高さに基づいて選択する方式と、の何れかが設定されている
    請求項9に記載のインタフェース装置。
PCT/JP2016/069983 2016-07-06 2016-07-06 割込制御方法、及び、インタフェース装置 WO2018008103A1 (ja)

Priority Applications (1)

Application Number Priority Date Filing Date Title
PCT/JP2016/069983 WO2018008103A1 (ja) 2016-07-06 2016-07-06 割込制御方法、及び、インタフェース装置

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/JP2016/069983 WO2018008103A1 (ja) 2016-07-06 2016-07-06 割込制御方法、及び、インタフェース装置

Publications (1)

Publication Number Publication Date
WO2018008103A1 true WO2018008103A1 (ja) 2018-01-11

Family

ID=60901593

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/JP2016/069983 WO2018008103A1 (ja) 2016-07-06 2016-07-06 割込制御方法、及び、インタフェース装置

Country Status (1)

Country Link
WO (1) WO2018008103A1 (ja)

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2016056140A1 (ja) * 2014-10-10 2016-04-14 株式会社日立製作所 インターフェースデバイス、及びインターフェースデバイスを含む計算機システム
WO2016059692A1 (ja) * 2014-10-16 2016-04-21 株式会社日立製作所 計算機及びi/o処理の制御方法

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2016056140A1 (ja) * 2014-10-10 2016-04-14 株式会社日立製作所 インターフェースデバイス、及びインターフェースデバイスを含む計算機システム
WO2016059692A1 (ja) * 2014-10-16 2016-04-21 株式会社日立製作所 計算機及びi/o処理の制御方法

Similar Documents

Publication Publication Date Title
EP1163595B1 (en) A host adapter for combining i/o completion reports and method of using the same
JP6186787B2 (ja) データ転送装置、データ転送システム、データ転送方法及びプログラム
EP3089033B1 (en) Realtime hypervisor with priority interrupt support
US8635387B2 (en) Enhanced I/O performance in a multi-processor system via interrupt affinity schemes
US10459773B2 (en) PLD management method and PLD management system
US9697029B2 (en) Guest idle based VM request completion processing
US9354952B2 (en) Application-driven shared device queue polling
US10795608B2 (en) Computer, communication driver, and communication control method
JP2008015888A (ja) 負荷分散制御システム及び負荷分散制御方法
WO2012135234A2 (en) Facilitating, at least in part, by circuitry, accessing of at least one controller command interface
US20200073707A1 (en) System and method for managing tasks and task workload items between address spaces and logical partitions
US11074101B2 (en) Automated switching between interrupt context I/O processing and thread context I/O processing
WO2014118969A1 (ja) 仮想計算機システムおよび仮想計算機システムのデータ転送制御方法
WO2016056060A1 (ja) 計算機及びベクタの設定方法
US20160098289A1 (en) System and method for handling an interrupt
US10877790B2 (en) Information processing apparatus, control method and storage medium
US20190243673A1 (en) System and method for timing out guest operating system requests from hypervisor level
JP2011165105A (ja) 入出力制御装置、入出力制御方法
WO2016059692A1 (ja) 計算機及びi/o処理の制御方法
WO2018008103A1 (ja) 割込制御方法、及び、インタフェース装置
JP2008186211A (ja) 計算機システム
KR20160061726A (ko) 인터럽트 핸들링 방법
US20120167119A1 (en) Low-latency communications
US10635157B2 (en) Information processing apparatus, method and non-transitory computer-readable storage medium
JP5819085B2 (ja) 入出力制御装置

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: 16908147

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: 16908147

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: JP