Commit 20c69bbc authored by Jim Harris's avatar Jim Harris Committed by Darek Stojaczyk
Browse files

env: remove default pre-reserved memory size



Much of this was originally applied by Darek in
6f5840d2 but then had to be reverted due to NVMe-oF
MR issues in a817ccf5.  Now that the NVMe-oF MR issues
have been resolved, we can reapply these changes.

Signed-off-by: default avatarJim Harris <james.r.harris@intel.com>
Signed-off-by: default avatarDarek Stojaczyk <dariusz.stojaczyk@intel.com>
Change-Id: I58d603523901c78dbc81279078a09b2a24c091e6

Reviewed-on: https://review.gerrithub.io/436547


Tested-by: default avatarSPDK CI Jenkins <sys_sgci@intel.com>
Chandler-Test-Pool: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: default avatarBen Walker <benjamin.walker@intel.com>
Reviewed-by: default avatarShuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
parent 9c2aea2a
Loading
Loading
Loading
Loading
+2 −12
Original line number Diff line number Diff line
@@ -38,19 +38,8 @@

#include "spdk/vhost.h"


#define SPDK_VHOST_DEFAULT_MEM_SIZE 1024

static const char *g_pid_path = NULL;

static void
vhost_app_opts_init(struct spdk_app_opts *opts)
{
	spdk_app_opts_init(opts);
	opts->name = "vhost";
	opts->mem_size = SPDK_VHOST_DEFAULT_MEM_SIZE;
}

static void
vhost_usage(void)
{
@@ -97,7 +86,8 @@ main(int argc, char *argv[])
	struct spdk_app_opts opts = {};
	int rc;

	vhost_app_opts_init(&opts);
	spdk_app_opts_init(&opts);
	opts.name = "vhost";

	if ((rc = spdk_app_parse_args(argc, argv, &opts, "f:S:", NULL,
				      vhost_parse_arg, vhost_usage)) !=
+1 −1
Original line number Diff line number Diff line
@@ -873,7 +873,7 @@ static struct fio_option options[] = {
		.lname		= "Memory size in MB",
		.type		= FIO_OPT_INT,
		.off1		= offsetof(struct spdk_fio_options, mem_size),
		.def		= "512",
		.def		= "0",
		.help		= "Memory Size for SPDK (MB)",
		.category	= FIO_OPT_C_ENGINE,
		.group		= FIO_OPT_G_INVALID,
+1 −1
Original line number Diff line number Diff line
@@ -84,7 +84,7 @@ static bool g_hex_dump = false;

static int g_shm_id = -1;

static int g_dpdk_mem = 64;
static int g_dpdk_mem = 0;

static int g_master_core = 0;

+0 −1
Original line number Diff line number Diff line
@@ -700,7 +700,6 @@ SpdkEnv::SpdkEnv(Env *base_env, const std::string &dir, const std::string &conf,
	spdk_app_opts_init(opts);
	opts->name = "rocksdb";
	opts->config_file = mConfig.c_str();
	opts->mem_size = 1024 + cache_size_in_mb;
	opts->shutdown_cb = spdk_rocksdb_shutdown;

	spdk_fs_set_cache_size(cache_size_in_mb);
+0 −1
Original line number Diff line number Diff line
@@ -865,7 +865,6 @@ main(int argc, char **argv)
	opts.name = "bdevperf";
	opts.rpc_addr = NULL;
	opts.reactor_mask = NULL;
	opts.mem_size = 1024;
	opts.shutdown_cb = spdk_bdevperf_shutdown_cb;

	/* default value */
Loading