Commit f20a4abe authored by Michal Berger's avatar Michal Berger Committed by Jim Harris
Browse files

test/vhost: Properly distribute cpus in lvol_test



Currently, the spdk_mask erroneously includes cpu which belongs to
one of the VMs. This may block QEMU from booting the VM in time.
In fact, under newer QEMU, the affected VM, which shares the cpu
with SPDK, is struggling to boot often leading to a timeout.

Change-Id: If50adfa7d75f74c5ff8348c1b54df6a1fb32115d
Signed-off-by: default avatarMichal Berger <michal.berger@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/21421


Tested-by: default avatarSPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: default avatarTomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: default avatarKonrad Sztyber <konrad.sztyber@intel.com>
parent b86184c5
Loading
Loading
Loading
Loading
+2 −13
Original line number Diff line number Diff line
@@ -77,20 +77,9 @@ done

vhosttestinit

# $vm_count VMs, 1CPU per VM, 4CPUs for SPDK, all pinned to node0
source <(gen_cpu_vm_spdk_config "$vm_count" 1 4 "" 0)
spdk_mask=$vhost_0_reactor_mask
if $distribute_cores; then
	source $testdir/autotest.config
	# Adjust the mask so vhost runs on separate cpus than qemu instances.
	# We know that .config sets qemus to run on single cpu so simply take
	# the next cpu and add some extra.
	# FIXME: Rewrite this so the config is more aware of what cpu topology
	# is actually available on the host system.
	spdk_mask=$((1 << vm_count))
	((spdk_mask |= 1 << (vm_count + 1)))
	((spdk_mask |= 1 << (vm_count + 2)))
	((spdk_mask |= 1 << (vm_count + 3)))
	spdk_mask=$(printf '0x%x' "$spdk_mask")
fi

trap 'error_exit "${FUNCNAME}" "${LINENO}"' SIGTERM SIGABRT ERR