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 <james.r.harris@intel.com>
Change-Id: I5c6a3c304b7b4183eee90038367fdea7ebd7280f
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/15504
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Aleksey Marchuk <alexeymar@nvidia.com>
This commit is contained in:
Jim Harris 2022-11-17 05:04:17 +00:00 committed by Tomasz Zawadzki
parent 0d3b54825e
commit 98ceddb47c

View File

@ -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);
}
}