Limit spdk_tgt app to 512MB of memory. This should be sufficient for tests in this suite provided we also reduce the size of created malloc bdevs. Signed-off-by: Karol Latecki <karol.latecki@intel.com> Change-Id: Iaaba1e13899d37232f7acf842b7deed05935f78f Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/17365 Reviewed-by: Shuhei Matsumoto <smatsumoto@nvidia.com> Reviewed-by: Jaroslaw Chachulski <jaroslawx.chachulski@intel.com> Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Reviewed-by: Jim Harris <james.r.harris@intel.com>
26 lines
650 B
Bash
26 lines
650 B
Bash
# SPDX-License-Identifier: BSD-3-Clause
|
|
# Copyright (C) 2022 Intel Corporation.
|
|
# All rights reserved.
|
|
|
|
function vfu_tgt_run() {
|
|
local vhost_name=$1
|
|
local vfio_user_dir vfu_pid_file rpc_py
|
|
|
|
vfio_user_dir=$(get_vhost_dir $vhost_name)
|
|
vfu_pid_file="$vfio_user_dir/vhost.pid"
|
|
rpc_py="$rootdir/scripts/rpc.py -s $vfio_user_dir/rpc.sock"
|
|
|
|
mkdir -p $vfio_user_dir
|
|
|
|
timing_enter vfu_tgt_start
|
|
$rootdir/build/bin/spdk_tgt -r $vfio_user_dir/rpc.sock -m 0xf -s 512 &
|
|
vfupid=$!
|
|
echo $vfupid > $vfu_pid_file
|
|
|
|
echo "Process pid: $vfupid"
|
|
echo "waiting for app to run..."
|
|
waitforlisten $vfupid $vfio_user_dir/rpc.sock
|
|
|
|
timing_exit vfu_tgt_start
|
|
}
|