From 88055b422f7bf932401ca7ef2142d19d652edd42 Mon Sep 17 00:00:00 2001 From: Jim Harris Date: Wed, 14 Sep 2022 10:21:42 +0000 Subject: [PATCH] test/spdkcli: reduce amount of HUGEMEM memory requested We do not need to force usage of 4096MB of memory for these tests. Let's just remove how that is being forced. This allows us to also remove the setup.sh call from the spdkcli test common.sh script. Its only purpose was to increase the amount of memory allocated to satisfy the spdkcli tests, but now that the spdkcli tests aren't forcing so much memory to be allocated, we can remove that too. Fixes issue #2694. Note: these limits were in the original commit for the test scripts - 7e8206c - but it is not clear why they were added instead of just relying on DPDK dynamic memory allocation.. Signed-off-by: Jim Harris Change-Id: I2210765e69117205a039aa6bc468efa5d5d537cb Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/14520 Reviewed-by: Michal Berger Reviewed-by: Pawel Piatek Reviewed-by: Ben Walker Reviewed-by: Tomasz Zawadzki Tested-by: SPDK CI Jenkins --- test/spdkcli/common.sh | 9 +++------ test/spdkcli/iscsi.sh | 2 +- test/spdkcli/tcp.sh | 2 +- test/spdkcli/virtio.sh | 2 +- 4 files changed, 6 insertions(+), 9 deletions(-) diff --git a/test/spdkcli/common.sh b/test/spdkcli/common.sh index 42fad0858..a1b114858 100644 --- a/test/spdkcli/common.sh +++ b/test/spdkcli/common.sh @@ -21,19 +21,19 @@ function on_error_exit() { } function run_spdk_tgt() { - $SPDK_BIN_DIR/spdk_tgt -m 0x3 -p 0 -s 4096 & + $SPDK_BIN_DIR/spdk_tgt -m 0x3 -p 0 & spdk_tgt_pid=$! waitforlisten $spdk_tgt_pid } function run_nvmf_tgt() { - $SPDK_BIN_DIR/nvmf_tgt -m 0x3 -p 0 -s 4096 & + $SPDK_BIN_DIR/nvmf_tgt -m 0x3 -p 0 & nvmf_tgt_pid=$! waitforlisten $nvmf_tgt_pid } function run_vhost_tgt() { - $SPDK_BIN_DIR/vhost -m 0x3 -p 0 -s 4096 & + $SPDK_BIN_DIR/vhost -m 0x3 -p 0 & vhost_tgt_pid=$! waitforlisten $vhost_tgt_pid } @@ -43,6 +43,3 @@ function check_match() { $rootdir/test/app/match/match $testdir/match_files/${MATCH_FILE}.match rm -f $testdir/match_files/${MATCH_FILE} } - -# Allocate 5GB of hugepages to have some overhead for run_*()s -HUGEMEM=5120 CLEAR_HUGE=yes "$rootdir/scripts/setup.sh" diff --git a/test/spdkcli/iscsi.sh b/test/spdkcli/iscsi.sh index ff892ab36..81b2dc950 100755 --- a/test/spdkcli/iscsi.sh +++ b/test/spdkcli/iscsi.sh @@ -14,7 +14,7 @@ trap 'on_error_exit;' ERR timing_enter run_iscsi_tgt # Running iscsi target with --wait-for-rpc. Implies framework_start_init later -$SPDK_BIN_DIR/iscsi_tgt -m 0x3 -p 0 -s 4096 --wait-for-rpc & +$SPDK_BIN_DIR/iscsi_tgt -m 0x3 -p 0 --wait-for-rpc & iscsi_tgt_pid=$! waitforlisten $iscsi_tgt_pid $rootdir/scripts/rpc.py framework_start_init diff --git a/test/spdkcli/tcp.sh b/test/spdkcli/tcp.sh index d0d4dafba..69c80642f 100755 --- a/test/spdkcli/tcp.sh +++ b/test/spdkcli/tcp.sh @@ -18,7 +18,7 @@ PORT="9998" trap 'err_cleanup; exit 1' SIGINT SIGTERM EXIT timing_enter run_spdk_tgt_tcp -$SPDK_BIN_DIR/spdk_tgt -m 0x3 -p 0 -s 2048 & +$SPDK_BIN_DIR/spdk_tgt -m 0x3 -p 0 & spdk_tgt_pid=$! waitforlisten $spdk_tgt_pid diff --git a/test/spdkcli/virtio.sh b/test/spdkcli/virtio.sh index b483e0562..862482445 100755 --- a/test/spdkcli/virtio.sh +++ b/test/spdkcli/virtio.sh @@ -12,7 +12,7 @@ run_spdk_tgt timing_exit run_spdk_tgt timing_enter run_spdk_virtio -$SPDK_BIN_DIR/spdk_tgt -m 0x4 -p 0 -g -u -s 1024 -r /var/tmp/virtio.sock & +$SPDK_BIN_DIR/spdk_tgt -m 0x4 -p 0 -g -u -r /var/tmp/virtio.sock & virtio_pid=$! waitforlisten $virtio_pid /var/tmp/virtio.sock timing_exit run_spdk_virtio