examples/fio_plugin: add --spdk_single_seg option

Change-Id: Idbfea102b576ca2a0062d8f8b1dec51c02b99605
Signed-off-by: Dariusz Stojaczyk <dariuszx.stojaczyk@intel.com>
Reviewed-on: https://review.gerrithub.io/404317
Tested-by: SPDK Automated Test System <sys_sgsw@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 2018-03-19 13:34:42 +01:00 committed by Jim Harris
parent c5008b37a0
commit 231087ae4b

View File

@ -50,6 +50,7 @@ struct spdk_fio_options {
void *pad;
char *conf;
unsigned mem_mb;
bool mem_single_seg;
};
/* Used to pass messages between fio threads */
@ -250,6 +251,7 @@ spdk_fio_init_env(struct thread_data *td)
if (eo->mem_mb) {
opts.mem_size = eo->mem_mb;
}
opts.hugepage_single_segments = eo->mem_single_seg;
if (spdk_env_init(&opts) < 0) {
SPDK_ERRLOG("Unable to initialize SPDK env\n");
@ -628,6 +630,15 @@ static struct fio_option options[] = {
.category = FIO_OPT_C_ENGINE,
.group = FIO_OPT_G_INVALID,
},
{
.name = "spdk_single_seg",
.lname = "SPDK switch to create just a single hugetlbfs file",
.type = FIO_OPT_BOOL,
.off1 = offsetof(struct spdk_fio_options, mem_single_seg),
.help = "If set to 1, SPDK will use just a single hugetlbfs file",
.category = FIO_OPT_C_ENGINE,
.group = FIO_OPT_G_INVALID,
},
{
.name = NULL,
},