From 98ceddb47cd5c49faf2b9195e791632c7fdb7d92 Mon Sep 17 00:00:00 2001 From: Jim Harris Date: Thu, 17 Nov 2022 05:04:17 +0000 Subject: [PATCH] rocksdb: remove spdk_thread This was an accidental remnant from the original check-in, when we did not have a clear differentiation between the event and thread libraries. The rocksdb plugin code will send events to an lcore - not an SPDK thread. But originally the two were combined though an API called spdk_allocate_thread. Once the differentiation was clearly made, we moved to using spdk_event_allocate() to send events to a specific lcore, but never removed the spdk_thread. So now let's just remove the spdk_thread_create since it is not needed. Signed-off-by: Jim Harris Change-Id: I5c6a3c304b7b4183eee90038367fdea7ebd7280f Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/15504 Tested-by: SPDK CI Jenkins Reviewed-by: Changpeng Liu Reviewed-by: Aleksey Marchuk --- lib/rocksdb/env_spdk.cc | 8 -------- 1 file changed, 8 deletions(-) diff --git a/lib/rocksdb/env_spdk.cc b/lib/rocksdb/env_spdk.cc index 088e5c1ab..59f9f5aba 100644 --- a/lib/rocksdb/env_spdk.cc +++ b/lib/rocksdb/env_spdk.cc @@ -59,11 +59,7 @@ thread_local SpdkThreadCtx g_sync_args; static void set_channel() { - struct spdk_thread *thread; - if (g_fs != NULL && g_sync_args.channel == NULL) { - thread = spdk_thread_create("spdk_rocksdb", NULL); - spdk_set_thread(thread); g_sync_args.channel = spdk_fs_alloc_thread_ctx(g_fs); } } @@ -610,14 +606,10 @@ public: */ void SpdkInitializeThread(void) { - struct spdk_thread *thread; - if (g_fs != NULL) { if (g_sync_args.channel) { spdk_fs_free_thread_ctx(g_sync_args.channel); } - thread = spdk_thread_create("spdk_rocksdb", NULL); - spdk_set_thread(thread); g_sync_args.channel = spdk_fs_alloc_thread_ctx(g_fs); } }