SATA AHCI NCQ ?

Submitted by davidhartley
on March 13, 2005 - 7:25pm

here
SATA hardware/driver status report (updated Dec. 27, 2004)
http://linux.yyz.us/sata/sata-status.html
I find:
-----------
AHCI (Intel ICH[67] currently)
Summary: Full NCQ support, full SATA control including hotplug and PM.

libata driver status: Production.

Note1: AHCI specification is completely open.
------------

but here
Serial ATA (SATA) Linux software status report (March 5, 2005)
http://linux.yyz.us/sata/software-status.html
I find:
----------Queueing support
Even though some SATA host controllers on the market already support command queueing (a.k.a. "TCQ"), libata does not yet support it.

However, libata was designed from the ground-up to support queueing, so I need only change a few lines of code, and write two functions, to enable this behavior.

Queueing will be enabled in libata soon, but to do so requires a long stretch of testing on a large variety of controllers and drives. This is very time-intensive, and is the largest part of this task.

Tangent: Host-based queueing and Native Command Queueing

Queueing is the process of sending multiple commands to a single device, without waiting for prior commands to finish. This increases performance and reduces latency. There are three types of queueing in the ATA world:

1. "legacy TCQ" -- some PATA devices support this. Just ignore it, it's going away.

2. "host-based TCQ" -- the host controller supports a queue of drive commands, whether or not the drive supports it.

3. "Native Command Queueing" -- both host and drive cooperate in the queueing and execution of drive commands. This should provide the highest performance and lowest latency of all three options.

#1 will be supported only where hardware handles all the details.
#2 will soon be supported by libata.
#3 will be supported by libata when hardware is available from drive manufacturers.
-----------

Since the latter document is dated March 5, 2005
and since both documents are maintained by Jeff Garzik, I'm a little confused..

So, I check the FAQ
http://linux.yyz.us/sata/faq-sata-raid.html
Which helpfully explains
------------
8. Well, OK. I have figured out my card is not hardware RAID. How do I access the data stored by my BIOS software RAID, under a 2.6.x kernel?
A. Device Mapper ("DM") and dmraid.
http://people.redhat.com/~heinzm/sw/dmraid/
-----------

Ok, so the hardware supports NCQ in an open specification (AHCI)
but apparently libata does not (yet)
and for now (March 2005) the workaround is fakeraid.

awright I think I get that, & if I'm real lucky maybe I can even implement it.
-can someone please verify that in doing so, it is (or isn't) likely that I'll be reaping the supposed benefit of IHC6 NCQ support for currently available Maxtor or Seagate SATA drives which implement NCQ ?

thx,

David Hartley
www.localcomputermart.com/dave

San Francisco & Bay Area (510)776-5914
---------------------