1 / 36

The Windows Storage Driver Stack In Depth Storport And The Future Of Windows Storage

The Windows Storage Driver Stack In Depth Storport And The Future Of Windows Storage. Bob Griswold Program Manager WDEG Storage Microsoft Corporation. Storage Fabrics Server/Enterprise. Personal Storage Client/Consumer. Optical Platform Client/Consumer. Preferred Storage Platform

piper
Télécharger la présentation

The Windows Storage Driver Stack In Depth Storport And The Future Of Windows Storage

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. The Windows Storage Driver Stack In DepthStorport And The Future Of Windows Storage Bob Griswold Program Manager WDEG Storage Microsoft Corporation

  2. Storage Fabrics Server/Enterprise Personal Storage Client/Consumer Optical Platform Client/Consumer Preferred Storage Platform Partner/Customer Windows Storage DevicesStrategic Pillars Leading platform enabling storage fabric adoption Optimized platform features enabling your Windows experience, here and now Timely, comprehensive, quality platform support for optical devices Preferred platform for developing, deploying, and using storage devices

  3. Agenda • Windows Storage Port Driver History • Where Storport comes from and why • Storport – the Here and Now • How Storport serves the current customer • Recent Storport changes – investments in the platform • The future of Storport – near and Far • Windows Vista and Windows Server codenamed “Longhorn”

  4. Windows Storage Port Driver HistoryThe birth of a driver

  5. Windows Storage Driver History Windows NT and SCSIport, c. 1994 Created a HW-independent SCSI interface Built for extensibility, features and API Laid groundwork for future storage ports Released with Windows NT 3.X Adaptec, others instrumental in design SCSIport established baseline for Storport, USBstor, and ATAport

  6. SCSIportOld Man SCSI Extensive customer issue resolution Security servicing to be continued Most mature Microsoft storage driver No Fast Resume support Queue and reset limitations will not be considered No back-porting of Storport features planned SCSIport EOL planning not started, but… Prepare for this event – move to Storport sooner rather than later

  7. SCSIport Minutiae SCSIport remained *only* solution for years Only SPB2Port (IEEE-1394) evolved All ATA drivers remained “non-extensible” SCSIport “Chock-full-o-Fixes” Many specific to particular devices Original SCSIport was 47 KB Current SCSIport is 104 KB

  8. Storport – The Here and NowWindows Server 2003

  9. Original Storport Requirements API, IOCTL, SRB handling and other “miniport” methods compatible with SCSIport Improve on SCSIport with Better sequential I/O handling Per Adapter and Per LUN Expanded queue depth and alignment Increased outstanding I/O limits Spin Lock not required between start and completion Added BuildIo at passive level Hierarchical Resets and Registry Access Better miniport integration with IRQ level handing and queue control (Adapter and LUNs) Scatter Gather List (SGL) methods

  10. Storport: Right For The Future The Storport driver model was built on new code – not from the existing SCSIport Eliminated forced workarounds and patches Focus on RAID and I/O Performance New features and extensions will not be ported or back-ported into SCSIport Built with focus on serial storage Duplex I/O handling, IRQL methods Built to industry storage specifications Error handling and hierarchical resets

  11. Equates To Stable Architecture Better Error Handling Device Class Driver Device Class Driver Filter Drivers IOCTLs Storport Pass-through Microsoft’s iSCSI Miniport Driver SATA RAID Storport Miniport Fibre Channel Storport Miniport TDI/WSK Virtual Miniport Support Coming Built for Serial Storage

  12. Recent Storport Investments Advancing SATA RAID implementations All new Storport Extensions called through STORPORT_EXTENDED_FUNCTIONS, as a Table Referenced Call Extended memory pool methods Scratch space for RAID Functions SGL Extensions Implementation of PCI MSI functions Enhancements in Power Management Implements “Fast Resume”; miniports must process SRB_FUNCTION_POWER in a timely manner

  13. Memory Pool Extensions StorPortAllocatePool For allocating blocks of memory from the non-paged pool Memory allocation up to system limitation Well-suited for RAID calculations StorPortFreePool Frees memory that was previously allocated by StorPortAllocatePool

  14. Memory Allocation Example PSTORPORT_EXTENDED_FUNCTIONS ExtendedFunctions; #define MEMORY_BLOCK_POOL_TAG 'tpbm' PVOID PMemoryBlock; PVOID PMdl; PMemoryBlock = ExtendedFunctions->AllocatePool( 4096, MEMORY_BLOCK_POOL_TAG, HwDeviceExtension, &PMdl ); if (PMemoryBlock == NULL) { // Failed to allocate the memory block ... }

  15. Scatter/Gather List Extensions StorPortBuildScatterGatherList A miniport driver calls StorPortBuildScatterGatherList to create an SGL for a specified data buffer using a miniport driver-provided memory buffer [ Use Pool Extensions ] to contain the SGL StorPortPutScatterGatherList StorPortPutScatterGatherList function releases any resources associated with an SGL that was previously created by a call to the StorPortBuildScatterGatherList function

  16. SGL Allocation Example PSTORPORT_EXTENDED_FUNCTIONS ExtendedFunctions; VOID ExecutionRoutine( IN PVOID *DeviceObject, IN PVOID *Irp, IN PSTOR_SCATTER_GATHER_LIST ScatterGather, IN PVOID Context ); BUILDSGSTATUS Status; Status = ExtendedFunctions->BuildScatterGatherList( HwDeviceExtension, DataBufferMdl, DataBuffer, DataBufferLength, ExecutionRoutine, Context, TRUE, ScatterGatherListBuffer, ScatterGatherListBufferLength );

  17. Storport SGL Flow Example • Flow in memory allocation, SGL Build, SGL teardown, memory teardown • Call StorPortAllocatePool -> • Call StorPortBuildScatterGatherList -> • Call StorPortPutScatterGatherList -> • Call StorPortFreePool (See Below) PSTORPORT_EXTENDED_FUNCTIONS ExtendedFunctions; ExtendedFunctions->PutScatterGatherList( HwDeviceExtension, ScatterGatherListBuffer, TRUE );

  18. Message Signaled Interrupts Defined by the PCI-SIG Not “Brand-New”, defined in PCI 2.2 Extended to MCI-X in PCI 3.0 Extends configuration space Identifies which type of MSI is used Bandwidth management Allows faster full-duplex transfers Transaction management Splits interrupts across tasks

  19. Storport MSI Example Required: Hardware and OS support MSI discovery and compatibility A system board that is MSI capable (i.e. chipset, and BIOS are MSI capable) A PCI-X or PCI-E Adapter plugged into an appropriate slot A Registry entry that defines MSI support Required: Miniport’s implements MSI Implementation within miniport code

  20. Storport MSI Example The MSISupported Registry entry Setup INF to create this entry in Registry // This will create entries under: // HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Enum\PCI\VEN_xxxx& // DEV_yyyy&SUBSYS_zzzzvvvv&REV_xx\3&61aaa01&0&FA\Device // Parameters\Interrupt Management\MessageSignaledInterruptProperties [XYZdriver_Inst.nt.HW] AddReg = MsiEnable_addreg [MsiEnable_addreg] HKR, Interrupt Management\MessageSignaledInterruptProperties, 0x00000010 HKR, Interrupt Management\MessageSignaledInterruptProperties, MSISupported, 0x00010001, 1 // This code courtesy of Adaptec Corporation

  21. Storport MSI Example In FindAdapter routine set two new fields of the PORT_CONFIGURATION_INFORMATION // (NOTE: InterruptSynchronizationMode can be set to // InterruptSynchronizeAll or InterruptSynchronizePerMessage, please // consult the storport-msi.doc for details. InterruptSynchronizeAll // is the simple choice where all message signaled interrupts will be // synchronized with each other). ConfigInfo->HwMSInterruptRoutine = MSInterruptHandler; ConfigInfo->InterruptSynchronizationMode = InterruptSynchronizeAll; // This code courtesy of Adaptec Corporation

  22. Storport MSI Example In MSInterruptHandler routine the miniport would do the following // following line necessary in case of multiple messages, // to find out the Message ID and uniquely identify the message MESSAGE_INTERRUPT_INFORMATION interruptInfo; // Handles the interrupt that the message indicates StorPortGetMessageInterruptInformation(pDeviceExtension, MessageId, &interruptInfo); // This code courtesy of Adaptec Corporation Clearing the PCI-X MSI register ensures interrupts are enabled again before exiting this routine

  23. The Future Of Storport – Near And FarWindows Vista, Windows Server coenamed “Longhorn,” and Back-porting

  24. Windows Vista Fast Resume Storport enabled “Fast Resume” Storport receive S-IRPs for HBA and devices Storport requests corresponding D-IRPs and then completes S-IRPs with “Success” status Storport receives D-IRPs for HBA and devices Storport does normal processing to power-up HBA and then completes HBA D-IRP Storport waits for completion of HBA D-IRP, does normal processing to power up devices, then completes device D-IRPs Enables Systems with SATA RAID or SCSI to Support WHQL Fast Resume

  25. Storport Virtual Miniports Developed as consolidation of iSCSIPrt Allows non-HW based “HBA” to process SRBs Hardware initialization data structure changes, obviously New flags required in Port Configuration Structure – only for VM Miniports I/O Log and Build I/O are not used No spin-locks, No interrupts

  26. Storage Port Driver Futures

  27. Feature And API Considerations • Microsoft will look to the HBA / Device industry for long-term feature suggestions • Is additional SW-RAID support beneficial? • Expansion of Virtual Miniport interfaces • Investigation of allowing WDM calls directly from miniports, linking to Kernel Resources • Investigation of extending VM Miniports into allowing miniport-initiated call-back routines • Exposing Miniport Device Object to Miniport Instance • Extension of management interfaces and extended management data reporting

  28. Storport Roadmap All current Windows Server 2003 features included in Windows Vista and Windows Server Longhorn Next Windows Server 2003 QFE release scheduled Back-port release of Storport Virtual Miniport support for Windows Server 2003 coming Windows XP Back-port under review Next generation SW RAID functions in architectural discussion

  29. Continued SupportUsing Microsoft’s Investments in Storport

  30. Storport Miniport Best Practices Use Storport – SCSIport will go away Do not code to ATAport for SATA RAID, only use Storport ATAport not supported for Third-Parties Take advantage of Full Duplex Synchronization Prepare for use of Virtual Miniports for extending storage through Storport Documentation underway – stay tuned! Do not link to Kernel or HAL Implement HBA-API – WHQL required Use IOCTL_SCSI_MINIOPORT_ for private miniport APIs

  31. Non-Compliant Drivers Any driver of the types defined below cannot be WHQL Logo’d – Further, they are classified as unsupportable by Microsoft PSS Organization Drivers that bypass any Microsoft supplied driver Drivers that supplement, or create private APIs to Miniports Drivers that create a full stack from HW to Class, or replace Port/Miniport model (Monolithic Drivers) Drivers that overtly link to the Kernel or HAL While Microsoft defines futures for miniports, continue to follow current guidelines – especially for soon-to-release products

  32. x64 Kernel Boot Driver Signing Manufacturers of boot start HBAs that support AMD or Intel emt64 must “embed” sign drivers, vis-a-vi Code Integrity Boot drivers set flags at compile time to identify “boot start” drivers Code Integrity validates driver hash against Trusted Certificate Stores Boot-time and run-time checking to be enabled Attend Code Integrity Session – Windows Vista and Windows Server Longhorn Security Platform Enhancements, Wednesday, 2 PM

  33. Call To Action Storage Driver focus – above all others – must be quality and reliability Develop new HW support using Storport, not SCSIport or ATAport All Future SCSI- or ATA-based technologies will be supported through Storport Monolithic drivers are not open for consideration in Storport futures Code High End Storage systems to the MSI Specification – best bet for increased performance Stay involved with WDEG Storage Driver Inclusion (WSDI) program

  34. Web Resources SATA in the Enterprise http://www.microsoft.com/whdc/device/storage/stor-tech.mspx Storport Miniport Development (DDC 2005) Storport Architecture and Miniport Development, Part 1 and 2 White Papers http://download.microsoft.com/download/5/6/6/5664b85a-ad06-45ec-979e-ec4887d715eb/Storport.doc WHQL Resources http://www.microsoft.com/whdc/device/storage Microsoft’s WHDC (WHQL) Storage Requirements Related Sessions x64 Platform Code Integrity (CI) Development Microsoft’s Storage Server Futures Robert “Bob” Griswold WDEG Storage Driver Inclusion – Additional Resources Rogris @ microsoft.com wsdi @ microsoft.com

  35. © 2006 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries. The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.

More Related