Commit da0454f8 authored by Michal Berger's avatar Michal Berger Committed by Konrad Sztyber
Browse files

test/vhost: Remove limiting of the vhost kernel threads

This was mainly targeted for the performances TCs but it's been
recently decided to simply drop this due to the issues like:

https://github.com/spdk/spdk/issues/3482



We will simply not touch kernel's threads at all and point out
in actual reports why it is so.

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


Tested-by: default avatarSPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: default avatarKonrad Sztyber <konrad.sztyber@intel.com>
Reviewed-by: default avatarJim Harris <jim.harris@samsung.com>
parent e591409f
Loading
Loading
Loading
Loading
+0 −35
Original line number Diff line number Diff line
@@ -1406,41 +1406,6 @@ function get_free_tcp_port() {
	echo "$port"
}

function limit_vhost_kernel_threads() {
	local cpus=$1 nodes cpu _cpus=() _nodes=()
	local _pids=() pid cgroup pid

	xtrace_disable_per_cmd map_cpus

	_cpus=($(parse_cpu_list <(echo "$cpus")))

	for cpu in "${_cpus[@]}"; do
		_nodes+=("${cpu_node_map[cpu]}")
	done

	nodes=$(fold_array_onto_string "${_nodes[@]}")

	# vhost kernel threads are named as vhost-PID
	_pids=($(pgrep vhost))
	((${#_pids[@]} > 0)) || return 1

	# All threads should be located under the same initial cgroup. kthreadd does not put them
	# under root cgroup, but rather the cgroup of a session from which target/vhost was configured.
	# We create dedicated cgroup under the initial one to move all the threads only once instead of
	# having an extra step of moving them to the root cgroup first.
	set_cgroup_attr_top_bottom "${_pids[0]}" cgroup.subtree_control "+cpuset"

	cgroup=$(get_cgroup "${_pids[0]}")
	create_cgroup "$cgroup/vhost"

	set_cgroup_attr "$cgroup/vhost" cpuset.cpus "$cpus"
	set_cgroup_attr "$cgroup/vhost" cpuset.mems "$nodes"

	for pid in "${_pids[@]}"; do
		move_proc "$pid" "$cgroup/vhost" "$cgroup" cgroup.threads
	done
}

function gen_cpu_vm_spdk_config() (
	local vm_count=$1 vm_cpu_num=$2 vm
	local spdk_cpu_num=${3:-1} spdk_cpu_list=${4:-} spdk_cpus
+0 −4
Original line number Diff line number Diff line
@@ -467,10 +467,6 @@ done
# Gather perf stats only from the vhost cpus
perf_cpus=${vhost_reactor_mask//[\[\]]/}

if [[ $ctrl_type == "kernel_vhost" ]]; then
	limit_vhost_kernel_threads "$perf_cpus"
fi

# Run FIO traffic
for fio_job in ${fio_jobs//,/ }; do
	((enable_irq == 1)) && irqs $used_vms