Commit b8f40516 authored by Dariusz Stojaczyk's avatar Dariusz Stojaczyk Committed by Jim Harris
Browse files

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: default avatarDariusz Stojaczyk <dariuszx.stojaczyk@intel.com>
Reviewed-on: https://review.gerrithub.io/380984


Tested-by: default avatarSPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: default avatarPawel Wodkowski <pawelx.wodkowski@intel.com>
Reviewed-by: default avatarPawel Kaminski <pawelx.kaminski@intel.com>
Reviewed-by: default avatarDaniel Verkamp <daniel.verkamp@intel.com>
Reviewed-by: default avatarJim Harris <james.r.harris@intel.com>
parent 26378704
Loading
Loading
Loading
Loading
+15 −1
Original line number Diff line number Diff line
@@ -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,
	},