]> CyberLeo.Net >> Repos - FreeBSD/releng/9.2.git/blob - share/man/man4/nvme.4
- Copy stable/9 to releng/9.2 as part of the 9.2-RELEASE cycle.
[FreeBSD/releng/9.2.git] / share / man / man4 / nvme.4
1 .\"
2 .\" Copyright (c) 2012-2013 Intel Corporation
3 .\" All rights reserved.
4 .\"
5 .\" Redistribution and use in source and binary forms, with or without
6 .\" modification, are permitted provided that the following conditions
7 .\" are met:
8 .\" 1. Redistributions of source code must retain the above copyright
9 .\"    notice, this list of conditions, and the following disclaimer,
10 .\"    without modification.
11 .\" 2. Redistributions in binary form must reproduce at minimum a disclaimer
12 .\"    substantially similar to the "NO WARRANTY" disclaimer below
13 .\"    ("Disclaimer") and any redistribution must be conditioned upon
14 .\"    including a substantially similar Disclaimer requirement for further
15 .\"    binary redistribution.
16 .\"
17 .\" NO WARRANTY
18 .\" THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
19 .\" "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
20 .\" LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
21 .\" A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
22 .\" HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
23 .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
24 .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
25 .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
26 .\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
27 .\" IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
28 .\" POSSIBILITY OF SUCH DAMAGES.
29 .\"
30 .\" nvme driver man page.
31 .\"
32 .\" Author: Jim Harris <jimharris@FreeBSD.org>
33 .\"
34 .\" $FreeBSD$
35 .\"
36 .Dd July 9, 2013
37 .Dt NVME 4
38 .Os
39 .Sh NAME
40 .Nm nvme
41 .Nd NVM Express core driver
42 .Sh SYNOPSIS
43 To compile this driver into your kernel,
44 place the following line in your kernel configuration file:
45 .Bd -ragged -offset indent
46 .Cd "device nvme"
47 .Ed
48 .Pp
49 Or, to load the driver as a module at boot, place the following line in
50 .Xr loader.conf 5 :
51 .Bd -literal -offset indent
52 nvme_load="YES"
53 .Ed
54 .Pp
55 Most users will also want to enable
56 .Xr nvd 4
57 to surface NVM Express namespaces as disk devices.
58 Note that in NVM Express terms, a namespace is roughly equivalent to a
59 SCSI LUN.
60 .Sh DESCRIPTION
61 The
62 .Nm
63 driver provides support for NVM Express (NVMe) controllers, such as:
64 .Bl -bullet
65 .It
66 Hardware initialization
67 .It
68 Per-CPU IO queue pairs
69 .It
70 API for registering NVMe namespace consumers such as
71 .Xr nvd 4
72 .It
73 API for submitting NVM commands to namespaces
74 .It
75 Ioctls for controller and namespace configuration and management
76 .Nm
77 creates controller devices in the format /dev/nvmeX and namespace devices in
78 the format /dev/nvmeXnsY.
79 Note that the NVM Express specification starts numbering namespaces at 1,
80 not 0, and this driver follows that convention.
81 .El
82 .Sh CONFIGURATION
83 By default,
84 .Nm
85 will create an I/O queue pair for each CPU, provided enough MSI-X vectors
86 can be allocated.
87 To force a single I/O queue pair shared by all CPUs, set the following
88 tunable value in
89 .Xr loader.conf 5 :
90 .Bd -literal -offset indent
91 hw.nvme.per_cpu_io_queues=0
92 .Ed
93 .Pp
94 To force legacy interrupts for all
95 .Nm
96 driver instances, set the following tunable value in
97 .Xr loader.conf 5 :
98 .Bd -literal -offset indent
99 hw.nvme.force_intx=1
100 .Ed
101 .Pp
102 Note that use of INTx implies disabling of per-CPU I/O queue pairs.
103 .Sh SYSCTL VARIABLES
104 The following controller-level sysctls are currently implemented:
105 .Bl -tag -width indent
106 .It Va dev.nvme.0.int_coal_time
107 (R/W) Interrupt coalescing timer period in microseconds.  Set to 0 to disable.
108 .It Va dev.nvme.0.int_coal_threshold
109 (R/W) Interrupt coalescing threshold in number of command completions.
110 Set to 0 to disable.
111 .El
112 .Pp
113 The following queue pair-level sysctls are currently implemented.
114 Admin queue sysctls take the format of dev.nvme.0.adminq and I/O queue sysctls
115 take the format of dev.nvme.0.ioq0.
116 .Bl -tag -width indent
117 .It Va dev.nvme.0.ioq0.num_entries
118 (R) Number of entries in this queue pair's command and completion queue.
119 .It Va dev.nvme.0.ioq0.num_tr
120 (R) Number of nvme_tracker structures currently allocated for this queue pair.
121 .It Va dev.nvme.0.ioq0.num_prp_list
122 (R) Number of nvme_prp_list structures currently allocated for this queue pair.
123 .It Va dev.nvme.0.ioq0.sq_head
124 (R) Current location of the submission queue head pointer as observed by
125 the driver.
126 The head pointer is incremented by the controller as it takes commands off
127 of the submission queue.
128 .It Va dev.nvme.0.ioq0.sq_tail
129 (R) Current location of the submission queue tail pointer as observed by
130 the driver.
131 The driver increments the tail pointer after writing a command
132 into the submission queue to signal that a new command is ready to be
133 processed.
134 .It Va dev.nvme.0.ioq0.cq_head
135 (R) Current location of the completion queue head pointer as observed by
136 the driver.
137 The driver increments the head pointer after finishing
138 with a completion entry that was posted by the controller.
139 .It Va dev.nvme.0.ioq0.num_cmds
140 (R) Number of commands that have been submitted on this queue pair.
141 .It Va dev.nvme.0.ioq0.dump_debug
142 (W) Writing 1 to this sysctl will dump the full contents of the submission
143 and completion queues to the console.
144 .El
145 .Sh SEE ALSO
146 .Xr nvd 4 ,
147 .Xr pci 4 ,
148 .Xr nvmecontrol 8 ,
149 .Xr disk 9 .
150 .Sh HISTORY
151 The
152 .Nm
153 driver first appeared in
154 .Fx 9.2.
155 .Sh AUTHORS
156 .An -nosplit
157 The
158 .Nm
159 driver was developed by Intel and originally written by
160 .An Jim Harris Aq jimharris@FreeBSD.org ,
161 with contributions from Joe Golio at EMC.
162 .Pp
163 This man page was written by
164 .An Jim Harris Aq jimharris@FreeBSD.org .