Commit 987ba616 authored by GangCao's avatar GangCao
Browse files

nvme: create the mempool from the name with the suffix of pid



Change-Id: I3bf3ecf5b83e206553d4103d47ed04ebe80387eb
Signed-off-by: default avatarGangCao <gang.cao@intel.com>
parent 621f96f7
Loading
Loading
Loading
Loading
+8 −1
Original line number Diff line number Diff line
@@ -1106,6 +1106,7 @@ main(int argc, char **argv)
{
	int rc;
	struct worker_thread *worker;
	char task_pool_name[30];

	rc = parse_args(argc, argv);
	if (rc != 0) {
@@ -1128,10 +1129,16 @@ main(int argc, char **argv)
		return 1;
	}

	task_pool = rte_mempool_create("arbitration_task_pool", 8192,
	snprintf(task_pool_name, sizeof(task_pool_name), "task_pool_%d", getpid());

	task_pool = rte_mempool_create(task_pool_name, 8192,
				       sizeof(struct arb_task),
				       64, 0, NULL, NULL, task_ctor, NULL,
				       SOCKET_ID_ANY, 0);
	if (task_pool == NULL) {
		fprintf(stderr, "could not initialize task pool\n");
		return 1;
	}

	g_arbitration.tsc_rate = spdk_get_ticks_hz();

+8 −1
Original line number Diff line number Diff line
@@ -1087,6 +1087,7 @@ int main(int argc, char **argv)
{
	int rc;
	struct worker_thread *worker;
	char task_pool_name[30];

	rc = parse_args(argc, argv);
	if (rc != 0) {
@@ -1108,10 +1109,16 @@ int main(int argc, char **argv)
		return 1;
	}

	task_pool = rte_mempool_create("perf_task_pool", 8192,
	snprintf(task_pool_name, sizeof(task_pool_name), "task_pool_%d", getpid());

	task_pool = rte_mempool_create(task_pool_name, 8192,
				       sizeof(struct perf_task),
				       64, 0, NULL, NULL, task_ctor, NULL,
				       SOCKET_ID_ANY, 0);
	if (task_pool == NULL) {
		fprintf(stderr, "could not initialize task pool\n");
		return 1;
	}

	g_tsc_rate = spdk_get_ticks_hz();