aboutsummaryrefslogtreecommitdiffstats
path: root/sys/cam/nvme/nvme_da.c
diff options
context:
space:
mode:
authorWarner Losh <imp@FreeBSD.org>2018-02-22 05:43:55 +0000
committerWarner Losh <imp@FreeBSD.org>2018-02-22 05:43:55 +0000
commitc5fe3ae9b8a3dc44742bd32bca2b28ac3308d70a (patch)
tree282f3f33055955c87ca640aaa7dbba3faf100683 /sys/cam/nvme/nvme_da.c
parentc9878d6d63e5888378bb50e3016da0fb7ccb344d (diff)
downloadsrc-c5fe3ae9b8a3dc44742bd32bca2b28ac3308d70a.tar.gz
src-c5fe3ae9b8a3dc44742bd32bca2b28ac3308d70a.zip
Introduce capacity flags for periphs
Introduce flags word to describe the capacities of the peripheral. First bit will describe if the periph driver allows multiple outstanding TRIMS to be active in a device. Modify the I/O scheduler so that the nda driver can queue trims for a while after the first one arrives. We'll queue until we see a I/O scheduler tick, then we'll schedule as many TRIMs as allowed by other factors (currently this is slocts in the NVMe controller). This mariginally helps the read latency issues we see with reads, but sets the stage for the nda driver to do TRIM collapsing like the da and ada drivers do today. Sponsored by: Netflix
Notes
Notes: svn path=/head/; revision=329815
Diffstat (limited to 'sys/cam/nvme/nvme_da.c')
-rw-r--r--sys/cam/nvme/nvme_da.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/sys/cam/nvme/nvme_da.c b/sys/cam/nvme/nvme_da.c
index 1afe840b733e..4ff1d36c5419 100644
--- a/sys/cam/nvme/nvme_da.c
+++ b/sys/cam/nvme/nvme_da.c
@@ -691,7 +691,8 @@ ndaregister(struct cam_periph *periph, void *arg)
return(CAM_REQ_CMP_ERR);
}
- if (cam_iosched_init(&softc->cam_iosched, periph) != 0) {
+ if (cam_iosched_init(&softc->cam_iosched, periph,
+ CAM_IOSCHED_CAP_TRIM_CLOCKED) != 0) {
printf("ndaregister: Unable to probe new device. "
"Unable to allocate iosched memory\n");
return(CAM_REQ_CMP_ERR);