Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F107806235
D32212.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
2 KB
Referenced Files
None
Subscribers
None
D32212.diff
View Options
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
@@ -195,6 +195,7 @@
int64_t num_intr_handler_calls;
int64_t num_retries;
int64_t num_failures;
+ int64_t num_ignored;
struct nvme_command *cmd;
struct nvme_completion *cpl;
diff --git a/sys/dev/nvme/nvme_qpair.c b/sys/dev/nvme/nvme_qpair.c
--- a/sys/dev/nvme/nvme_qpair.c
+++ b/sys/dev/nvme/nvme_qpair.c
@@ -544,8 +544,10 @@
* as soon as initialization is complete and we start sending commands
* to the device.
*/
- if (qpair->recovery_state != RECOVERY_NONE)
+ if (qpair->recovery_state != RECOVERY_NONE) {
+ qpair->num_ignored++;
return (false);
+ }
/*
* Sanity check initialization. After we reset the hardware, the phase
@@ -746,6 +748,7 @@
qpair->num_intr_handler_calls = 0;
qpair->num_retries = 0;
qpair->num_failures = 0;
+ qpair->num_ignored = 0;
qpair->cmd = (struct nvme_command *)queuemem;
qpair->cpl = (struct nvme_completion *)(queuemem + cmdsz);
prpmem = (uint8_t *)(queuemem + cmdsz + cplsz);
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
@@ -164,6 +164,7 @@
qpair->num_intr_handler_calls = 1;
qpair->num_retries = 0;
qpair->num_failures = 0;
+ qpair->num_ignored = 0;
}
static int
@@ -226,6 +227,21 @@
return (sysctl_handle_64(oidp, &num_failures, 0, req));
}
+static int
+nvme_sysctl_num_ignored(SYSCTL_HANDLER_ARGS)
+{
+ struct nvme_controller *ctrlr = arg1;
+ int64_t num_ignored = 0;
+ int i;
+
+ num_ignored = ctrlr->adminq.num_ignored;
+
+ for (i = 0; i < ctrlr->num_io_queues; i++)
+ num_ignored += ctrlr->ioq[i].num_ignored;
+
+ return (sysctl_handle_64(oidp, &num_ignored, 0, req));
+}
+
static int
nvme_sysctl_reset_stats(SYSCTL_HANDLER_ARGS)
{
@@ -281,6 +297,9 @@
SYSCTL_ADD_QUAD(ctrlr_ctx, que_list, OID_AUTO, "num_failures",
CTLFLAG_RD, &qpair->num_failures,
"Number of commands ending in failure after all retries");
+ SYSCTL_ADD_QUAD(ctrlr_ctx, que_list, OID_AUTO, "num_ignored",
+ CTLFLAG_RD, &qpair->num_ignored,
+ "Number of interrupts posted, but were administratively ignored");
SYSCTL_ADD_PROC(ctrlr_ctx, que_list, OID_AUTO,
"dump_debug", CTLTYPE_UINT | CTLFLAG_RW | CTLFLAG_MPSAFE,
@@ -344,6 +363,11 @@
ctrlr, 0, nvme_sysctl_num_failures, "IU",
"Number of commands ending in failure after all retries");
+ SYSCTL_ADD_PROC(ctrlr_ctx, ctrlr_list, OID_AUTO,
+ "num_ignored", CTLTYPE_S64 | CTLFLAG_RD | CTLFLAG_MPSAFE,
+ ctrlr, 0, nvme_sysctl_num_ignored, "IU",
+ "Number of interrupts ignored administratively");
+
SYSCTL_ADD_PROC(ctrlr_ctx, ctrlr_list, OID_AUTO,
"reset_stats", CTLTYPE_UINT | CTLFLAG_RW | CTLFLAG_MPSAFE, ctrlr,
0, nvme_sysctl_reset_stats, "IU", "Reset statistics to zero");
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sun, Jan 19, 8:05 AM (21 h, 16 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
15936107
Default Alt Text
D32212.diff (2 KB)
Attached To
Mode
D32212: nvme: count number of ignored interrupts
Attached
Detach File
Event Timeline
Log In to Comment