env: remove default pre-reserved memory size

Much of this was originally applied by Darek in
6f5840d22 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: Jim Harris <james.r.harris@intel.com>
Signed-off-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Change-Id: I58d603523901c78dbc81279078a09b2a24c091e6

Reviewed-on: https://review.gerrithub.io/436547
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Chandler-Test-Pool: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
This commit is contained in:
Jim Harris 2018-12-07 13:23:02 -07:00 committed by Darek Stojaczyk
parent 9c2aea2ad5
commit 20c69bbc30
11 changed files with 4 additions and 22 deletions

View File

@ -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)) !=

View File

@ -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,

View File

@ -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;

View File

@ -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);

View File

@ -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 */

View File

@ -333,7 +333,6 @@ int main(int argc, char **argv)
opts.name = "spdk_fuse";
opts.config_file = argv[1];
opts.reactor_mask = "0x3";
opts.mem_size = 6144;
opts.shutdown_cb = spdk_fuse_shutdown;
g_bdev_name = argv[2];

View File

@ -132,7 +132,6 @@ int main(int argc, char **argv)
opts.name = "spdk_mkfs";
opts.config_file = argv[1];
opts.reactor_mask = "0x3";
opts.mem_size = 1024;
opts.shutdown_cb = NULL;
spdk_fs_set_cache_size(512);

View File

@ -119,7 +119,6 @@ main(int argc, char **argv)
spdk_env_opts_init(&opts);
opts.name = "vtophys";
opts.core_mask = "0x1";
opts.mem_size = 256;
if (spdk_env_init(&opts) < 0) {
printf("Err: Unable to initialize SPDK env\n");
return 1;

View File

@ -144,7 +144,6 @@ main(int argc, char **argv)
int rc = 0;
opts.name = "event_perf";
opts.mem_size = 256;
g_time_in_sec = 0;

View File

@ -523,7 +523,6 @@ int main(int argc, char **argv)
spdk_env_opts_init(&opts);
opts.name = "aer";
opts.core_mask = "0x1";
opts.mem_size = 64;
if (spdk_env_init(&opts) < 0) {
fprintf(stderr, "Unable to initialize SPDK env\n");
return 1;

View File

@ -219,7 +219,6 @@ int main(int argc, char **argv)
spdk_env_opts_init(&opts);
opts.name = "err_injection";
opts.core_mask = "0x1";
opts.mem_size = 64;
opts.shm_id = 0;
if (spdk_env_init(&opts) < 0) {
fprintf(stderr, "Unable to initialize SPDK env\n");