bdevperf: create task buffer pool after enumerating targets
This ensures we have calculated the correct minimum buffer alignment before allocating the buffers. Fixes issue reported by Ziye Yang that bdevperf did not work with AIO bdev backend. Signed-off-by: Jim Harris <james.r.harris@intel.com> Change-Id: Ic223551cc3ce1fb723ffcd745513c04198f13433 Reviewed-on: https://review.gerrithub.io/367291 Tested-by: SPDK Automated Test System <sys_sgsw@intel.com> Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
This commit is contained in:
parent
c1f49bedb1
commit
4b468d7c9b
@ -532,13 +532,18 @@ bdevperf_run(void *arg1, void *arg2)
|
|||||||
struct io_target *target;
|
struct io_target *target;
|
||||||
struct spdk_event *event;
|
struct spdk_event *event;
|
||||||
|
|
||||||
|
bdevperf_construct_targets();
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Create the task pool after we have enumerated the targets, so that we know
|
||||||
|
* 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", 4096 * spdk_env_get_core_count(),
|
||||||
sizeof(struct bdevperf_task),
|
sizeof(struct bdevperf_task),
|
||||||
64, 0, NULL, NULL, task_ctor, NULL,
|
64, 0, NULL, NULL, task_ctor, NULL,
|
||||||
SOCKET_ID_ANY, 0);
|
SOCKET_ID_ANY, 0);
|
||||||
|
|
||||||
bdevperf_construct_targets();
|
|
||||||
|
|
||||||
printf("Running I/O for %d seconds...\n", g_time_in_sec);
|
printf("Running I/O for %d seconds...\n", g_time_in_sec);
|
||||||
fflush(stdout);
|
fflush(stdout);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user