]> CyberLeo.Net >> Repos - FreeBSD/releng/10.0.git/blob - share/man/man4/ada.4
- Copy stable/10 (r259064) to releng/10.0 as part of the
[FreeBSD/releng/10.0.git] / share / man / man4 / ada.4
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$
27 .\"
28 .Dd February 8, 2012
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
37 The
38 .Nm
39 driver provides support for direct access devices, implementing the
40 .Tn ATA
41 command protocol, that are attached to the system through a host adapter
42 supported by the CAM subsystem.
43 .Pp
44 The host adapter must also be separately configured into the system before an
45 .Tn ATA
46 direct access device can be configured.
47 .Sh COMMAND QUEUING
48 Command queueing allows the device to process multiple transactions
49 concurrently, often re-ordering them to reduce the number and length of
50 seeks.
51 .Tn ATA
52 defines two types of queueing:
53 .Tn TCQ (Tagged Command Queueing, PATA legacy)
54 and
55 .Tn NCQ (Native Command Queueing, SATA) .
56 The
57 .Nm
58 device driver takes full advantage of NCQ, when supported.
59 To ensure that transactions to distant parts of the media,
60 which may be deferred indefinitely by servicing requests closer to the current
61 head position, are completed in a timely fashion, an ordered
62 transaction is sent every 7 seconds during continuous device operation.
63 .Sh CACHE EFFECTS
64 Many direct access devices are equipped with read and/or write caches.
65 Parameters affecting the device's cache are reported in device IDENTIFY data
66 and can be examined and modified via the
67 .Xr camcontrol 8
68 utility.
69 .Pp
70 The read cache is used to store data from device-initiated read ahead
71 operations as well as frequently used data.
72 The read cache is transparent
73 to the user and can be enabled without any adverse effect.
74 Most devices
75 with a read cache come from the factory with it enabled.
76 .Pp
77 The write cache can greatly decrease the latency of write operations
78 and allows the device to reorganize writes to increase efficiency and
79 performance.
80 This performance gain comes at a price.
81 Should the device
82 lose power while its cache contains uncommitted write operations, these
83 writes will be lost.
84 The effect of a loss of write transactions on
85 a file system is non-deterministic and can cause corruption.
86 Most
87 devices age write transactions to limit the vulnerability to a few transactions
88 recently reported as complete, but it is nonetheless recommended that
89 systems with write cache enabled devices reside on an Uninterruptible
90 Power Supply (UPS).
91 The
92 .Nm
93 device driver ensures that the cache and media are synchronized upon
94 final close of the device or an unexpected shutdown (panic) event.
95 This ensures that it is safe to disconnect power once the operating system
96 has reported that it has halted.
97 .Sh SYSCTL VARIABLES
98 The following variables are available as both
99 .Xr sysctl 8
100 variables and
101 .Xr loader 8
102 tunables:
103 .Bl -tag -width 12
104 .It Va kern.cam.ada.retry_count
105 .Pp
106 This variable determines how many times the
107 .Nm
108 driver will retry a READ or WRITE command.
109 This does not affect the number of retries used during probe time or for
110 the
111 .Nm
112 driver dump routine.
113 This value currently defaults to 4.
114 .It Va kern.cam.ada.default_timeout
115 .Pp
116 This variable determines how long the
117 .Nm
118 driver will wait before timing out an outstanding command.
119 The units for this value are seconds, and the default is currently 30
120 seconds.
121 .It Va kern.cam.ada.spindown_shutdown
122 .Pp
123 This variable determines whether to spin-down disks when shutting down.
124 Set to 1 to enable spin-down, 0 to disable.
125 The default is currently enabled.
126 .It Va kern.cam.ada.write_cache
127 .It Va kern.cam.ada. Ns Ar X Ns Va .write_cache
128 .Pp
129 These variables determines whether device write cache should be enabled
130 globally or per-device or disabled.
131 Set to 1 to enable write cache, 0 to disable, -1 to leave it as-is.
132 Values modified in runtime take effect only after device reset.
133 The global default is currently enabled.
134 The per-device default is to leave it as-is (follow global setting).
135 .El
136 .Sh FILES
137 .Bl -tag -width ".Pa /dev/ada*" -compact
138 .It Pa /dev/ada*
139 ATA device nodes
140 .El
141 .Sh SEE ALSO
142 .Xr ahci 4 ,
143 .Xr cam 4 ,
144 .Xr da 4 ,
145 .Xr siis 4
146 .Sh HISTORY
147 The
148 .Nm
149 driver first appeared in
150 .Fx 8.0 .
151 .Sh AUTHORS
152 .An Alexander Motin Aq mav@FreeBSD.org