On Friday, May 2, 2003, at 04:29 PM, Joey Echeverria wrote: Does anyone know where the code for the Darwin disk scheduler is located? What do you mean by disk scheduler? I don't believe any such monolithic thing exists in Darwin. I/O requests that go out to disk, depending on their source and entry pathway, usually hit the UBC (universal buffer cache) and can be potentially coalesced with other I/O request (in other words deferred) to make a larger single request out to disk. The file systems involved play a large part in this, it depends on how they originate the I/O request. For the UBC and such you would need to look at the VM sub-system I believe which I think is under xnu/ofsmk (http://www.opensource.apple.com/darwinsource/10.2.5/). The common drivers used to drive disks are generally sub-classes of IOBlockStorageDriver however the meat of the functionality is located in the transport drivers in response to calls via the nubs they publish (sub-classes of IOBlockStorageDevice). IOMedia (and/or sub-classes) sit above the block device/driver and are the main IO abstraction for the higher levels in the system (at least IOKit wise). They can be found in the IOStorageFamily. The following (generated using "ioreg") outlines the IOKit objects involved in the disk IO "stack", some are not much more then glorified registry entries. The IOMediaBSDClient is the shim over into the BSD world. I believe most of the ordering of requests (if any) and/or their deferral happens on the BSD side of things (UBC, VFC, the various FS, etc.). For my EIDE drives (2 of them): | +-o pci@f4000000 <class IOPlatformDevice> | | +-o AppleMacRiscPCI <class AppleMacRiscPCI> | | +-o ata-6@D <class IOPCIDevice> | | | +-o AppleKauaiATA <class AppleKauaiATA> | | | +-o ATADeviceNub@0 <class ATADeviceNub> | | | | +-o IOATABlockStorageDriver <class IOATABlockStorageDriver> | | | | +-o IOATABlockStorageDevice <class IOATABlockStorageDevice> | | | | +-o IOBlockStorageDriver <class IOBlockStorageDriver> | | | | +-o WDC WD1200BB-53CAA0 Media <class IOMedia> | | | | +-o IOMediaBSDClient <class IOMediaBSDClient> | | | | +-o IOApplePartitionScheme <class IOApplePartitionScheme> | | | | +-o Apple@1 <class IOMedia> | | | | | +-o IOMediaBSDClient <class IOMediaBSDClient> | | | | +-o DATA@2 <class IOMedia> | | | | +-o IOMediaBSDClient <class IOMediaBSDClient> | | | +-o ATADeviceNub@1 <class ATADeviceNub> | | | +-o IOATABlockStorageDriver <class IOATABlockStorageDriver> | | | +-o IOATABlockStorageDevice <class IOATABlockStorageDevice> | | | +-o IOBlockStorageDriver <class IOBlockStorageDriver> | | | +-o WDC WD1200JB-75CRA0 Media <class IOMedia> | | | +-o IOMediaBSDClient <class IOMediaBSDClient> | | | +-o IOApplePartitionScheme <class IOApplePartitionScheme> | | | +-o Apple@1 <class IOMedia> | | | | +-o IOMediaBSDClient <class IOMediaBSDClient> | | | +-o Internal-120GB-2@2 <class IOMedia> | | | +-o IOMediaBSDClient <class IOMediaBSDClient> For my Fibre Channel based RAID array: | | | +-o pci1077,2@5 <class IOPCIDevice> | | | +-o com_ftsw_drv_qlc_hba_isp22xx <class com_ftsw_drv_qlc_hba_isp22xx> | | | +-o IOSCSIParallelInterfaceDevice@0 <class IOSCSIParallelInterfaceDevice> | | | | +-o IOSCSITargetDevice <class IOSCSITargetDevice> | | | | +-o IOSCSILogicalUnitNub@0 <class IOSCSILogicalUnitNub> | | | | +-o SCSITaskUserClientIniter <class SCSITaskUserClientIniter> | | | +-o IOSCSIParallelInterfaceDevice@1 <class IOSCSIParallelInterfaceDevice> | | | | +-o IOSCSITargetDevice <class IOSCSITargetDevice> | | | | +-o IOSCSILogicalUnitNub@0 <class IOSCSILogicalUnitNub> | | | | | +-o SCSITaskUserClientIniter <class SCSITaskUserClientIniter> [snip] | | | | +-o IOSCSILogicalUnitNub@1f <class IOSCSILogicalUnitNub> | | | | +-o SCSITaskUserClientIniter <class SCSITaskUserClientIniter> | | | +-o IOSCSIParallelInterfaceDevice@2 <class IOSCSIParallelInterfaceDevice> | | | +-o IOSCSITargetDevice <class IOSCSITargetDevice> | | | +-o IOSCSILogicalUnitNub@0 <class IOSCSILogicalUnitNub> | | | +-o IOSCSIPeripheralDeviceType00 <class IOSCSIPeripheralDeviceType00> | | | +-o IOBlockStorageServices <class IOBlockStorageServices> | | | +-o IOBlockStorageDriver <class IOBlockStorageDriver> | | | +-o APPLE Xserve RAID Media <class IOMedia> | | | +-o IOMediaBSDClient <class IOMediaBSDClient> | | | +-o IOApplePartitionScheme <class IOApplePartitionScheme> | | | +-o Apple@1 <class IOMedia> | | | | +-o IOMediaBSDClient <class IOMediaBSDClient> | | | +-o xrLeft@2 <class IOMedia> | | | +-o IOMediaBSDClient <class IOMediaBSDClient> Asking on the http://www.lists.apple.com/mailman/listinfo/ata-scsi-dev list may get you a better answer... if you get none good enough here. -Shawn _______________________________________________ darwin-kernel mailing list | darwin-kernel@lists.apple.com Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/darwin-kernel Do not post admin requests to the list. They will be ignored.