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 <optimistyzy@gmail.com> Reviewed-on: https://review.gerrithub.io/386801 Tested-by: SPDK Automated Test System <sys_sgsw@intel.com> Reviewed-by: Hailiang Wang <hailiangx.e.wang@intel.com> Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com> Reviewed-by: Ben Walker <benjamin.walker@intel.com> Reviewed-by: Jim Harris <james.r.harris@intel.com>
This commit is contained in:
parent
618c8f9040
commit
a0da65f49d
@ -569,10 +569,15 @@ bdevperf_run(void *arg1, void *arg2)
|
|||||||
* the min buffer alignment. Some backends such as AIO have alignment restrictions
|
* the min buffer alignment. Some backends such as AIO have alignment restrictions
|
||||||
* that must be accounted for.
|
* 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),
|
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);
|
||||||
|
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);
|
printf("Running I/O for %d seconds...\n", g_time_in_sec);
|
||||||
fflush(stdout);
|
fflush(stdout);
|
||||||
|
Loading…
Reference in New Issue
Block a user