From 3690dbbd2e6a788758372563d7b94dfd5bd4507e Mon Sep 17 00:00:00 2001 From: Liu Xiaodong Date: Fri, 5 Mar 2021 07:41:59 -0500 Subject: [PATCH] thread: remove redundant set_thread in intr thread_interrupt_msg_process is registered to thread's fd_group, so it will be called inside spdk_thread_poll. Since spdk_thread_poll will set/restore tls_thread, there is no need to set or restore it again here. Change-Id: Ida10c736ef904ff975eeb42fd0cccad9fd8317cf Signed-off-by: Liu Xiaodong Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6720 Tested-by: SPDK CI Jenkins Community-CI: Mellanox Build Bot Reviewed-by: Changpeng Liu Reviewed-by: Tomasz Zawadzki --- lib/thread/thread.c | 6 ------ 1 file changed, 6 deletions(-) diff --git a/lib/thread/thread.c b/lib/thread/thread.c index 08a128404..19530b17d 100644 --- a/lib/thread/thread.c +++ b/lib/thread/thread.c @@ -1861,15 +1861,11 @@ static int thread_interrupt_msg_process(void *arg) { struct spdk_thread *thread = arg; - struct spdk_thread *orig_thread; uint32_t msg_count; spdk_msg_fn critical_msg; int rc = 0; uint64_t now = spdk_get_ticks(); - orig_thread = _get_thread(); - tls_thread = thread; - critical_msg = thread->critical_msg; if (spdk_unlikely(critical_msg != NULL)) { critical_msg(NULL); @@ -1883,8 +1879,6 @@ thread_interrupt_msg_process(void *arg) thread_update_stats(thread, spdk_get_ticks(), now, rc); - tls_thread = orig_thread; - return rc; }