Commit 333fd3ee authored by Shuhei Matsumoto's avatar Shuhei Matsumoto Committed by Tomasz Zawadzki
Browse files

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: default avatarShuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I2ed856c8ccfda1d72b3fc97677fecaf295df37af
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/478706


Tested-by: default avatarSPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: default avatarJim Harris <james.r.harris@intel.com>
Reviewed-by: default avatarSeth Howell <seth.howell@intel.com>
Reviewed-by: default avatarBen Walker <benjamin.walker@intel.com>
Reviewed-by: default avatarChangpeng Liu <changpeng.liu@intel.com>
parent f2061706
Loading
Loading
Loading
Loading
+1 −13
Original line number Diff line number Diff line
@@ -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