bdevperf: Delete g_coremap and use lcore of io_target_group instead

The role done by the variables has been replaced by lcore of
struct io_target_group. So we can delete them safely.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I2ed856c8ccfda1d72b3fc97677fecaf295df37af
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/478706
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Seth Howell <seth.howell@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
This commit is contained in:
Shuhei Matsumoto 2019-12-25 20:56:32 -05:00 committed by Tomasz Zawadzki
parent f20617066e
commit 333fd3ee32

View File

@ -120,7 +120,6 @@ struct io_target_group {
};
struct io_target_group *g_head;
uint32_t *g_coremap;
static uint32_t g_target_count = 0;
/*
@ -240,18 +239,8 @@ blockdev_heads_init(void)
TAILQ_INIT(&g_head[i].targets);
}
g_coremap = calloc(core_count, sizeof(uint32_t));
if (!g_coremap) {
free(g_head);
fprintf(stderr, "Cannot allocate coremap array with size=%u\n",
core_count);
return -1;
}
SPDK_ENV_FOREACH_CORE(i) {
g_coremap[idx] = i;
g_head[idx].lcore = i;
idx++;
g_head[idx++].lcore = i;
}
return 0;
@ -297,7 +286,6 @@ blockdev_heads_destroy(void)
{
bdevperf_free_targets();
free(g_head);
free(g_coremap);
}
static void