test/bdev: add --spdk_mem param to fio_plugin

This is required for current virtio implementation,
as it supports only up to 8 hugepages.

Change-Id: I3e89a54188097987947de40f6dcdedc46285252f
Signed-off-by: Dariusz Stojaczyk <dariuszx.stojaczyk@intel.com>
Reviewed-on: https://review.gerrithub.io/380984
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Pawel Wodkowski <pawelx.wodkowski@intel.com>
Reviewed-by: Pawel Kaminski <pawelx.kaminski@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
This commit is contained in:
Dariusz Stojaczyk 2017-10-02 21:02:02 +02:00 committed by Jim Harris
parent 2637870434
commit b8f40516f0

View File

@ -49,6 +49,7 @@
struct spdk_fio_options {
void *pad;
char *conf;
unsigned mem_mb;
};
/* Used to pass messages between fio threads */
@ -256,8 +257,12 @@ spdk_fio_init_env(struct thread_data *td)
/* Initialize the environment library */
spdk_env_opts_init(&opts);
opts.name = "fio";
spdk_env_init(&opts);
if (eo->mem_mb) {
opts.mem_size = eo->mem_mb;
}
spdk_env_init(&opts);
spdk_unaffinitize_thread();
/* Create an SPDK thread temporarily */
@ -597,6 +602,15 @@ static struct fio_option options[] = {
.category = FIO_OPT_C_ENGINE,
.group = FIO_OPT_G_INVALID,
},
{
.name = "spdk_mem",
.lname = "SPDK memory in MB",
.type = FIO_OPT_INT,
.off1 = offsetof(struct spdk_fio_options, mem_mb),
.help = "Amount of memory in MB to allocate for SPDK",
.category = FIO_OPT_C_ENGINE,
.group = FIO_OPT_G_INVALID,
},
{
.name = NULL,
},