linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Serial ATA (SATA) for Linux status report
@ 2003-12-03 20:44 Jeff Garzik
  2003-12-03 23:27 ` Andre Tomt
                   ` (5 more replies)
  0 siblings, 6 replies; 37+ messages in thread
From: Jeff Garzik @ 2003-12-03 20:44 UTC (permalink / raw)
  To: linux-kernel, linux-ide, linux-scsi




Editor's preface:  This is clearly a first draft, only covering the
basics.  In order for this document to be effective, I request that
users and developers send me (or post) their SATA driver questions and
issues.  I will do my best to address them here.


Serial ATA (SATA) for Linux
status report
Dec 3, 2003


Hardware support
================


Intel ICH5
----------
Summary:  No TCQ.  Looks like a PATA controller, but with a few added,
non-standard SATA port controls.

libata driver status:  Production, but see issue #2, #3.

drivers/ide driver status:  Production, but see issue #1, #2.


Issue #1:  Depending on BIOS settings, IDE driver may lock up computer
when probing drives.

Issue #2:  Excessive interrupts are seen in some configurations.

Issue #3:  "Enhanced mode" or "SATA-only mode" may need to be set in BIOS.


Intel ICH6 ("AHCI")
-------------------
Summary:  Per-device queues, full SATA control including hotplug
and PM.

libata driver status:  In development.


Promise
-------
Summary:  Per-host queues on all controllers.  Full SATA control
including hotplug and PM on all but one controller.

libata driver status:  Beta.


Silicon Image 3112
------------------
Summary:  No TCQ.  Looks like a PATA controller, but with full SATA
control including hotplug and PM.

libata driver status:  Alpha.

drivers/ide driver status:  Production, but see issue #4.

Issue #4:  Need to have the most recent fixes posted to lkml, for stable
operation and full performance (where possible).


Broadcom/ServerWorks/Apple
--------------------------
Summary:  Huge per-device queues, full SATA control including hotplug
and PM.

libata driver status:  Beta.


VIA
---
Summary:  No TCQ.  Looks like a PATA controller, but with full SATA
control including hotplug and PM.

libata driver status:  Beta.




Software support
================


Basic Serial ATA support
------------------------
The "ATA host state machine", the core of the entire driver, is
considered production-stable.

The error handling is _very_ simple, but at this stage that is an
advantage.  Error handling code anywhere is inevitably both complex and
sorely under-tested.  libata error handling is intentionally simple.
Positives:  Easy to review and verify correctness.  Never data
corruption.  Negatives:  if an error occurs, libata will simply send
the error back the block layer.  There are limited retries by the block
layer, depending on the type of error, but there is never a bus reset.

Or in other words:  "it's better to stop talking to the disk than
compound existing problems with further problems."

As Serial ATA matures, and host- and device-side errata become apparent,
the error handling will be slowly refined.  I am planning to work with a
few (kind!) disk vendors, to obtain special drives/firmwares that allow
me to inject faults, and otherwise exercise error handling code.



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 is support by drivers/ide _only_.  libata will not support this.
#2 will soon be supported by libata.
#3 will be supported by libata when hardware is available from drive
manufacturers.


Hotplug support
---------------
All SATA is hotplug.

libata does not support hotplug... yet.



Power Management support
------------------------
Over and above the power management specified in the ATA/ATAPI
specification, one can aggressively control the power consumption of
SATA hosts, the SATA bus, and the SATA device.



^ permalink raw reply	[flat|nested] 37+ messages in thread
* Re: Serial ATA (SATA) for Linux status report
@ 2003-12-04 18:03 Jon Burgess
  0 siblings, 0 replies; 37+ messages in thread
From: Jon Burgess @ 2003-12-04 18:03 UTC (permalink / raw)
  To: linux kernel, jgarzik

**Jeff Garzik wrote:
 > Intel ICH5
...
 > drivers/ide driver status: Production, but see issue #1, #2.
...
 > Issue #2: Excessive interrupts are seen in some configurations.

I can reproduce this easily in my current setup. It looks like the 
chipset is generating some unexpected IRQ's when after performing the 
hdparm drive setting ioctl()'s.

More details are below, let me know if you need any more.

Hardware:
Gigabyte 8IG1000Pro (Intel ICH5)
2 x Parallel IDE drives on PATA IDE primary
2 x DVD drives on PATA IDE secondary
1 x Seagate 80GB SATA drive on SATA0

Software:
Linux-2.6.0-test10, using drivers/ide driver

The Root fileystem is currently on one of the parallel IDE drives, and 
the SATA doesn't get used much (yet). The PC boots and vmstat shows 
everything is OK.

Running an hdparm command on the drive causes an IRQ storm, reported by 
vmstat at ~ 100k IRQ/s. I think that "hdaprm -S 128 /dev/hde" will 
trigger it, but I can't remember for certain.
Performing another access to the drive, e.g. umount /dev/hde, clears the 
problem.
It is 100% repeatable, i.e. doing the hdparm makes it happen again, then 
mounting the drive will clear it.

I put some extra debug in the ide_intr routine and found that there was 
a storm of interrupts around when the partition table was being read 
(the "drive_check_ready()" check was failing continuously for a while). 
Afterwards there were times when  lots of IRQs happened when "handler" 
was NULL. It looks like the chipset might be generating some extra IRQ's 
which the existing code isn't expecting. Doing another access on the 
drive looks like it is enough to clear whatever interrupt is pending.

    Jon




^ permalink raw reply	[flat|nested] 37+ messages in thread
* Serial ATA (SATA) for Linux status report
@ 2004-08-24 19:49 Jeff Garzik
  0 siblings, 0 replies; 37+ messages in thread
From: Jeff Garzik @ 2004-08-24 19:49 UTC (permalink / raw)
  To: linux-ide; +Cc: Linux Kernel


A new SATA status report is available.

Updated today, newly converted to HTML, and permanently archived at

	http://linux.yyz.us/sata/sata-status.html



^ permalink raw reply	[flat|nested] 37+ messages in thread

end of thread, other threads:[~2004-08-24 19:50 UTC | newest]

Thread overview: 37+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-12-03 20:44 Serial ATA (SATA) for Linux status report Jeff Garzik
2003-12-03 23:27 ` Andre Tomt
2003-12-03 23:36   ` Jeff Garzik
2003-12-04  0:21     ` Miquel van Smoorenburg
2003-12-04  0:59     ` Samuel Flory
2003-12-04  1:02     ` Andre Tomt
2003-12-04 13:38     ` Justin Cormack
2003-12-04 14:54       ` Jeff Garzik
2003-12-04  8:17 ` Arnaud Launay
2003-12-04 15:01   ` Jeff Garzik
2003-12-05 17:42     ` Mickael Marchand
2003-12-05 17:47       ` Jeff Garzik
2003-12-05 18:07         ` [PATCH] Silicon image 3114 SATA link (really basic support) Mickael Marchand
2003-12-09 18:22           ` Aron Rubin
2003-12-09 18:54             ` Mickael Marchand
2003-12-09 20:14               ` Bartlomiej Zolnierkiewicz
2003-12-12  0:07                 ` Mickael Marchand
2003-12-05 18:16         ` Serial ATA (SATA) for Linux status report Kevin P. Fleming
2003-12-05 18:29           ` Jeff Garzik
2003-12-09  9:39 ` Petr Sebor
2003-12-09 19:59 ` J. Ryan Earl
2004-01-14 22:18 ` Greg Stark
2004-01-14 22:56   ` Erik Andersen
2004-01-14 23:31     ` James Courtier-Dutton
2004-01-15  0:41       ` Jeff Garzik
2004-01-15  2:38         ` Erik Andersen
2004-01-18 12:34         ` Martin Schlemmer
2004-01-14 23:32     ` Raphael Rigo
2004-01-15  0:08       ` Erik Steffl
2004-01-15  2:39         ` Matthias Hentges
2004-01-15 21:08           ` Greg Stark
2004-01-14 23:12   ` Erik Steffl
2004-01-18 13:32 ` Witold Krecicki
2004-01-18 18:00   ` Jeff Garzik
2004-01-18 20:33     ` Craig Bradney
2003-12-04 18:03 Jon Burgess
2004-08-24 19:49 Jeff Garzik

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).