spdk_top: In CORES tab, spdk_top can't collect the right poller count under certain conditions.
spdk_top can't collect the right poller count when thread count is more than core count. Max index of g_threads_info[] should be thread count NOT cores count. Signed-off-by: YafeiWangAlice <yafei.wang@samsung.com> Change-Id: Iff95fb1aa7f84626a559741ad135a2cbeed04f90 Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/13574 Community-CI: Mellanox Build Bot Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com> Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Reviewed-by: Changpeng Liu <changpeng.liu@intel.com> Reviewed-by: Paul Luse <paul.e.luse@intel.com> Reviewed-by: Krzysztof Karas <krzysztof.karas@intel.com> Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
This commit is contained in:
parent
62378c24be
commit
d89e62e7ef
@ -1027,14 +1027,6 @@ get_cores_data(void)
|
||||
cores_info[i].last_busy = g_cores_info[j].busy;
|
||||
cores_info[i].last_idle = g_cores_info[j].idle;
|
||||
}
|
||||
/* Do not consider threads which changed cores when issuing
|
||||
* RPCs to get_core_data and get_thread_data and threads
|
||||
* not currently assigned to this core. */
|
||||
if ((int)cores_info[i].lcore == g_threads_info[j].core_num) {
|
||||
cores_info[i].pollers_count += g_threads_info[j].active_pollers_count +
|
||||
g_threads_info[j].timed_pollers_count +
|
||||
g_threads_info[j].paused_pollers_count;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -1053,6 +1045,12 @@ get_cores_data(void)
|
||||
for (k = 0; k < g_last_threads_count; k++) {
|
||||
if (core_info->threads.thread[j].id == g_threads_info[k].id) {
|
||||
g_threads_info[k].core_num = core_info->lcore;
|
||||
/* Do not consider threads which changed cores when issuing
|
||||
* RPCs to get_core_data and get_thread_data and threads
|
||||
* not currently assigned to this core. */
|
||||
core_info->pollers_count += g_threads_info[k].active_pollers_count +
|
||||
g_threads_info[k].timed_pollers_count +
|
||||
g_threads_info[k].paused_pollers_count;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user