Commit 2d718da0 authored by Darek Stojaczyk's avatar Darek Stojaczyk Committed by Ben Walker
Browse files

env: use dynamic memory management for DPDK 18.05.1+



With all SPDK patches in place, we can now enable dynamic
memory management for all DPDK versions >= 18.05.1

Hugepages can be still reserved with [-s|--mem-size <size>]
option at application startup, but once we use them all up,
instead of failing user allocations with -ENOMEM, we'll try
to dynamically reserve even more. This allows starting DPDK
with `--mem-size 0` and using only as many hugepages as it
was actually necessary.

Change-Id: I9e6f58ea50af2234f96a53e7a32d9e14d2df65ff
Signed-off-by: default avatarDarek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-on: https://review.gerrithub.io/426828


Tested-by: default avatarSPDK CI Jenkins <sys_sgci@intel.com>
Chandler-Test-Pool: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: default avatarJim Harris <james.r.harris@intel.com>
Reviewed-by: default avatarShuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: default avatarBen Walker <benjamin.walker@intel.com>
parent 33df76dc
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -267,8 +267,8 @@ spdk_build_eal_cmdline(const struct spdk_env_opts *opts)
		}
	}

#if RTE_VERSION >= RTE_VERSION_NUM(18, 05, 0, 0)
	/* SPDK holds off with using the new memory management model just yet */
#if RTE_VERSION >= RTE_VERSION_NUM(18, 05, 0, 0) && RTE_VERSION < RTE_VERSION_NUM(18, 5, 1, 0)
	/* Dynamic memory management is buggy in DPDK 18.05.0. Don't use it. */
	args = spdk_push_arg(args, &argcount, _sprintf_alloc("--legacy-mem"));
	if (args == NULL) {
		return -1;