lib/event: update lw_thread->lcore after thread move
lw_thread->lcore was set during gather_metrics, rather than just after the thread reschedule. This patch just moves it to the right place. Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com> Change-Id: I0477830902f68102e4e4f0ffc9359bd004a8ad42 Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/7961 Reviewed-by: Jim Harris <james.r.harris@intel.com> Reviewed-by: Paul Luse <paul.e.luse@intel.com> Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com> Reviewed-by: Ben Walker <benjamin.walker@intel.com> Reviewed-by: Konrad Sztyber <konrad.sztyber@intel.com> Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Community-CI: Mellanox Build Bot
This commit is contained in:
parent
d9f5da13e4
commit
18667806ca
@ -679,8 +679,6 @@ _init_thread_stats(struct spdk_reactor *reactor, struct spdk_lw_thread *lw_threa
|
||||
/* Read total_stats before updating it to calculate stats during the last scheduling period. */
|
||||
prev_total_stats = lw_thread->total_stats;
|
||||
|
||||
lw_thread->lcore = reactor->lcore;
|
||||
|
||||
spdk_set_thread(thread);
|
||||
spdk_thread_get_stats(&lw_thread->total_stats);
|
||||
spdk_set_thread(NULL);
|
||||
@ -1155,6 +1153,8 @@ _schedule_thread(void *arg1, void *arg2)
|
||||
spdk_thread_get_stats(&lw_thread->total_stats);
|
||||
spdk_set_thread(NULL);
|
||||
|
||||
lw_thread->lcore = current_core;
|
||||
|
||||
TAILQ_INSERT_TAIL(&reactor->threads, lw_thread, link);
|
||||
reactor->thread_count++;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user