env: remove default pre-reserved memory size
Now that we utilize DPDK dynamic memory allocation, we no longer need to set the default pre-reserved memory size. It'll now be 0, which implies all memory will be allocated at runtime. The option to pre-reserve all hugepages on the system is now only available on BSD, so also clarify that bit in the app usage text. Change-Id: I5a8a1d9bf14ad6d938532d7e6254a45e4a81bb92 Signed-off-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com> Reviewed-on: https://review.gerrithub.io/432204 Chandler-Test-Pool: SPDK Automated Test System <sys_sgsw@intel.com> Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Reviewed-by: Seth Howell <seth.howell5141@gmail.com> Reviewed-by: Ben Walker <benjamin.walker@intel.com> Reviewed-by: Jim Harris <james.r.harris@intel.com>
This commit is contained in:
parent
9bec452561
commit
6f5840d225
@ -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)) !=
|
||||
|
@ -861,7 +861,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,
|
||||
|
@ -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;
|
||||
|
||||
|
@ -714,10 +714,13 @@ usage(void (*app_usage)(void))
|
||||
printf(" -p, --master-core <id> master (primary) core for DPDK\n");
|
||||
printf(" -r, --rpc-socket <path> RPC listen address (default %s)\n", SPDK_DEFAULT_RPC_ADDR);
|
||||
printf(" -s, --mem-size <size> memory size in MB for DPDK (default: ");
|
||||
if (g_default_opts.mem_size > 0) {
|
||||
printf("%dMB)\n", g_default_opts.mem_size);
|
||||
} else {
|
||||
#ifndef __linux__
|
||||
if (g_default_opts.mem_size <= 0) {
|
||||
printf("all hugepage memory)\n");
|
||||
} else
|
||||
#endif
|
||||
{
|
||||
printf("%dMB)\n", g_default_opts.mem_size);
|
||||
}
|
||||
printf(" --silence-noticelog disable notice level logging to stderr\n");
|
||||
printf(" -u, --no-pci disable PCI access\n");
|
||||
|
@ -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);
|
||||
|
@ -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 */
|
||||
|
@ -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];
|
||||
|
@ -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);
|
||||
|
1
test/env/vtophys/vtophys.c
vendored
1
test/env/vtophys/vtophys.c
vendored
@ -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;
|
||||
|
@ -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;
|
||||
|
||||
|
@ -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;
|
||||
|
@ -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");
|
||||
|
Loading…
x
Reference in New Issue
Block a user