From 5ec6b08eb03b0e16c75eca6cae63754064636833 Mon Sep 17 00:00:00 2001 From: Jim Harris Date: Tue, 19 Feb 2019 14:04:42 -0700 Subject: [PATCH] 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 Change-Id: I52f04308c0329fa99277746a0768eb1214e37a8e Reviewed-on: https://review.gerrithub.io/c/445357 Tested-by: SPDK CI Jenkins Reviewed-by: Shuhei Matsumoto Reviewed-by: Darek Stojaczyk Reviewed-by: Changpeng Liu --- examples/ioat/perf/perf.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/examples/ioat/perf/perf.c b/examples/ioat/perf/perf.c index fffc3c6ab..55f74d5a6 100644 --- a/examples/ioat/perf/perf.c +++ b/examples/ioat/perf/perf.c @@ -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) {