diff --git a/test/vhost/common.sh b/test/vhost/common.sh index 4a0d5025b..ff2403cbf 100644 --- a/test/vhost/common.sh +++ b/test/vhost/common.sh @@ -166,12 +166,24 @@ function vhost_run() { timing_enter vhost_start - $cmd & + iobuf_small_count=${iobuf_small_count:-16383} + iobuf_large_count=${iobuf_large_count:-2047} + + $cmd --wait-for-rpc & vhost_pid=$! echo $vhost_pid > $vhost_pid_file notice "waiting for app to run..." waitforlisten "$vhost_pid" "$vhost_dir/rpc.sock" + + "$rootdir/scripts/rpc.py" -s "$vhost_dir/rpc.sock" \ + iobuf_set_options \ + --small-pool-count="$iobuf_small_count" \ + --large-pool-count="$iobuf_large_count" + + "$rootdir/scripts/rpc.py" -s "$vhost_dir/rpc.sock" \ + framework_start_init + #do not generate nvmes if pci access is disabled if [[ "$cmd" != *"--no-pci"* ]] && [[ "$cmd" != *"-u"* ]] && $run_gen_nvme; then $rootdir/scripts/gen_nvme.sh | $rootdir/scripts/rpc.py -s $vhost_dir/rpc.sock load_subsystem_config diff --git a/test/vhost/perf_bench/vhost_perf.sh b/test/vhost/perf_bench/vhost_perf.sh index 5d316ecf4..a773276d1 100755 --- a/test/vhost/perf_bench/vhost_perf.sh +++ b/test/vhost/perf_bench/vhost_perf.sh @@ -85,6 +85,8 @@ function usage() { echo " NVME PCI BDF,Spdk Bdev Name,Split Count,VM List" echo " 0000:1a:00.0,Nvme0,2,0 1" echo " 0000:1b:00.0,Nvme1,2,2 3" + echo " --iobuf-small-pool-count=INT number of small buffers in the global pool" + echo " --iobuf-large-pool-count=INT number of large buffers in the global pool" echo "-x set -x for script debug" exit 0 } @@ -198,6 +200,8 @@ while getopts 'xh-:' optchar; do limit-kernel-vhost=*) kernel_cpus="${OPTARG#*=}" ;; custom-cpu-cfg=*) custom_cpu_cfg="${OPTARG#*=}" ;; disk-map=*) disk_map="${OPTARG#*=}" ;; + iobuf-small-pool-count=*) iobuf_small_count="${OPTARG#*=}" ;; + iobuf-large-pool-count=*) iobuf_large_count="${OPTARG#*=}" ;; *) usage $0 "Invalid argument '$OPTARG'" ;; esac ;;