thread: Update thread->last_tsc at the start of polling

It may have been a long time since the thread last executed
so ensure this time is accurate.

Signed-off-by: Ben Walker <benjamin.walker@intel.com>
Change-Id: Iaa4c35b50cdc05ebb41724ed9946c5232d242ee3
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4321
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
This commit is contained in:
Ben Walker 2020-09-18 13:10:49 -07:00 committed by Tomasz Zawadzki
parent c99e1d60d3
commit aa6b6f081d

View File

@ -572,6 +572,8 @@ thread_poll(struct spdk_thread *thread, uint32_t max_msgs, uint64_t now)
spdk_msg_fn critical_msg;
int rc = 0;
thread->tsc_last = now;
critical_msg = thread->critical_msg;
if (spdk_unlikely(critical_msg != NULL)) {
critical_msg(NULL);