Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F163408190
D52112.id160791.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D52112.id160791.diff
View Options
diff --git a/sys/dev/nvme/nvme_ctrlr.c b/sys/dev/nvme/nvme_ctrlr.c
--- a/sys/dev/nvme/nvme_ctrlr.c
+++ b/sys/dev/nvme/nvme_ctrlr.c
@@ -1308,7 +1308,8 @@
if (is_user_buffer) {
buf = uma_zalloc(pbuf_zone, M_WAITOK);
buf->b_iocmd = pt->is_read ? BIO_READ : BIO_WRITE;
- if (vmapbuf(buf, pt->buf, pt->len, 1) < 0) {
+ if (vmapbuf(buf, pt->buf, pt->len,
+ nvme_unmapped_ioctl) < 0) {
ret = EFAULT;
goto err;
}
@@ -1405,7 +1406,7 @@
buf = uma_zalloc(pbuf_zone, M_WAITOK);
buf->b_iocmd = npc->opcode & 1 ? BIO_WRITE : BIO_READ;
if (vmapbuf(buf, (void *)(uintptr_t)npc->addr,
- npc->data_len, 1) < 0) {
+ npc->data_len, nvme_unmapped_ioctl) < 0) {
ret = EFAULT;
goto err;
}
diff --git a/sys/dev/nvme/nvme_private.h b/sys/dev/nvme/nvme_private.h
--- a/sys/dev/nvme/nvme_private.h
+++ b/sys/dev/nvme/nvme_private.h
@@ -101,6 +101,7 @@
extern int32_t nvme_retry_count;
extern bool nvme_verbose_cmd_dump;
+extern bool nvme_unmapped_ioctl;
struct nvme_completion_poll_status {
struct nvme_completion cpl;
diff --git a/sys/dev/nvme/nvme_sysctl.c b/sys/dev/nvme/nvme_sysctl.c
--- a/sys/dev/nvme/nvme_sysctl.c
+++ b/sys/dev/nvme/nvme_sysctl.c
@@ -42,6 +42,7 @@
int nvme_use_nvd = NVME_USE_NVD;
bool nvme_verbose_cmd_dump = false;
+bool nvme_unmapped_ioctl = true;
SYSCTL_NODE(_hw, OID_AUTO, nvme, CTLFLAG_RD | CTLFLAG_MPSAFE, 0,
"NVMe sysctl tunables");
@@ -49,7 +50,10 @@
&nvme_use_nvd, 1, "1 = Create NVD devices, 0 = Create NDA devices");
SYSCTL_BOOL(_hw_nvme, OID_AUTO, verbose_cmd_dump, CTLFLAG_RWTUN,
&nvme_verbose_cmd_dump, 0,
- "enable verbose command printing when a command fails");
+ "Enable verbose command printing when a command fails");
+SYSCTL_BOOL(_hw_nvme, OID_AUTO, unmapped_ioctl, CTLFLAG_RWTUN,
+ &nvme_unmapped_ioctl, 0,
+ "Try to use unampped I/O for data transfers for passthru commands");
static void
nvme_dump_queue(struct nvme_qpair *qpair)
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Thu, Jul 23, 11:00 PM (3 h, 36 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
35418838
Default Alt Text
D52112.id160791.diff (1 KB)
Attached To
Mode
D52112: nvme: Switch to using unmapped pages for passthrough data transfer
Attached
Detach File
Event Timeline
Log In to Comment