diff options
author | jimharris <jimharris@FreeBSD.org> | 2016-01-11 17:32:56 +0000 |
---|---|---|
committer | jimharris <jimharris@FreeBSD.org> | 2016-01-11 17:32:56 +0000 |
commit | 132d9697c09a16aa335d7f87b4cf5c2118dc909a (patch) | |
tree | ac12acce9b1f22c16b6628bf6cd450f2e234eb8d /share/man | |
parent | 613dac6224f7c02dd5cd7f54c047c7ff4ab3c822 (diff) | |
download | FreeBSD-src-132d9697c09a16aa335d7f87b4cf5c2118dc909a.zip FreeBSD-src-132d9697c09a16aa335d7f87b4cf5c2118dc909a.tar.gz |
MFC r293352:
nvme: add hw.nvme.min_cpus_per_ioq tunable
Due to FreeBSD system-wide limits on number of MSI-X vectors
(https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=199321),
it may be desirable to allocate fewer than the maximum number
of vectors for an NVMe device, in order to save vectors for
other devices (usually Ethernet) that can take better
advantage of them and may be probed after NVMe.
This tunable is expressed in terms of minimum number of CPUs
per I/O queue instead of max number of queues per controller,
to allow for a more even distribution of CPUs per queue. This
avoids cases where some number of CPUs have a dedicated queue,
but other CPUs need to share queues. Ideally the PR referenced
above will eventually be fixed and the mechanism implemented
here becomes obsolete anyways.
While here, fix a bug in the CPUs per I/O queue calculation to
properly account for the admin queue's MSI-X vector.
Diffstat (limited to 'share/man')
-rw-r--r-- | share/man/man4/nvme.4 | 18 |
1 files changed, 15 insertions, 3 deletions
diff --git a/share/man/man4/nvme.4 b/share/man/man4/nvme.4 index 8a22d68..a23430d 100644 --- a/share/man/man4/nvme.4 +++ b/share/man/man4/nvme.4 @@ -1,5 +1,5 @@ .\" -.\" Copyright (c) 2012-2014 Intel Corporation +.\" Copyright (c) 2012-2016 Intel Corporation .\" All rights reserved. .\" .\" Redistribution and use in source and binary forms, with or without @@ -33,7 +33,7 @@ .\" .\" $FreeBSD$ .\" -.Dd March 18, 2014 +.Dd January 7, 2016 .Dt NVME 4 .Os .Sh NAME @@ -90,7 +90,10 @@ not 0, and this driver follows that convention. By default, .Nm will create an I/O queue pair for each CPU, provided enough MSI-X vectors -can be allocated. +and NVMe queue pairs can be allocated. If not enough vectors or queue +pairs are available, nvme(4) will use a smaller number of queue pairs and +assign multiple CPUs per queue pair. +.Pp To force a single I/O queue pair shared by all CPUs, set the following tunable value in .Xr loader.conf 5 : @@ -98,6 +101,13 @@ tunable value in hw.nvme.per_cpu_io_queues=0 .Ed .Pp +To assign more than one CPU per I/O queue pair, thereby reducing the number +of MSI-X vectors consumed by the device, set the following tunable value in +.Xr loader.conf 5 : +.Bd -literal -offset indent +hw.nvme.min_cpus_per_ioq=X +.Ed +.Pp To force legacy interrupts for all .Nm driver instances, set the following tunable value in @@ -110,6 +120,8 @@ Note that use of INTx implies disabling of per-CPU I/O queue pairs. .Sh SYSCTL VARIABLES The following controller-level sysctls are currently implemented: .Bl -tag -width indent +.It Va dev.nvme.0.num_cpus_per_ioq +(R) Number of CPUs associated with each I/O queue pair. .It Va dev.nvme.0.int_coal_time (R/W) Interrupt coalescing timer period in microseconds. Set to 0 to disable. |