Revert "env: remove default pre-reserved memory size"
Apparently this patch revealed an issue somewhere in SGL
handling in NVMf initiator which is causing our CI to fail.
Let's revert it while we work on a proper fix.
This reverts commit 6f5840d225
.
This is not a full revert, some app.c changes to the usage text
were kept unchanged.
Change-Id: Iddea5c2b9df50bd12ef8f6226165883f6622ab33
Signed-off-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-on: https://review.gerrithub.io/432576
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Tested-by: Ben Walker <benjamin.walker@intel.com>
This commit is contained in:
parent
d912dba2cb
commit
a817ccf571
@ -38,8 +38,19 @@
|
|||||||
|
|
||||||
#include "spdk/vhost.h"
|
#include "spdk/vhost.h"
|
||||||
|
|
||||||
|
|
||||||
|
#define SPDK_VHOST_DEFAULT_MEM_SIZE 1024
|
||||||
|
|
||||||
static const char *g_pid_path = NULL;
|
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
|
static void
|
||||||
vhost_usage(void)
|
vhost_usage(void)
|
||||||
{
|
{
|
||||||
@ -86,8 +97,7 @@ main(int argc, char *argv[])
|
|||||||
struct spdk_app_opts opts = {};
|
struct spdk_app_opts opts = {};
|
||||||
int rc;
|
int rc;
|
||||||
|
|
||||||
spdk_app_opts_init(&opts);
|
vhost_app_opts_init(&opts);
|
||||||
opts.name = "vhost";
|
|
||||||
|
|
||||||
if ((rc = spdk_app_parse_args(argc, argv, &opts, "f:S:", NULL,
|
if ((rc = spdk_app_parse_args(argc, argv, &opts, "f:S:", NULL,
|
||||||
vhost_parse_arg, vhost_usage)) !=
|
vhost_parse_arg, vhost_usage)) !=
|
||||||
|
@ -861,7 +861,7 @@ static struct fio_option options[] = {
|
|||||||
.lname = "Memory size in MB",
|
.lname = "Memory size in MB",
|
||||||
.type = FIO_OPT_INT,
|
.type = FIO_OPT_INT,
|
||||||
.off1 = offsetof(struct spdk_fio_options, mem_size),
|
.off1 = offsetof(struct spdk_fio_options, mem_size),
|
||||||
.def = "0",
|
.def = "512",
|
||||||
.help = "Memory Size for SPDK (MB)",
|
.help = "Memory Size for SPDK (MB)",
|
||||||
.category = FIO_OPT_C_ENGINE,
|
.category = FIO_OPT_C_ENGINE,
|
||||||
.group = FIO_OPT_G_INVALID,
|
.group = FIO_OPT_G_INVALID,
|
||||||
|
@ -84,7 +84,7 @@ static bool g_hex_dump = false;
|
|||||||
|
|
||||||
static int g_shm_id = -1;
|
static int g_shm_id = -1;
|
||||||
|
|
||||||
static int g_dpdk_mem = 0;
|
static int g_dpdk_mem = 64;
|
||||||
|
|
||||||
static int g_master_core = 0;
|
static int g_master_core = 0;
|
||||||
|
|
||||||
|
@ -700,6 +700,7 @@ SpdkEnv::SpdkEnv(Env *base_env, const std::string &dir, const std::string &conf,
|
|||||||
spdk_app_opts_init(opts);
|
spdk_app_opts_init(opts);
|
||||||
opts->name = "rocksdb";
|
opts->name = "rocksdb";
|
||||||
opts->config_file = mConfig.c_str();
|
opts->config_file = mConfig.c_str();
|
||||||
|
opts->mem_size = 1024 + cache_size_in_mb;
|
||||||
opts->shutdown_cb = spdk_rocksdb_shutdown;
|
opts->shutdown_cb = spdk_rocksdb_shutdown;
|
||||||
|
|
||||||
spdk_fs_set_cache_size(cache_size_in_mb);
|
spdk_fs_set_cache_size(cache_size_in_mb);
|
||||||
|
@ -865,6 +865,7 @@ main(int argc, char **argv)
|
|||||||
opts.name = "bdevperf";
|
opts.name = "bdevperf";
|
||||||
opts.rpc_addr = NULL;
|
opts.rpc_addr = NULL;
|
||||||
opts.reactor_mask = NULL;
|
opts.reactor_mask = NULL;
|
||||||
|
opts.mem_size = 1024;
|
||||||
opts.shutdown_cb = spdk_bdevperf_shutdown_cb;
|
opts.shutdown_cb = spdk_bdevperf_shutdown_cb;
|
||||||
|
|
||||||
/* default value */
|
/* default value */
|
||||||
|
@ -333,6 +333,7 @@ int main(int argc, char **argv)
|
|||||||
opts.name = "spdk_fuse";
|
opts.name = "spdk_fuse";
|
||||||
opts.config_file = argv[1];
|
opts.config_file = argv[1];
|
||||||
opts.reactor_mask = "0x3";
|
opts.reactor_mask = "0x3";
|
||||||
|
opts.mem_size = 6144;
|
||||||
opts.shutdown_cb = spdk_fuse_shutdown;
|
opts.shutdown_cb = spdk_fuse_shutdown;
|
||||||
|
|
||||||
g_bdev_name = argv[2];
|
g_bdev_name = argv[2];
|
||||||
|
@ -132,6 +132,7 @@ int main(int argc, char **argv)
|
|||||||
opts.name = "spdk_mkfs";
|
opts.name = "spdk_mkfs";
|
||||||
opts.config_file = argv[1];
|
opts.config_file = argv[1];
|
||||||
opts.reactor_mask = "0x3";
|
opts.reactor_mask = "0x3";
|
||||||
|
opts.mem_size = 1024;
|
||||||
opts.shutdown_cb = NULL;
|
opts.shutdown_cb = NULL;
|
||||||
|
|
||||||
spdk_fs_set_cache_size(512);
|
spdk_fs_set_cache_size(512);
|
||||||
|
1
test/env/vtophys/vtophys.c
vendored
1
test/env/vtophys/vtophys.c
vendored
@ -119,6 +119,7 @@ main(int argc, char **argv)
|
|||||||
spdk_env_opts_init(&opts);
|
spdk_env_opts_init(&opts);
|
||||||
opts.name = "vtophys";
|
opts.name = "vtophys";
|
||||||
opts.core_mask = "0x1";
|
opts.core_mask = "0x1";
|
||||||
|
opts.mem_size = 256;
|
||||||
if (spdk_env_init(&opts) < 0) {
|
if (spdk_env_init(&opts) < 0) {
|
||||||
printf("Err: Unable to initialize SPDK env\n");
|
printf("Err: Unable to initialize SPDK env\n");
|
||||||
return 1;
|
return 1;
|
||||||
|
@ -144,6 +144,7 @@ main(int argc, char **argv)
|
|||||||
int rc = 0;
|
int rc = 0;
|
||||||
|
|
||||||
opts.name = "event_perf";
|
opts.name = "event_perf";
|
||||||
|
opts.mem_size = 256;
|
||||||
|
|
||||||
g_time_in_sec = 0;
|
g_time_in_sec = 0;
|
||||||
|
|
||||||
|
@ -523,6 +523,7 @@ int main(int argc, char **argv)
|
|||||||
spdk_env_opts_init(&opts);
|
spdk_env_opts_init(&opts);
|
||||||
opts.name = "aer";
|
opts.name = "aer";
|
||||||
opts.core_mask = "0x1";
|
opts.core_mask = "0x1";
|
||||||
|
opts.mem_size = 64;
|
||||||
if (spdk_env_init(&opts) < 0) {
|
if (spdk_env_init(&opts) < 0) {
|
||||||
fprintf(stderr, "Unable to initialize SPDK env\n");
|
fprintf(stderr, "Unable to initialize SPDK env\n");
|
||||||
return 1;
|
return 1;
|
||||||
|
@ -219,6 +219,7 @@ int main(int argc, char **argv)
|
|||||||
spdk_env_opts_init(&opts);
|
spdk_env_opts_init(&opts);
|
||||||
opts.name = "err_injection";
|
opts.name = "err_injection";
|
||||||
opts.core_mask = "0x1";
|
opts.core_mask = "0x1";
|
||||||
|
opts.mem_size = 64;
|
||||||
opts.shm_id = 0;
|
opts.shm_id = 0;
|
||||||
if (spdk_env_init(&opts) < 0) {
|
if (spdk_env_init(&opts) < 0) {
|
||||||
fprintf(stderr, "Unable to initialize SPDK env\n");
|
fprintf(stderr, "Unable to initialize SPDK env\n");
|
||||||
|
Loading…
Reference in New Issue
Block a user