env/dpdk: always set base-virtaddr
DPDK 18.11 sets the default base-virtaddr to an address that falls into an area reserved by ASAN. DPDK will try to remap its memory over and over with the closest base-virtaddr hint and for ASAN case this would take a huge amount of time. This was already raised on DPDK mailing list [1] and might be eventually fixed or worked around in upstream, but for now let's just override the default base-virtaddr to a value that ASAN is known not to occupy. [1] http://patches.dpdk.org/patch/46130/#88395 Change-Id: Ieada30e82355e8ead458e53795ab98cd12692c1c Signed-off-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com> Reviewed-on: https://review.gerrithub.io/431257 (master) Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/448380 Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Reviewed-by: Jim Harris <james.r.harris@intel.com> Reviewed-by: Ben Walker <benjamin.walker@intel.com>
This commit is contained in:
parent
4183bbc058
commit
5e0a97223b
@ -293,6 +293,17 @@ spdk_build_eal_cmdline(const struct spdk_env_opts *opts)
|
||||
}
|
||||
|
||||
#ifdef __linux__
|
||||
/* Set the base virtual address - it must be an address that is not in the
|
||||
* ASAN shadow region, otherwise ASAN-enabled builds will ignore the
|
||||
* mmap hint.
|
||||
*
|
||||
* Ref: https://github.com/google/sanitizers/wiki/AddressSanitizerAlgorithm
|
||||
*/
|
||||
args = spdk_push_arg(args, &argcount, _sprintf_alloc("--base-virtaddr=0x200000000000"));
|
||||
if (args == NULL) {
|
||||
return -1;
|
||||
}
|
||||
|
||||
if (opts->shm_id < 0) {
|
||||
args = spdk_push_arg(args, &argcount, _sprintf_alloc("--file-prefix=spdk_pid%d",
|
||||
getpid()));
|
||||
@ -306,17 +317,6 @@ spdk_build_eal_cmdline(const struct spdk_env_opts *opts)
|
||||
return -1;
|
||||
}
|
||||
|
||||
/* Set the base virtual address - it must be an address that is not in the
|
||||
* ASAN shadow region, otherwise ASAN-enabled builds will ignore the
|
||||
* mmap hint.
|
||||
*
|
||||
* Ref: https://github.com/google/sanitizers/wiki/AddressSanitizerAlgorithm
|
||||
*/
|
||||
args = spdk_push_arg(args, &argcount, _sprintf_alloc("--base-virtaddr=0x200000000000"));
|
||||
if (args == NULL) {
|
||||
return -1;
|
||||
}
|
||||
|
||||
/* set the process type */
|
||||
args = spdk_push_arg(args, &argcount, _sprintf_alloc("--proc-type=auto"));
|
||||
if (args == NULL) {
|
||||
|
Loading…
Reference in New Issue
Block a user