Comparative Analysis of the drive architecture of ATA disk in Linux

Source: Internet
Author: User

From http://blog.ednchina.com/tiloog/219030/message.aspx

The ATA disk mentioned here includes two categories: traditional parallel ATA (PATA), that is, the IDE interface, and the popular Serial ATA (SATA ). For the IDE driver, Linux- 2.6.28 It can be converted into a traditional HD device or a popular SD device. For SATA devices, the standard practice of Linux is to drive them into SD devices. The following section compares and analyzes the drive architecture of traditional ATA and the drive architecture of popular ata devices.


Shows the drive framework of traditional ata. The traditional ata Host Architecture is built on the PCI bus and is enumerated during the PCI bus scanning process. After the PCI scanner scans the ATA host, it loads the driver of the device, that is, the ATA host driver. The driver is also a driver of the PCI device. ATA host will be registered to the IDE core level driver layer to generate an IDE bus. The IDE core layer will scan this host after initializing the ATA host, and load the IDE Device Driver suitable for the device. If the IDE device driver is an IDE disk drive, the ATA disk will be driven to a HD device. If the drive is ide-SCSI, the ATA device is virtualized into a SCSI host and added to the SCSI middle leve driver layer, the SCSI middle level driver layer will scan the virtual SCSI host and load the scan to obtain the driver of the device. This driver is usually a SCSI disk driver, A traditional ide device is driven into a SCSI device. From the above driver stack, we can see that the key to virtualizing an IDE device into a SCSI device is the IDE device driver, which virtualizes the device, A virtual SCSI bus is formed, and then the device is virtualized into a SCSI device. In this way, we can continuously perform device virtual and bus cascade expansion.

From the above driver framework, the IDE bus layer is not very effective. Therefore, you can discard the IDE bus layer and directly use the driver framework as shown in, this is also a common Driver Model for SATA drivers.

In the above driver model, the ATA host enumeration process is consistent with the first model, but the ATA host driver will directly register the ATA host to the SCSI middle level layer, considering the differences between the ATA Protocol Layer and the SCSI protocol layer, the libata driver is used as the conversion layer between the SCSI middle level and the ATA host, in this way, the ATA host can be directly integrated into the SCSI driver system, and the ATA device can be directly driven into a SCSI device. Compared with the first model, the driving stack of this model is reduced, the driving efficiency is improved, and the ATA driver can be seamlessly integrated into the SCSI driving system. In this driver model, the libata driver is undoubtedly the biggest hero. Currently, many SATA host drivers and PATA host drivers use this model.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.