| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
| |
Now that we've moved to newbus methods, we can delete this...
Sponsored by: Netflix
Reviewed by: dab
Differential Revision: https://reviews.freebsd.org/D54095
|
| |
|
|
|
|
|
|
| |
Conenct methods to manage namespaces explicitly to replace the old
consumer interface.
Sponsored by: Netflix
Differential Revision: https://reviews.freebsd.org/D51388
|
| |
|
|
|
|
|
|
|
|
|
| |
Rather than registering as a consumer of the nvme controller, hook into
the child device and use that.
This is a small regression at the moment: we don't fail the device when
that happens at runtime.
Sponsored by: Netflix
Differential Revision: https://reviews.freebsd.org/D51385
|
| |
|
|
|
|
|
| |
NVME_NS_ADDED will conflict with a later change, so change it here.
Likewise NVME_NS_CHANGED.
Sponsored by: Netflix
|
| |
|
|
|
|
|
| |
Signal the new media size when the namespace changes size.
Reviewed by: imp
Differential Revision: https://reviews.freebsd.org/D33032
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Apply the following automated changes to try to eliminate
no-longer-needed sys/cdefs.h includes as well as now-empty
blank lines in a row.
Remove /^#if.*\n#endif.*\n#include\s+<sys/cdefs.h>.*\n/
Remove /\n+#include\s+<sys/cdefs.h>.*\n+#if.*\n#endif.*\n+/
Remove /\n+#if.*\n#endif.*\n+/
Remove /^#if.*\n#endif.*\n/
Remove /\n+#include\s+<sys/cdefs.h>\n#include\s+<sys/types.h>/
Remove /\n+#include\s+<sys/cdefs.h>\n#include\s+<sys/param.h>/
Remove /\n+#include\s+<sys/cdefs.h>\n#include\s+<sys/capsicum.h>/
Sponsored by: Netflix
|
| |
|
|
|
| |
This allows to list only NVMe devices in systat, iostat, vmstat, etc.
Previously those were counted as OTHER.
|
| |
|
|
| |
Remove /^[\s*]*__FBSDID\("\$FreeBSD\$"\);?\s*\n/
|
| |
|
|
|
|
|
|
|
| |
The SPDX folks have obsoleted the BSD-2-Clause-FreeBSD identifier. Catch
up to that fact and revert to their recommended match of BSD-2-Clause.
Discussed with: pfg
MFC After: 3 days
Sponsored by: Netflix
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
With clang 15, the following -Werror warnings are produced:
sys/dev/nvd/nvd.c:150:9: error: a function declaration without a prototype is deprecated in all versions of C [-Werror,-Wstrict-prototypes]
nvd_load()
^
void
sys/dev/nvd/nvd.c:166:11: error: a function declaration without a prototype is deprecated in all versions of C [-Werror,-Wstrict-prototypes]
nvd_unload()
^
void
This is because nvd_load() and nvd_unload() are declared with a (void)
argument list, but defined with an empty argument list. Make the
definitions match the declarations.
MFC after: 3 days
|
| |
|
|
|
|
|
|
|
|
|
| |
The physical address argument is essentially ignored by every dumper
method. In addition, the dump routines don't actually pass a real
address; every call to dump_append() passes a value of zero for
physical.
Reviewed by: markj
MFC after: 2 weeks
Differential Revision: https://reviews.freebsd.org/D35173
|
| |
|
|
|
|
|
|
|
|
|
|
| |
When an NVME device is attached via a AHCI controller, we have no access
to its config space. So instead of information about the nvme drive
itself, return info about the AHCI controller as the next best
thing. Since the Intel Hardware RAID support looks at these values, this
likely is best.
Sponsored by: Netflix
Reviewed by: mav
Differential Revision: https://reviews.freebsd.org/D33286
|
| |
|
|
| |
Notes:
svn path=/head/; revision=365190
|
| |
|
|
|
|
|
| |
MFC after: 1 week
Notes:
svn path=/head/; revision=364177
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
r357614 added CTLFLAG_NEEDGIANT to make it easier to find nodes that are
still not MPSAFE (or already are but aren’t properly marked).
Use it in preparation for a general review of all nodes.
This is non-functional change that adds annotations to SYSCTL_NODE and
SYSCTL_PROC nodes using one of the soon-to-be-required flags.
Mark all obvious cases as MPSAFE. All entries that haven't been marked
as MPSAFE before are by default marked as NEEDGIANT
Approved by: kib (mentor, blanket)
Commented by: kib, gallatin, melifaro
Differential Revision: https://reviews.freebsd.org/D23718
Notes:
svn path=/head/; revision=358333
|
| |
|
|
|
|
|
|
|
| |
Surprisingly code still worked, but thanks imp@ for noticing it.
MFC after: 1 week
Notes:
svn path=/head/; revision=351006
|
| |
|
|
|
|
|
|
|
|
|
| |
With support for multiple namespaces and multiple ports in NVMe there is
now a need for reliable unique namespace identification alike to SCSI.
MFC after: 1 weeks
Sponsored by: iXsystems, Inc.
Notes:
svn path=/head/; revision=351004
|
| |
|
|
|
|
|
| |
MFC after: 3 days
Notes:
svn path=/head/; revision=350961
|
| |
|
|
|
|
|
| |
MFC after: 2 weeks
Notes:
svn path=/head/; revision=343563
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This fixes BIO_ORDERED semantics while also improving performance by:
- sleeping also before BIO_ORDERED bio, as defined, not only after;
- not queueing BIO_ORDERED bio to taskqueue if no other bios running;
- waking up sleeping taskqueue explicitly rather then rely on polling.
On Samsung SSD 970 PRO this shows sync write latency, measured with
`diskinfo -wS`, reduction from ~2ms to ~1.1ms by not sleeping without
reason till next HZ tick.
On the same device ZFS pool with 8 ZVOLs synchronously writing 4KB blocks
shows ~950 IOPS instead of ~750 IOPS before. I suspect ZFS does not need
BIO_ORDERED on BIO_FLUSH at all, but that will be next question.
MFC after: 2 weeks
Sponsored by: iXsystems, Inc.
Notes:
svn path=/head/; revision=343562
|
| |
|
|
|
|
|
|
| |
Reported by: rgrimes
MFC after: 1 month
Notes:
svn path=/head/; revision=342559
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Previous code typically crashed in case of NVMe device unplug or even clean
detach while some I/Os are still in flight. To fix this the new code calls
disk_gone() and waits for confirmation of all references gone before calling
disk_destroy(), freeing other resources and allowing controller detach.
While there, fix disk lists locking and reimplement unit numbers assignment.
MFC after: 1 month
Sponsored by: iXsystems, Inc.
Notes:
svn path=/head/; revision=342557
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Mainly focus on files that use BSD 2-Clause license, however the tool I
was using misidentified many licenses so this was mostly a manual - error
prone - task.
The Software Package Data Exchange (SPDX) group provides a specification
to make it easier for automated tools to detect and summarize well known
opensource licenses. We are gradually adopting the specification, noting
that the tags are considered only advisory and do not, in any way,
superceed or replace the license texts.
Notes:
svn path=/head/; revision=326255
|
| |
|
|
|
|
|
|
|
|
|
|
| |
Introduce hw.nvme.use_nvd tunable. This tunable allows both nvd and
nda to be installed in the kernel, while allowing only one of them to
create devices. This is an all-or-nothing setting, and you can't
change it after boot-time. However, it will allow easier A/B testing.
Differential Revision: https://reviews.freebsd.org/D11825
Notes:
svn path=/head/; revision=322036
|
| |
|
|
|
|
|
|
|
| |
While doing it, introduce respective constants in geom_disk.h.
MFC after: 1 week
Notes:
svn path=/head/; revision=311971
|
| |
|
|
| |
Notes:
svn path=/head/; revision=303042
|
| |
|
|
|
|
|
|
|
|
|
|
| |
logic. Switch to a 5us delay since most NVME devices can easily do 200,000
iops.
Submitted by: imp
MFC after: 3 days
Sponsored by: Netflix, Inc.
Notes:
svn path=/head/; revision=303040
|
| |
|
|
|
|
|
|
| |
MFC after: 3 days
Sponsored by: Netflix, Inc.
Notes:
svn path=/head/; revision=303017
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
I believe that this patch handled the problem from the wrong side.
Instead of making ZFS properly handle large stripe sizes, it made
unrelated driver to lie in reported parameters to workaround that.
Alternative solution for this problem from ZFS side was committed at
r296615.
Discussed with: smh
Notes:
svn path=/head/; revision=296617
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The NVMe specification does not define a maximum or optimal delete
size, so technically max delete size is min(full size of namespace,
2^32 - 1 LBAs). A single delete operation for a multi-TB NVMe
namespace though may take much longer to complete than the nvme(4)
I/O timeout period. So choose a sensible default here that is still
suitably large to minimize the number of overall delete operations.
This also fixes possible uint32_t overflow on initial TRIM operation
for zpool create operations for NVMe namespaces with >4G LBAs.
MFC after: 3 days
Sponsored by: Intel
Notes:
svn path=/head/; revision=295022
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
This significantly improves parallelism in the most common case.
The taskqueue is still used whenever BIO_ORDERED bios are in flight.
This patch is based heavily on a patch from gallatin@.
MFC after: 3 days
Sponsored by: Intel
Notes:
svn path=/head/; revision=293323
|
| |
|
|
|
|
|
|
|
|
|
| |
This enables a future patch using this same logic to submit
I/O directly bypassing the taskqueue.
MFC after: 3 days
Sponsored by: Intel
Notes:
svn path=/head/; revision=293322
|
| |
|
|
|
|
|
|
|
|
|
|
| |
This ensures the bio flags are not read after biodone().
The ordering will still be enforced, after the bio is
submitted successfully.
MFC after: 3 days
Sponsored by: Intel
Notes:
svn path=/head/; revision=293321
|
| |
|
|
|
|
|
|
|
|
|
| |
Still wait until all in-flight bios (including the ordered bio)
complete before processing more bios from the queue.
MFC after: 3 days
Sponsored by: Intel
Notes:
svn path=/head/; revision=293320
|
| |
|
|
|
|
|
|
| |
Submitted by: gallatin
MFC after: 3 days
Notes:
svn path=/head/; revision=293319
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Intel NVMe controllers have a slow path for I/Os that span a 128KB stripe boundary but ZFS limits ashift, which is derived from d_stripesize, to 13 (8KB) so we limit the stripesize reported to geom(8) to 4KB.
This may result in a small number of additional I/Os to require splitting in nvme(4), however the NVMe I/O path is very efficient so these additional I/Os will cause very minimal (if any) difference in performance or CPU utilisation.
This can be controller by the new sysctl kern.nvme.max_optimal_sectorsize.
MFC after: 1 week
Sponsored by: Multiplay
Differential Revision: https://reviews.freebsd.org/D4446
Notes:
svn path=/head/; revision=292074
|
| |
|
|
|
|
|
|
| |
MFC after: 3 days
Sponsored by: Intel
Notes:
svn path=/head/; revision=290199
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The NVMe specification has no ability to specify a maximum delete size
that is less than the full capacity of the namespace - so just using the
namespace size is the correct value here.
This fixes reported issues where ZFS trim on init looked like it was
hanging the system - previously the default I/O max size (128KB on
Intel NVMe controllers) was used for delete operations which worked out
to only about 8MB/s. With this patch I can add an 800GB DC P3700
drive to a ZFS pool in about 15-20 seconds.
Reported by: Dylan Just <dylan@techtangents.com>
MFC after: 3 days
Sponsored by: Intel
Notes:
svn path=/head/; revision=285767
|
| |
|
|
|
|
|
|
|
|
|
|
| |
benefit from it.
Sponsored by: Intel
Reviewed by: kib (earlier version), carl
Approved by: re (hrs)
MFC after: 1 week
Notes:
svn path=/head/; revision=256151
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
As part of this commit, add an nvme_strvis() function which borrows
heavily from cam_strvis(). This will allow stripping of
leading/trailing whitespace and also handle unprintable characters
in model/serial numbers. This function goes into a new nvme_util.c
file which is used by both the driver and nvmecontrol.
Sponsored by: Intel
Reviewed by: carl
MFC after: 3 days
Notes:
svn path=/head/; revision=253476
|
| |
|
|
|
|
|
|
|
|
|
| |
internal disk structure.
Sponsored by: Intel
Reviewed by: carl
MFC after: 3 days
Notes:
svn path=/head/; revision=253473
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
and firmware revision in the controller's identify structure.
Also modify consumers of these fields to ensure they only use the
specified number of bytes for their respective fields.
Sponsored by: Intel
Reviewed by: carl
MFC after: 3 days
Notes:
svn path=/head/; revision=253437
|
| |
|
|
|
|
|
| |
MFC after: 3 days
Notes:
svn path=/head/; revision=253112
|
| |
|
|
|
|
|
| |
Sponsored by: Intel
Notes:
svn path=/head/; revision=248977
|
| |
|
|
|
|
|
|
|
|
|
| |
M_NOWAIT.
Sponsored by: Intel
Suggested by: carl
Reviewed by: carl
Notes:
svn path=/head/; revision=248770
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
start or reset. Also add a notifier for NVMe consumers for controller fail
conditions and plumb this notifier for nvd(4) to destroy the associated
GEOM disks when a failure occurs.
This requires a bit of work to cover the races when a consumer is sending
I/O requests to a controller that is transitioning to the failed state. To
help cover this condition, add a task to defer completion of I/Os submitted
to a failed controller, so that the consumer will still always receive its
completions in a different context than the submission.
Sponsored by: Intel
Reviewed by: carl
Notes:
svn path=/head/; revision=248767
|
| |
|
|
|
|
|
|
|
|
| |
Also have nvd maintain controller/namespace relationships internally.
Sponsored by: Intel
Reviewed by: carl
Notes:
svn path=/head/; revision=248765
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
NVMe error log entries include status, so breaking this out into
its own data structure allows it to be included in both the
nvme_completion data structure as well as error log entry data
structures.
While here, expose nvme_completion_is_error(), and change all of
the places that were explicitly looking at sc/sct bits to use this
macro instead.
Sponsored by: Intel
Reviewed by: carl
Notes:
svn path=/head/; revision=248756
|
| |
|
|
|
|
|
|
|
| |
notifications when new nvme controllers are added to the system.
Sponsored by: Intel
Notes:
svn path=/head/; revision=248738
|
| |
|
|
|
|
|
|
|
|
|
|
| |
This eliminates the need to manage queue depth at the nvd(4) level for
Chatham prototype board workarounds, and also adds the ability to
accept a number of requests on a single qpair that is much larger
than the number of trackers allocated.
Sponsored by: Intel
Notes:
svn path=/head/; revision=241665
|