Commit e52df268 authored by Michal Berger's avatar Michal Berger Committed by Tomasz Zawadzki
Browse files

test/scheduler: Check if load on all working CPUs is under 80%



Signed-off-by: default avatarMichal Berger <michalx.berger@intel.com>
Signed-off-by: default avatarTomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: I89e31aceb7037c55801f4b7cbd4126bce38ae174
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/7566


Tested-by: default avatarSPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: default avatarKonrad Sztyber <konrad.sztyber@intel.com>
Reviewed-by: default avatarJim Harris <james.r.harris@intel.com>
Reviewed-by: default avatarShuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com>
parent d841e24b
Loading
Loading
Loading
Loading
+9 −0
Original line number Diff line number Diff line
@@ -205,6 +205,15 @@ core_load() {
	sleep $((3 * sched_period))
	update_thread_cpus_map

	# Verify that load is not exceeding 80% on each of the cpus except the main and next cpu
	get_cpu_time 5 user "${cpus[@]:2}"

	for cpu in "${!avg_cpu_time[@]}"; do
		printf '* cpu%u avg load: %u%% (%s)\n' \
			"$cpu" "${avg_cpu_time[cpu]}" "${cpu_times[cpu]}"
		((avg_cpu_time[cpu] <= 80))
	done

	for thread in \
		"$thread0" \
		"$thread1" \