Section 2.6. Storport Driver

   

2.6 Storport Driver

Chapter 1 described the Windows NT storage I/O stack. In particular, one important component of the storage I/O stack is the SCSIPort driver (written by Microsoft), which works in close cooperation with a vendor-written miniport driver that is specific to the storage device. Prior to Windows Server 2003, storage devices of various types ”such as older SCSI devices, newer SCSI-3 devices, and Fibre Channel devices ”all had a device-specific miniport driver that was linked with the SCSIPort driver. This scenario has several shortcomings:

  • The model assumes that Fibre Channel devices have capabilities similar to those of SCSI devices ”an assumption that is just not true!

  • The SCSIPort driver follows a single threading model without any support for full duplex communication. This means that requests cannot be completed while a request is being queued and vice versa. When the miniport was servicing an interrupt, it could neither accept a new request nor indicate completion of a request that had already been satisfied. Having a multi-CPU Windows machine made the problem worse , not better!

  • The port driver has some information that it does not pass to the miniport, but instead requires the miniport to collect laboriously via multiple calls. In particular, this is true for scatter/gather lists. [1]

    [1] Scatter/gather list is a generic term applied to the situation in which I/O is initiated into multiple buffers simultaneously .

  • Out of sheer frustration, Fibre Channel device vendors resorted to ignoring the SCSIPort driver (written by Microsoft) and writing either a monolithic driver (encompassing the functionality of both the port and the miniport drivers) or their own miniport as well as port driver. Because this process involved reverse-engineering the functionality of the port driver, the attempts, at best, have worked with some degree of problems. At the very least, situations in which two devices from two different vendors can no longer coexist on the same Windows NT server are likely to arise.

With Windows Server 2003, Microsoft has introduced a new driver model with a Storport port driver (Figure 2.3). The Storport driver is meant to be used by vendors of newer and higher-performance devices, such as SCSI-3 and Fibre Channel devices. It is meant to supplant the older SCSIPort driver. Although the SCSIPort driver was not totally removed, it is meant to be used only for older, less capable storage devices.

Figure 2.3. Storport Driver in the Windows Server 2003 Driver Hierarchy

graphics/02fig03.gif

HBA vendors are now expected to write miniport drivers that link with the Storport driver rather than the SCSIPort driver. To keep this effort to a minimum, Microsoft has kept the Storport model backward compatible with the SCSIPort model. So vendors who want to put in minimal work may easily reap some (but not all) of the advantages of the new model. To take complete advantage of the new model, these vendors will have to do some more work beyond a simple recompile and relink.

The new architecture provides for a remarkable improvement in performance, which is accomplished in several different ways:

  • The new driver model allows for a full duplex model in which new requests can be queued to the driver at the same time that outstanding I/O requests are being completed. The new model allows for more work to be accomplished in the vendor-written miniport driver with interrupts enabled. Note that this efficiency is gained at the cost of making the miniport driver a little more complex because the miniport now has to deal with synchronization issues. SCSIPort miniports, though they were half duplex and not as efficient, did not have to worry about synchronization issues because all synchronization was handled by the port driver.

  • The new model minimizes the calls from the miniport to the port driver. For example, in the old model, the miniport driver made multiple calls (to the SCSIPort driver) to collect the scatter/gather lists.

In addition to the improvement in performance, the Storport model offers some other advantages ”for example:

  • The Storport model allows for better communication between the port and miniport drivers. SCSIPort never explicitly allowed the port driver to signal busy conditions. The Storport model allows the miniport to signal the Storport driver to pause, resume, or signal an adapter as being busy.

  • The new architecture provides for sophisticated error management. SCSIPort simply attempted to reset the bus, which is very costly and disruptive. With the appropriate support from the independent hardware vendor in the miniport driver code, the Storport model allows for resetting the logical unit, followed by resetting the device and, only as a last resort, resetting the bus. Another improvement in error handling is that the new Storport model allows for a wider range of errors to be reported as compared to SCSIPort. The advantage is that the new errors reported by newer SCSI-3 devices can be handled in a better manner with Storport, whereas SCSIPort would mask those errors to the older range of errors it understood .

  • All of the new features are provided in as minimally disruptive a fashion as possible because Storport is literally backward compatible with SCSIPort. Vendors can choose to recompile and relink their existing code to work with Storport (instead of SCSIPort) with very little effort. They will benefit from the new model but will not reap all the advantages if they adopt this minimal-effort path .

  • The new architecture provides an interface that removes the requirement to create a "ghost device." The SCSI model does not allow an application to query capabilities if no unit is mounted. The Storport model removes the requirement to create a ghost device by supporting query capabilities even when no miniport unit has yet been mounted.

  • The new architecture also improves the interface to meet requirements of high-end storage vendors, particularly Fibre Channel and RAID vendors. For example, the old SCSIPort model allowed for very little in terms of queue management. Newer devices need sophisticated management. The Storport model allows for 254 outstanding requests per logical unit per adapter. The maximum number of outstanding queues per adapter is limited simply by the number of logical units per adapter, as depicted in Figure 2.4.

    Figure 2.4. Storport Queuing Model

    graphics/02fig04.gif

Another advantage of the hierarchy with the Storport driver is that it adds a manageability interface for configuration and management of high-end storage devices. This interface is WMI (Windows Management Instrumentation) based and is used by other Windows components , such as the management command-line interface. WMI is described in Chapter 7. The WMI management interface defines four different WMI classes:

  1. An adapter/HBA class . A host system may have multiple such adapters installed, and an instance of this class would be created for each adapter.

  2. A channel class . Each adapter may have one or more channels that connect the adapter to the physical disks it owns.

  3. A disk array class . Each channel may have zero or more disk arrays.

  4. A physical disk class . Each adapter may have zero or more physical disks attached.


   
Top


Inside Windows Storage
Inside Windows Storage: Server Storage Technologies for Windows 2000, Windows Server 2003 and Beyond
ISBN: 032112698X
EAN: 2147483647
Year: 2003
Pages: 111
Authors: Dilip C. Naik

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net