numam-spdk/app
Krzysztof Karas 7dc38f83f7 spdk_top: reduce number of global thread data structures
Deletes g_thread_history and g_thread_info to use g_threads_stats
across the whole application to simplify spdk_top code.
Now instead of separate struct, fields last_busy and last_idle are
being used.

get_data() function now uses local structure to get RPC data instead
of filling global one. This has been changed so that g_threads_stats
keeps its last_busy and last_idle fields unchanged.
free_rpc_threads_stats has been moved down so that in future patches,
when multithreading is implemented, there is no need to lock
g_threads_stats during RPC call.

Changes places of allocation/deallocation of g_threads_stats, since
we want to save last_idle and last_busy fields instead of zeroing them
out each application loop.

Changes show_thread() function to use local copy of threads array
instead of pointers to global struct. This is for the convenience
in the future patches implementing multithreading to avoid the need
to lock the global struct for details display.

Signed-off-by: Krzysztof Karas <krzysztof.karas@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/7587 (master)

(cherry picked from commit 081a4a0943)
Change-Id: I0dc87eac4c1b89fa16f14f5387d94ee176dfdf43
Signed-off-by: Krzysztof Karas <krzysztof.karas@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/8110
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2021-06-04 22:52:37 +00:00
..
iscsi_tgt build: use DEPDIRS variables to build SPDK_LIB_LIST 2020-12-18 09:40:01 +00:00
iscsi_top build: use DEPDIRS variables to build SPDK_LIB_LIST 2020-12-18 09:40:01 +00:00
nvmf_tgt build: add ufc to SYS_LIBS in spdk.common.mk 2020-12-28 13:32:06 +00:00
spdk_dd include: remove util.h include from queue_extras.h 2021-04-14 07:25:21 +00:00
spdk_lspci mk: Fix mlx5_dv linkage 2020-12-28 13:21:36 +00:00
spdk_tgt build: add ufc to SYS_LIBS in spdk.common.mk 2020-12-28 13:32:06 +00:00
spdk_top spdk_top: reduce number of global thread data structures 2021-06-04 22:52:37 +00:00
trace mk: don't link env if not needed 2020-09-07 09:28:39 +00:00
trace_record app/trace_record: modify help case to return 0 2021-02-26 11:50:58 +00:00
vhost build: use DEPDIRS variables to build SPDK_LIB_LIST 2020-12-18 09:40:01 +00:00
Makefile app: exclude spdk_top from mingw cross builds 2021-03-03 08:16:54 +00:00