From a0da65f49dfe387a8947de57f8d264b571264f4c Mon Sep 17 00:00:00 2001 From: Ziye Yang Date: Mon, 13 Nov 2017 12:09:32 +0800 Subject: [PATCH] bdevperf: adjust the bdevperf task number. According to my analysis, the exact number is not related with core number, which should be calucated as g_target_count * g_queue_depth. Since each target will be run I/O by differnet cores. And it would solve the task number not enough issue. Change-Id: I483f4609341766123f95b39bff057e95a9d19531 Signed-off-by: Ziye Yang Reviewed-on: https://review.gerrithub.io/386801 Tested-by: SPDK Automated Test System Reviewed-by: Hailiang Wang Reviewed-by: Daniel Verkamp Reviewed-by: Ben Walker Reviewed-by: Jim Harris --- test/lib/bdev/bdevperf/bdevperf.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/test/lib/bdev/bdevperf/bdevperf.c b/test/lib/bdev/bdevperf/bdevperf.c index b55da3656..7d6c5e3d9 100644 --- a/test/lib/bdev/bdevperf/bdevperf.c +++ b/test/lib/bdev/bdevperf/bdevperf.c @@ -569,10 +569,15 @@ bdevperf_run(void *arg1, void *arg2) * the min buffer alignment. Some backends such as AIO have alignment restrictions * that must be accounted for. */ - task_pool = rte_mempool_create("task_pool", 4096 * spdk_env_get_core_count(), + task_pool = rte_mempool_create("task_pool", g_target_count * g_queue_depth, sizeof(struct bdevperf_task), 64, 0, NULL, NULL, task_ctor, NULL, SOCKET_ID_ANY, 0); + if (!task_pool) { + SPDK_ERRLOG("Cannot allocate %d tasks\n", g_target_count * g_queue_depth); + spdk_app_stop(1); + return; + } printf("Running I/O for %d seconds...\n", g_time_in_sec); fflush(stdout);