rocksdb: allocate the event on the user specified first core
Change-Id: I7f9b24e5ee625ba6336a69a6c2a40498ccd6eabe Signed-off-by: GangCao <gang.cao@intel.com> Reviewed-on: https://review.gerrithub.io/374399 Tested-by: SPDK Automated Test System <sys_sgsw@intel.com> Reviewed-by: Changpeng Liu <changpeng.liu@intel.com> Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com> Reviewed-by: Ben Walker <benjamin.walker@intel.com>
This commit is contained in:
parent
cd0e57e5ca
commit
d15bb8b7b7
@ -49,6 +49,7 @@ namespace rocksdb
|
||||
|
||||
struct spdk_filesystem *g_fs = NULL;
|
||||
struct spdk_bs_dev *g_bs_dev;
|
||||
uint32_t g_lcore = 0;
|
||||
std::string g_bdev_name;
|
||||
volatile bool g_spdk_ready = false;
|
||||
struct sync_args {
|
||||
@ -71,7 +72,7 @@ __send_request(fs_request_fn fn, void *arg)
|
||||
{
|
||||
struct spdk_event *event;
|
||||
|
||||
event = spdk_event_allocate(0, __call_fn, (void *)fn, arg);
|
||||
event = spdk_event_allocate(g_lcore, __call_fn, (void *)fn, arg);
|
||||
spdk_event_call(event);
|
||||
}
|
||||
|
||||
@ -488,6 +489,8 @@ spdk_rocksdb_run(void *arg1, void *arg2)
|
||||
exit(1);
|
||||
}
|
||||
|
||||
g_lcore = spdk_env_get_first_core();
|
||||
|
||||
g_bs_dev = spdk_bdev_create_bs_dev(bdev);
|
||||
printf("using bdev %s\n", g_bdev_name.c_str());
|
||||
spdk_fs_load(g_bs_dev, __send_request, fs_load_cb, NULL);
|
||||
|
Loading…
Reference in New Issue
Block a user