Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Correct the CPUs number for the CPUs offline and online #398

Merged
merged 1 commit into from
Sep 6, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions BM/cstate/powermgr_cstate_tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -815,7 +815,7 @@ verify_single_cpu_freq() {

# Enable all the CPUs idle cstate
for ((i = 0; i < length; i++)); do
for ((j = 0; j < cpus_num; j++)); do
for ((j = 0; j <= cpus_num; j++)); do
do_cmd "echo 0 > grep . /sys/devices/system/cpu/cpu$j/cpuidle/state$i/disable"
done
done
Expand Down Expand Up @@ -851,20 +851,20 @@ turbo_freq_when_idle() {
# If test idle state is POLL/C1/C1E, then disable all the other deeper idle cstate
if [[ "$idle_state" == POLL ]]; then
for ((i = 1; i < length; i++)); do
for ((j = 0; j < cpus_num; j++)); do
for ((j = 0; j <= cpus_num; j++)); do
do_cmd "echo 1 > grep . /sys/devices/system/cpu/cpu$j/cpuidle/state$i/disable"
done
done
elif [[ "$idle_state" == C1 ]]; then
for ((i = 2; i < length; i++)); do
for ((j = 0; j < cpus_num; j++)); do
for ((j = 0; j <= cpus_num; j++)); do
do_cmd "echo 1 > grep . /sys/devices/system/cpu/cpu$j/cpuidle/state$i/disable"
done
done
elif [[ "$idle_state" == C1E ]]; then
if grep -q 'C1E' /sys/devices/system/cpu/cpu0/cpuidle/state*/name; then
for ((i = 3; i < length; i++)); do
for ((j = 0; j < cpus_num; j++)); do
for ((j = 0; j <= cpus_num; j++)); do
do_cmd "echo 1 > grep . /sys/devices/system/cpu/cpu$j/cpuidle/state$i/disable"
done
done
Expand Down
Loading