How does FreeBSD make use of SATA's NCQ?

It seems that the ata requests are always software-sorted in ata_queue_request(/sys/dev/ata/Ata-queue.c) unless (ch->state & ATA_STALL_QUEUE). And this process has nothing to do with specific HBA driver. So I can't image how FreeBSD makes use of SATA's NCQ.
 
This came up on one of the mailing lists mid-last year and the answer then was FreeBSD makes no use of NCQ as soren@ needed to add it code to the FreeBSD driver to make use of it and soren@ was otherwise busy with life.

I've seen no updates since though.
 
trev said:
This came up on one of the mailing lists mid-last year and the answer then was FreeBSD makes no use of NCQ as soren@ needed to add it code to the FreeBSD driver to make use of it and soren@ was otherwise busy with life.

I've seen no updates since though.

Thanks..... Does that mean I must modify ata-layer in addition to write a driver with NCQ to enable this feature?
 
Note that in FreeBSD 8.0 there is new driver called ahci(4), which uses CAM (previously used only by SCSI drives) instead of the old ata(4) infrastructure. One of the advantages over ata(4) is the efficient use of NCQ. This is still being improved in FreeBSD-CURRENT, but what's in 8.0 works very well already.
 
Back
Top