nvmf/rdma: Add new statistic to count idle polls
This statistic is incremented when we don't reap anything from the CQ. Together with the total number of polls it can be useful to estimate idle percentage. Change-Id: I61b51d049b0bc506fb8a896e225187e46e75a564 Signed-off-by: Alexey Marchuk <alexeymar@mellanox.com> Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6295 Community-CI: Broadcom CI Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Reviewed-by: Ben Walker <benjamin.walker@intel.com> Reviewed-by: Jim Harris <james.r.harris@intel.com>
This commit is contained in:
parent
36ac75b94c
commit
3caf2e710f
@ -127,6 +127,7 @@ struct spdk_nvmf_poll_group_stat {
|
|||||||
struct spdk_nvmf_rdma_device_stat {
|
struct spdk_nvmf_rdma_device_stat {
|
||||||
const char *name;
|
const char *name;
|
||||||
uint64_t polls;
|
uint64_t polls;
|
||||||
|
uint64_t idle_polls;
|
||||||
uint64_t completions;
|
uint64_t completions;
|
||||||
uint64_t requests;
|
uint64_t requests;
|
||||||
uint64_t request_latency;
|
uint64_t request_latency;
|
||||||
|
@ -2052,6 +2052,7 @@ write_nvmf_transport_stats(struct spdk_json_write_ctx *w,
|
|||||||
spdk_json_write_object_begin(w);
|
spdk_json_write_object_begin(w);
|
||||||
spdk_json_write_named_string(w, "name", stat->rdma.devices[i].name);
|
spdk_json_write_named_string(w, "name", stat->rdma.devices[i].name);
|
||||||
spdk_json_write_named_uint64(w, "polls", stat->rdma.devices[i].polls);
|
spdk_json_write_named_uint64(w, "polls", stat->rdma.devices[i].polls);
|
||||||
|
spdk_json_write_named_uint64(w, "idle_polls", stat->rdma.devices[i].idle_polls);
|
||||||
spdk_json_write_named_uint64(w, "completions", stat->rdma.devices[i].completions);
|
spdk_json_write_named_uint64(w, "completions", stat->rdma.devices[i].completions);
|
||||||
spdk_json_write_named_uint64(w, "requests",
|
spdk_json_write_named_uint64(w, "requests",
|
||||||
stat->rdma.devices[i].requests);
|
stat->rdma.devices[i].requests);
|
||||||
|
@ -395,6 +395,7 @@ struct spdk_nvmf_rdma_qpair {
|
|||||||
struct spdk_nvmf_rdma_poller_stat {
|
struct spdk_nvmf_rdma_poller_stat {
|
||||||
uint64_t completions;
|
uint64_t completions;
|
||||||
uint64_t polls;
|
uint64_t polls;
|
||||||
|
uint64_t idle_polls;
|
||||||
uint64_t requests;
|
uint64_t requests;
|
||||||
uint64_t request_latency;
|
uint64_t request_latency;
|
||||||
uint64_t pending_free_request;
|
uint64_t pending_free_request;
|
||||||
@ -3789,6 +3790,8 @@ nvmf_rdma_poller_poll(struct spdk_nvmf_rdma_transport *rtransport,
|
|||||||
SPDK_ERRLOG("Error polling CQ! (%d): %s\n",
|
SPDK_ERRLOG("Error polling CQ! (%d): %s\n",
|
||||||
errno, spdk_strerror(errno));
|
errno, spdk_strerror(errno));
|
||||||
return -1;
|
return -1;
|
||||||
|
} else if (reaped == 0) {
|
||||||
|
rpoller->stat.idle_polls++;
|
||||||
}
|
}
|
||||||
|
|
||||||
rpoller->stat.polls++;
|
rpoller->stat.polls++;
|
||||||
@ -4194,6 +4197,7 @@ nvmf_rdma_poll_group_get_stat(struct spdk_nvmf_tgt *tgt,
|
|||||||
device_stat = &(*stat)->rdma.devices[num_devices++];
|
device_stat = &(*stat)->rdma.devices[num_devices++];
|
||||||
device_stat->name = ibv_get_device_name(rpoller->device->context->device);
|
device_stat->name = ibv_get_device_name(rpoller->device->context->device);
|
||||||
device_stat->polls = rpoller->stat.polls;
|
device_stat->polls = rpoller->stat.polls;
|
||||||
|
device_stat->idle_polls = rpoller->stat.idle_polls;
|
||||||
device_stat->completions = rpoller->stat.completions;
|
device_stat->completions = rpoller->stat.completions;
|
||||||
device_stat->requests = rpoller->stat.requests;
|
device_stat->requests = rpoller->stat.requests;
|
||||||
device_stat->request_latency = rpoller->stat.request_latency;
|
device_stat->request_latency = rpoller->stat.request_latency;
|
||||||
|
Loading…
Reference in New Issue
Block a user