nvmf: add completed_nvme_io to nvmf_poll_group_stat
Basic IO completion counting can be done at the common layer, to enable some level of stat tracking even for transports that don't have transport-specific tracking yet. Signed-off-by: Jim Harris <james.r.harris@intel.com> Change-Id: If04f854b97440089b8ad149b64cb59173c73975c Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/15912 Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Reviewed-by: Aleksey Marchuk <alexeymar@nvidia.com> Reviewed-by: Shuhei Matsumoto <smatsumoto@nvidia.com> Community-CI: Mellanox Build Bot
This commit is contained in:
parent
fe24da164a
commit
e39512ec18
@ -128,6 +128,8 @@ struct spdk_nvmf_poll_group_stat {
|
||||
/* current io qpair count */
|
||||
uint32_t current_io_qpairs;
|
||||
uint64_t pending_bdev_io;
|
||||
/* NVMe IO commands completed (excludes admin commands) */
|
||||
uint64_t completed_nvme_io;
|
||||
};
|
||||
|
||||
/**
|
||||
|
@ -4137,6 +4137,9 @@ _nvmf_request_complete(void *ctx)
|
||||
sgroup = &qpair->group->sgroups[qpair->ctrlr->subsys->id];
|
||||
assert(sgroup != NULL);
|
||||
is_aer = req->cmd->nvme_cmd.opc == SPDK_NVME_OPC_ASYNC_EVENT_REQUEST;
|
||||
if (spdk_likely(qpair->qid != 0)) {
|
||||
qpair->group->stat.completed_nvme_io++;
|
||||
}
|
||||
|
||||
/*
|
||||
* Set the crd value.
|
||||
|
@ -1676,6 +1676,7 @@ spdk_nvmf_poll_group_dump_stat(struct spdk_nvmf_poll_group *group, struct spdk_j
|
||||
spdk_json_write_named_uint32(w, "current_admin_qpairs", group->stat.current_admin_qpairs);
|
||||
spdk_json_write_named_uint32(w, "current_io_qpairs", group->stat.current_io_qpairs);
|
||||
spdk_json_write_named_uint64(w, "pending_bdev_io", group->stat.pending_bdev_io);
|
||||
spdk_json_write_named_uint64(w, "completed_nvme_io", group->stat.completed_nvme_io);
|
||||
|
||||
spdk_json_write_named_array_begin(w, "transports");
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user