Skip to content

Commit

Permalink
Remove cpu offline and online from cstate feature
Browse files Browse the repository at this point in the history
Signed-off-by: qwang59 <[email protected]>
  • Loading branch information
qwang59 committed Nov 13, 2024
1 parent 2187c57 commit 790dcfd
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 36 deletions.
33 changes: 0 additions & 33 deletions BM/cstate/powermgr_cstate_tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -879,36 +879,6 @@ turbo_freq_when_idle() {
verify_single_cpu_freq
}

# Function to do CPU offline and online short stress
cpu_off_on_stress() {
local cycle=$1
local dmesg_log

last_dmesg_timestamp

cpu_num=$(lscpu | grep "On-line CPU" | awk '{print $NF}' | awk -F "-" '{print $2}')
[ -n "$cpu_num" ] || block_test "On-line CPU is not available."
test_print_trc "The max CPU number is: $cpu_num "

for ((i = 1; i <= cycle; i++)); do
test_print_trc "CPUs offline online stress cycle$i"
for ((j = 1; j <= cpu_num; j++)); do
do_cmd "echo 0 > /sys/devices/system/cpu/cpu$j/online"
done
sleep 1
for ((j = 1; j <= cpu_num; j++)); do
do_cmd "echo 1 > /sys/devices/system/cpu/cpu$j/online"
done
done

dmesg_log=$(extract_case_dmesg)
if echo "$dmesg_log" | grep -v "IRQ request may fail" | grep -iE "fail|Call Trace|error|BUG|err"; then
die "Kernel dmesg shows failure after CPU offline/online stress: $dmesg_log"
else
test_print_trc "Kernel dmesg shows Okay after CPU offline/online stress."
fi
}

while getopts :t:H arg; do
case $arg in
t)
Expand Down Expand Up @@ -1002,9 +972,6 @@ core_cstate_test() {
verify_turbo_freq_in_c1e)
turbo_freq_when_idle C1E
;;
verify_cpu_offline_online_stress)
cpu_off_on_stress 5
;;
*)
block_test "Wrong Case Id is assigned: $CASE_ID"
;;
Expand Down
1 change: 0 additions & 1 deletion BM/cstate/tests-client
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,3 @@ powermgr_cstate_tests.sh -t verify_client_pkg6_by_disabling_cc8
powermgr_cstate_tests.sh -t verify_client_pkg8_by_disabling_cc10
powermgr_cstate_tests.sh -t verify_cstate_list_by_perf
powermgr_cstate_tests.sh -t verify_residency_latency_override
powermgr_cstate_tests.sh -t verify_cpu_offline_online_stress
2 changes: 0 additions & 2 deletions BM/cstate/tests-server
Original file line number Diff line number Diff line change
Expand Up @@ -28,5 +28,3 @@ powermgr_cstate_tests.sh -t verify_turbo_freq_in_default
powermgr_cstate_tests.sh -t verify_turbo_freq_in_poll
powermgr_cstate_tests.sh -t verify_turbo_freq_in_c1
powermgr_cstate_tests.sh -t verify_turbo_freq_in_c1e
# Below case is verify the CPUs offline and online stress
powermgr_cstate_tests.sh -t verify_cpu_offline_online_stress

0 comments on commit 790dcfd

Please sign in to comment.