From f09d19d5a3e3b21bb11db4b41acc7e8f2f34eb52 Mon Sep 17 00:00:00 2001 From: Nicolas Benech Date: Wed, 12 Jun 2019 18:32:01 -0400 Subject: [PATCH] gpu: nvgpu: unit: force gcov.sh to use a single thread On some host OSes, the OS may allocate virtual addresses that are larger than can be handled by NVGPU. As a workaround, we noticed that the host OS will not allocate such large addresses when running single threaded. There is no other way to prevent this issue nor is there any guarantee that this workaround will always work... JIRA NVGPU-1246 Change-Id: I8c89cf6be9f80bd6fb18fd1688037b9144d2d21c Signed-off-by: Nicolas Benech Reviewed-on: https://git-master.nvidia.com/r/2135370 GVS: Gerrit_Virtual_Submit Reviewed-by: Alex Waterman Reviewed-by: mobile promotions Tested-by: mobile promotions --- userspace/gcov.sh | 2 +- userspace/unit.sh | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/userspace/gcov.sh b/userspace/gcov.sh index 70ad92d14..4a87ccbad 100755 --- a/userspace/gcov.sh +++ b/userspace/gcov.sh @@ -60,7 +60,7 @@ find . -name "*.gcda" -exec rm {} + find $NVGPU_SRC_ROOT -name "*.gcda" -exec rm {} + #Run unit tests -./unit.sh -j 2 +./unit.sh OUT=$? if [ ! $OUT -eq 0 ]; then echo "ERROR: Unit test run failed." diff --git a/userspace/unit.sh b/userspace/unit.sh index 85dcb9dfb..de85b5c91 100755 --- a/userspace/unit.sh +++ b/userspace/unit.sh @@ -41,7 +41,8 @@ if [ -f nvgpu_unit ]; then else # running on host LD_LIBRARY_PATH="build:build/units" - NVGPU_UNIT=build/nvgpu_unit + # On host, must run single-threaded to avoid high VAs + NVGPU_UNIT="./build/nvgpu_unit --num-threads 1" fi export LD_LIBRARY_PATH