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:
parent
2637870434
commit
b8f40516f0
@ -49,6 +49,7 @@
|
|||||||
struct spdk_fio_options {
|
struct spdk_fio_options {
|
||||||
void *pad;
|
void *pad;
|
||||||
char *conf;
|
char *conf;
|
||||||
|
unsigned mem_mb;
|
||||||
};
|
};
|
||||||
|
|
||||||
/* Used to pass messages between fio threads */
|
/* Used to pass messages between fio threads */
|
||||||
@ -256,8 +257,12 @@ spdk_fio_init_env(struct thread_data *td)
|
|||||||
/* Initialize the environment library */
|
/* Initialize the environment library */
|
||||||
spdk_env_opts_init(&opts);
|
spdk_env_opts_init(&opts);
|
||||||
opts.name = "fio";
|
opts.name = "fio";
|
||||||
spdk_env_init(&opts);
|
|
||||||
|
|
||||||
|
if (eo->mem_mb) {
|
||||||
|
opts.mem_size = eo->mem_mb;
|
||||||
|
}
|
||||||
|
|
||||||
|
spdk_env_init(&opts);
|
||||||
spdk_unaffinitize_thread();
|
spdk_unaffinitize_thread();
|
||||||
|
|
||||||
/* Create an SPDK thread temporarily */
|
/* Create an SPDK thread temporarily */
|
||||||
@ -597,6 +602,15 @@ static struct fio_option options[] = {
|
|||||||
.category = FIO_OPT_C_ENGINE,
|
.category = FIO_OPT_C_ENGINE,
|
||||||
.group = FIO_OPT_G_INVALID,
|
.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,
|
.name = NULL,
|
||||||
},
|
},
|
||||||
|
Loading…
Reference in New Issue
Block a user