1. Technical Field
The present invention is related generally to Input/Output (I/O) interfaces between computers and peripheral devices. In particular, the present invention provides an improved method and apparatus for mitigating and recovering from the inefficient behavior of one or more peripheral devices attached to an I/O bus that supports the SCSI protocol.
2. Description of Related Art
The Small Computer System Interface (SCSI) standard is used for Personal Computers (PCs), Linux systems, AIX/UNIX systems, and Storage Subsystems to attach peripheral devices to the systems involved. Numerous peripheral devices (e.g., hard disk drives, tape drives, CD-ROM drives, storage subsystems, etc.) can be attached to a single SCSI initiator.
The SCSI protocol can be used on either serial or parallel physical connections such as SAS (Serial Attached SCSI), FC (Fiber Channel), or parallel SCSI. These physical interfaces can be used to connect a wide variety of peripheral devices to PCs and other computer systems. However, due to SCSI protocol issues, SCSI devices can interfere with each others' operation. For example, in accordance with the SCSI protocol, numerous peripheral devices (e.g., disk drives, tape drives, CD-ROM drives, etc.) can be attached to the same parallel SCSI I/O bus. However, each such peripheral device can have a different service time requirement. In other words, a typical service requirement for hard disk drive media access operations on a shared I/O bus, such as hard disk read or write operations, is that the I/O operations be completed within 30 seconds or less. In any event, typical disk drive read/write operations on shared I/O buses can be completed in less than a second. In contrast, tape drive media access (read/write) operations on a shared I/O bus can take more than 30 minutes to complete. Consequently, this disparity between service time requirements for different types of peripheral devices serves to tie up the I/O bus and, therefore, significantly degrades the overall performance of the host system involved.
In most circumstances, a tape drive will disconnect from a shared I/O bus (e.g., when the tape drive has no data in its cache or needs no data from the host). Nevertheless, there are numerous circumstances when a tape drive should not be disconnected from a bus. For example, some tape drives are configured so they cannot disconnect from a bus. Also, tape drives performing internal error recovery procedures sometimes do not disconnect even when they should because of bugs in the product design.
If a peripheral device (e.g., tape drive) is connected to a shared I/O bus for an extended period of time, the Adapter Device Driver (ADD) associated with that device can reset the bus. The SCSI Bus Reset should cause the bus to go Bus Free and allow other peripheral devices (e.g., hard disk drives, CD-ROM drives) to complete their I/O operations.
However, a significant problem with such reset processes is that if a host operating system's root volume group or boot drive is operating on a hung-up I/O bus, the system pauses noticeably until the bus is reset. Depending on the operating system involved, an entry in the system error log can result in an inappropriate service action that recommends the replacement of the hard drive, because the hard drive is likely the device that the error condition (e.g., command time-out) is logged against.
The SCSI protocol defines a methodology that can be used to distribute the SCSI I/O bus bandwidth fairly based on the address assigned to the SCSI device (known as SCSI Arbitration Fairness). Also, the SCSI protocol attempts to manage I/O bus bandwidth utilization with Mode Page 2 Disconnect/Reconnect parameters in conjunction with the Disconnect/Reconnect Permission Bit located in the Identify Message. However, the SCSI protocol does not provide such a methodology for any peripheral device that fails to support or implement these disconnect/reconnect parameters correctly, and therefore, fails to use the SCSI bandwidth efficiently during the SCSI Bus data transfer bus phase. Thus, there is a need for a method and apparatus for mitigating and recovering from the inefficient behavior of one or more peripheral devices attached to a shared I/O bus.
The present invention provides a method, system and computer instructions for mitigating and recovering from the inefficient behavior of one or more peripheral devices attached to a shared I/O bus. In a preferred embodiment, a Host Bus Adapter (HBA) for a drive monitors the time duration that a shared bus is busy, and can cause an interruption of the operation of that drive if a predetermined time threshold is exceeded. The HBA for a drive can cause the bus to be reset and causes the target device utilizing the bus to be disconnected so that other target devices can access the bus. Alternatively, the HBA for a drive can note that the bus is busy and restart any timers needed if relatively lengthy bus operations occur. In accordance with a preferred embodiment of the present invention, an HBA for a disk drive provides a bus utilization timer function. An Adapter Device Driver (ADD) is used to read and write timer information from and to the timer. The HBA returns an interrupt to the ADD if the HBA determines that the bus has been busy for longer than the threshold value set in the timer. In response, the ADD initiates an appropriate error recovery operation that includes resetting the bus, if necessary. The HBA timer value can be based on the maximum time interval that any particular device is allowed to remain operating on the bus.
The novel features believed characteristic of the invention are set forth in the appended claims. The invention itself, however, as well as a preferred mode of use, further objectives and advantages thereof, will best be understood by reference to the following detailed description of an illustrative embodiment when read in conjunction with the accompanying drawings, wherein:
With reference now to the figures and in particular with reference to
With reference now to
Processor 202 and main memory 204 are connected to PCI local bus 206 through PCI bridge 208. PCI bridge 208 also may include an integrated memory controller and cache memory for processor 202. Additional connections to PCI local bus 206 may be made through direct component interconnection or through add-in connectors. In the depicted example, Local Area Network (LAN) adapter 210, SCSI HBA 212, and expansion bus interface 214 are connected to PCI local bus 206 by direct component connection. In contrast, audio adapter 216, graphics adapter 218, and audio/video adapter 219 are connected to PCI local bus 206 by add-in boards inserted into expansion slots. Expansion bus interface 214 provides a connection for keyboard and mouse adapter 220, modem 222, and additional memory 224. SCSI HBA 212 provides a connection for hard disk drive 226, tape drive 228, and CD-ROM drive 230. Typical PCI local bus implementations can support three or four PCI expansion slots or add-in connectors.
An Operating System (OS) runs on processor 202 and is used to coordinate and provide control of various components within data processing system 200 in
Those of ordinary skill in the art will appreciate that the hardware in
Data processing system 200 may include some type of network communication interface, such as LAN adapter 210, modem 222, or the like. As another example, data processing system 200 may be a stand-alone system configured to be bootable without relying on some type of network communication interface, whether or not data processing system 200 is composed of some type of network communication interface. As a further example, data processing system 200 may be a Personal Digital Assistant (PDA), which can be configured with ROM and/or flash ROM to provide nonvolatile memory for storing operating system files and/or user-generated data.
The depicted example in
With reference now to
With reference now to
Next, typically as dictated by user/performance requirements, the ADD (not shown) sends suitable I/O commands to the I/O adapter (e.g., SCSI/SAS adapter 304) involved (step 404). Responsive to receiving a suitable I/O command, the I/O adapter (e.g., SCSI/SAS adapter 304) starts the operation of timer 306 if an I/O bus selection or reselection operation has begun (step 406). While timer 306 is timing down (or timing up, as the case may be), the I/O adapter (e.g., SCSI/SAS adapter 304) associated with that peripheral device (e.g., tape drive or I/O device 312) monitors the I/O operation (e.g., media access or read/write operation) associated with the I/O command involved (step 408). If (at step 408) the I/O operation has not been completed, the I/O adapter (e.g., SCSI/SAS adapter 304) involved determines whether or not the time-out threshold value (e.g., for timer 306) has been reached or exceeded (step 410). If not, then the flow proceeds back to step 408. If (at step 408) the I/O operation has been completed, then the flow proceeds back to step 404.
Returning to step 410, if the I/O operation has not been completed, and the timer (306) has timed out (or otherwise exceeded the loaded timer threshold value), then the I/O adapter (e.g., SCSI/SAS adapter 304) involved sends a suitable timer (e.g., time-out) notification message to the ADD (step 412). Responsive to receipt of the timer notification message, the ADD can reset the I/O adapter (e.g., SCSI/SAS 304) involved (step 414), which causes the current device to disconnect (e.g., I/O device 312) and thus allows another device (e.g., I/O device 310) to be connected to the shared bus (e.g., PCI bus 302).
Thus, in accordance with a preferred embodiment, an HBA for a peripheral drive monitors the time duration that a shared I/O bus is busy, and interrupts the operation of that drive if a predetermined time threshold is exceeded. The HBA can cause the bus to be reset, if necessary, and thus cause the device utilizing the bus to be disconnected so that another devices can access the bus. Also, the present invention provides a method for identifying a peripheral device that is inefficiently tying up a shared I/O bus, so that an appropriate procedure can be initiated to recover from that device's inefficient behavior. As such, the present invention also applies to all shared bus topologies including parallel and serial buses. For example, the present invention can also mitigate the inefficient behavior of a peripheral device on a Serial Attached SCSI (SAS) bus where a single SAS Initiator (HBA) is connected to multiple SAS devices through an Edge Expander. Thus, the present invention provides a method for substantially improving the performance of a parallel or serial I/O bus and also the host system involved.
It is important to note that while the present invention has been described in the context of a fully functioning data processing system, those of ordinary skill in the art will appreciate that the processes of the present invention are capable of being distributed in the form of a computer readable medium of instructions and a variety of forms and that the present invention applies equally regardless of the particular type of signal bearing media actually used to carry out the distribution. Examples of computer readable media include recordable-type media, such as a floppy disk, a hard disk drive, a RAM, CD-ROMs, DVD-ROMs, and transmission-type media, such as digital and analog communications links, wired or wireless communications links using transmission forms, such as, for example, radio frequency and light wave transmissions. The computer readable media may take the form of coded formats that are decoded for actual use in a particular data processing system.
The description of the present invention has been presented for purposes of illustration and description, and is not intended to be exhaustive or limited to the invention in the form disclosed. Many modifications and variations will be apparent to those of ordinary skill in the art. The embodiment was chosen and described in order to best explain the principles of the invention, the practical application, and to enable others of ordinary skill in the art to understand the invention for various embodiments with various modifications as are suited to the particular use contemplated.