scheduler: copy snapshot of thread stats to new spdk_lw_thread field
This will be used by a scheduler while balancing threads to get information how much busy a thread is. Signed-off-by: Maciej Szwed <maciej.szwed@intel.com> Change-Id: Ib0e897a9bb5d2a71173f60cce7e1d442e67a57f9 Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/5253 Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Community-CI: Mellanox Build Bot Reviewed-by: Jim Harris <james.r.harris@intel.com> Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com> Reviewed-by: Paul Luse <paul.e.luse@intel.com> Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
This commit is contained in:
parent
75022aa205
commit
584fb373eb
@ -66,7 +66,8 @@ struct spdk_lw_thread {
|
||||
uint32_t lcore;
|
||||
uint32_t new_lcore;
|
||||
bool resched;
|
||||
struct spdk_thread_stats current_stats;
|
||||
struct spdk_thread_stats current_stats;
|
||||
struct spdk_thread_stats snapshot_stats;
|
||||
};
|
||||
|
||||
struct spdk_reactor {
|
||||
|
@ -581,6 +581,7 @@ _reactors_scheduler_gather_metrics(void *arg1, void *arg2)
|
||||
i = 0;
|
||||
TAILQ_FOREACH(lw_thread, &reactor->threads, link) {
|
||||
core_info->threads[i] = lw_thread;
|
||||
_spdk_lw_thread_get_current_stats(lw_thread, &lw_thread->snapshot_stats);
|
||||
i++;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user