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: Jim Harris <james.r.harris@intel.com>
Change-Id: I52f04308c0329fa99277746a0768eb1214e37a8e

Reviewed-on: https://review.gerrithub.io/c/445357
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
This commit is contained in:
Jim Harris 2019-02-19 14:04:42 -07:00
parent 6728c1b8cb
commit 5ec6b08eb0

View File

@ -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) {