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:
parent
c5008b37a0
commit
231087ae4b
@ -50,6 +50,7 @@ struct spdk_fio_options {
|
|||||||
void *pad;
|
void *pad;
|
||||||
char *conf;
|
char *conf;
|
||||||
unsigned mem_mb;
|
unsigned mem_mb;
|
||||||
|
bool mem_single_seg;
|
||||||
};
|
};
|
||||||
|
|
||||||
/* Used to pass messages between fio threads */
|
/* Used to pass messages between fio threads */
|
||||||
@ -250,6 +251,7 @@ spdk_fio_init_env(struct thread_data *td)
|
|||||||
if (eo->mem_mb) {
|
if (eo->mem_mb) {
|
||||||
opts.mem_size = eo->mem_mb;
|
opts.mem_size = eo->mem_mb;
|
||||||
}
|
}
|
||||||
|
opts.hugepage_single_segments = eo->mem_single_seg;
|
||||||
|
|
||||||
if (spdk_env_init(&opts) < 0) {
|
if (spdk_env_init(&opts) < 0) {
|
||||||
SPDK_ERRLOG("Unable to initialize SPDK env\n");
|
SPDK_ERRLOG("Unable to initialize SPDK env\n");
|
||||||
@ -628,6 +630,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_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,
|
.name = NULL,
|
||||||
},
|
},
|
||||||
|
Loading…
Reference in New Issue
Block a user