1.\" Copyright (c) 2009 Alexander Motin <mav@FreeBSD.org> 2.\" All rights reserved. 3.\" 4.\" Redistribution and use in source and binary forms, with or without 5.\" modification, are permitted provided that the following conditions 6.\" are met: 7.\" 1. Redistributions of source code must retain the above copyright 8.\" notice, this list of conditions and the following disclaimer. 9.\" 10.\" 2. Redistributions in binary form must reproduce the above copyright 11.\" notice, this list of conditions and the following disclaimer in the 12.\" documentation and/or other materials provided with the distribution. 13.\" 14.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND 15.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 16.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 17.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE 18.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 19.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 20.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 21.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 22.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 23.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 24.\" SUCH DAMAGE. 25.\"
| 1.\" Copyright (c) 2009 Alexander Motin <mav@FreeBSD.org> 2.\" All rights reserved. 3.\" 4.\" Redistribution and use in source and binary forms, with or without 5.\" modification, are permitted provided that the following conditions 6.\" are met: 7.\" 1. Redistributions of source code must retain the above copyright 8.\" notice, this list of conditions and the following disclaimer. 9.\" 10.\" 2. Redistributions in binary form must reproduce the above copyright 11.\" notice, this list of conditions and the following disclaimer in the 12.\" documentation and/or other materials provided with the distribution. 13.\" 14.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND 15.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 16.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 17.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE 18.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 19.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 20.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 21.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 22.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 23.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 24.\" SUCH DAMAGE. 25.\"
|
26.\" $FreeBSD: head/share/man/man4/ada.4 204705 2010-03-04 11:09:49Z mav $
| 26.\" $FreeBSD: head/share/man/man4/ada.4 214279 2010-10-24 16:31:57Z brucec $
|
27.\" 28.Dd November 19, 2009 29.Dt ADA 4 30.Os 31.Sh NAME 32.Nm ada 33.Nd ATA Direct Access device driver 34.Sh SYNOPSIS 35.Cd device ada 36.Sh DESCRIPTION 37The 38.Nm 39driver provides support for direct access devices, implementing the 40.Tn ATA 41command protocol, that are attached to the system through a host adapter 42supported by the CAM subsystem. 43.Pp 44The host adapter must also be separately configured into the system before an 45.Tn ATA 46direct access device can be configured. 47.Sh COMMAND QUEUING 48Command queueing allows the device to process multiple transactions 49concurrently, often re-ordering them to reduce the number and length of 50seeks. 51.Tn ATA 52defines two types of queueing: 53.Tn TCQ (Tagged Command Queueing, PATA legacy) 54and 55.Tn NCQ (Native Command Queueing, SATA) . 56The 57.Nm 58device driver takes full advantage of NCQ, when supported. 59To ensure that transactions to distant parts of the media, 60which may be deferred indefinitely by servicing requests closer to the current 61head position, are completed in a timely fashion, an ordered 62transaction is sent every 7 seconds during continuous device operation. 63.Sh CACHE EFFECTS 64Many direct access devices are equipped with read and/or write caches. 65Parameters affecting the device's cache are reported in device IDENTIFY data 66and can be examined and modified via the 67.Xr camcontrol 8 68utility. 69.Pp 70The read cache is used to store data from device-initiated read ahead 71operations as well as frequently used data. 72The read cache is transparent 73to the user and can be enabled without any adverse effect. 74Most devices 75with a read cache come from the factory with it enabled. 76.Pp 77The write cache can greatly decrease the latency of write operations 78and allows the device to reorganize writes to increase efficiency and 79performance. 80This performance gain comes at a price. 81Should the device 82lose power while its cache contains uncommitted write operations, these 83writes will be lost. 84The effect of a loss of write transactions on 85a file system is non-deterministic and can cause corruption. 86Most 87devices age write transactions to limit the vulnerability to a few transactions 88recently reported as complete, but it is nonetheless recommended that 89systems with write cache enabled devices reside on an Uninterruptible 90Power Supply (UPS). 91The 92.Nm 93device driver ensures that the cache and media are synchronized upon 94final close of the device or an unexpected shutdown (panic) event. 95This ensures that it is safe to disconnect power once the operating system 96has reported that it has halted. 97.Sh SYSCTL VARIABLES 98The following variables are available as both 99.Xr sysctl 8 100variables and 101.Xr loader 8 102tunables: 103.Bl -tag -width 12 104.It kern.cam.ada.retry_count 105.Pp 106This variable determines how many times the 107.Nm 108driver will retry a READ or WRITE command. 109This does not affect the number of retries used during probe time or for 110the 111.Nm 112driver dump routine. 113This value currently defaults to 4. 114.It kern.cam.ada.default_timeout 115.Pp 116This variable determines how long the 117.Nm 118driver will wait before timing out an outstanding command. 119The units for this value are seconds, and the default is currently 30 120seconds.
| 27.\" 28.Dd November 19, 2009 29.Dt ADA 4 30.Os 31.Sh NAME 32.Nm ada 33.Nd ATA Direct Access device driver 34.Sh SYNOPSIS 35.Cd device ada 36.Sh DESCRIPTION 37The 38.Nm 39driver provides support for direct access devices, implementing the 40.Tn ATA 41command protocol, that are attached to the system through a host adapter 42supported by the CAM subsystem. 43.Pp 44The host adapter must also be separately configured into the system before an 45.Tn ATA 46direct access device can be configured. 47.Sh COMMAND QUEUING 48Command queueing allows the device to process multiple transactions 49concurrently, often re-ordering them to reduce the number and length of 50seeks. 51.Tn ATA 52defines two types of queueing: 53.Tn TCQ (Tagged Command Queueing, PATA legacy) 54and 55.Tn NCQ (Native Command Queueing, SATA) . 56The 57.Nm 58device driver takes full advantage of NCQ, when supported. 59To ensure that transactions to distant parts of the media, 60which may be deferred indefinitely by servicing requests closer to the current 61head position, are completed in a timely fashion, an ordered 62transaction is sent every 7 seconds during continuous device operation. 63.Sh CACHE EFFECTS 64Many direct access devices are equipped with read and/or write caches. 65Parameters affecting the device's cache are reported in device IDENTIFY data 66and can be examined and modified via the 67.Xr camcontrol 8 68utility. 69.Pp 70The read cache is used to store data from device-initiated read ahead 71operations as well as frequently used data. 72The read cache is transparent 73to the user and can be enabled without any adverse effect. 74Most devices 75with a read cache come from the factory with it enabled. 76.Pp 77The write cache can greatly decrease the latency of write operations 78and allows the device to reorganize writes to increase efficiency and 79performance. 80This performance gain comes at a price. 81Should the device 82lose power while its cache contains uncommitted write operations, these 83writes will be lost. 84The effect of a loss of write transactions on 85a file system is non-deterministic and can cause corruption. 86Most 87devices age write transactions to limit the vulnerability to a few transactions 88recently reported as complete, but it is nonetheless recommended that 89systems with write cache enabled devices reside on an Uninterruptible 90Power Supply (UPS). 91The 92.Nm 93device driver ensures that the cache and media are synchronized upon 94final close of the device or an unexpected shutdown (panic) event. 95This ensures that it is safe to disconnect power once the operating system 96has reported that it has halted. 97.Sh SYSCTL VARIABLES 98The following variables are available as both 99.Xr sysctl 8 100variables and 101.Xr loader 8 102tunables: 103.Bl -tag -width 12 104.It kern.cam.ada.retry_count 105.Pp 106This variable determines how many times the 107.Nm 108driver will retry a READ or WRITE command. 109This does not affect the number of retries used during probe time or for 110the 111.Nm 112driver dump routine. 113This value currently defaults to 4. 114.It kern.cam.ada.default_timeout 115.Pp 116This variable determines how long the 117.Nm 118driver will wait before timing out an outstanding command. 119The units for this value are seconds, and the default is currently 30 120seconds.
|
| 121.It kern.cam.ada.spindown_shutdown 122.Pp 123This variable determines whether to spin-down disks when shutting down.
|
121.El 122.Sh FILES 123.Bl -tag -width ".Pa /dev/ada*" -compact 124.It Pa /dev/ada* 125ATA device nodes 126.El 127.Sh SEE ALSO 128.Xr ad 4 , 129.Xr ahci 4 , 130.Xr cam 4 , 131.Xr da 4 , 132.Xr siis 4 133.Sh HISTORY 134The 135.Nm 136driver first appeared in 137.Fx 8.0 . 138.Sh AUTHORS 139.An Alexander Motin Aq mav@FreeBSD.org
| 124.El 125.Sh FILES 126.Bl -tag -width ".Pa /dev/ada*" -compact 127.It Pa /dev/ada* 128ATA device nodes 129.El 130.Sh SEE ALSO 131.Xr ad 4 , 132.Xr ahci 4 , 133.Xr cam 4 , 134.Xr da 4 , 135.Xr siis 4 136.Sh HISTORY 137The 138.Nm 139driver first appeared in 140.Fx 8.0 . 141.Sh AUTHORS 142.An Alexander Motin Aq mav@FreeBSD.org
|