Commit 5ec6b08e authored by Jim Harris's avatar Jim Harris
Browse files

ioat/perf: allow queue depths > 256



Currently the task and buffer pools are hardcoded to
512 each.  This effectively limits the queue depth
per channel to 256 since we need both source and
destination buffers from the buffer pool.  So make
the pool sizes dynamic based on the user's queue depth
input.

Signed-off-by: default avatarJim Harris <james.r.harris@intel.com>
Change-Id: I52f04308c0329fa99277746a0768eb1214e37a8e

Reviewed-on: https://review.gerrithub.io/c/445357


Tested-by: default avatarSPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: default avatarShuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: default avatarDarek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-by: default avatarChangpeng Liu <changpeng.liu@intel.com>
parent 6728c1b8
Loading
Loading
Loading
Loading
+6 −2
Original line number Diff line number Diff line
@@ -484,10 +484,14 @@ associate_workers_with_chan(void)
		t->ioat_chan_id = i;
		snprintf(buf_pool_name, sizeof(buf_pool_name), "buf_pool_%d", i);
		snprintf(task_pool_name, sizeof(task_pool_name), "task_pool_%d", i);
		t->data_pool = spdk_mempool_create(buf_pool_name, 512, g_user_config.xfer_size_bytes,
		t->data_pool = spdk_mempool_create(buf_pool_name,
						   g_user_config.queue_depth * 2, /* src + dst */
						   g_user_config.xfer_size_bytes,
						   SPDK_MEMPOOL_DEFAULT_CACHE_SIZE,
						   SPDK_ENV_SOCKET_ID_ANY);
		t->task_pool = spdk_mempool_create(task_pool_name, 512, sizeof(struct ioat_task),
		t->task_pool = spdk_mempool_create(task_pool_name,
						   g_user_config.queue_depth,
						   sizeof(struct ioat_task),
						   SPDK_MEMPOOL_DEFAULT_CACHE_SIZE,
						   SPDK_ENV_SOCKET_ID_ANY);
		if (!t->data_pool || !t->task_pool) {