Skip to content

Commit

Permalink
[fast/warm-reboot] add cpufreq.default_governor=performance to BOOT_O…
Browse files Browse the repository at this point in the history
…PTIONS (sonic-net#3435)

* [fast/warm-reboot] add cpufreq.default_governor=performance to BOOT_OPTIONS

Append this option to BOOT_OPTIONS variable.

How to verify it
Run fast-reboot or warm-reboot. Check:

admin@sonic:~$ cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
performance
After boot is finalized check that it is reset back to default:

admin@sonic:~$ cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
schedutil
---------

Signed-off-by: Stepan Blyschak <stepanb@nvidia.com>
  • Loading branch information
stepanblyschak authored Oct 14, 2024
1 parent 88ef85c commit 319f58d
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions scripts/fast-reboot
Original file line number Diff line number Diff line change
Expand Up @@ -422,6 +422,12 @@ function setup_reboot_variables()
local fstype=$(blkid -o value -s TYPE ${sonic_dev})
BOOT_OPTIONS="${BOOT_OPTIONS} ssd-upgrader-part=${sonic_dev},${fstype}"
fi
if [[ "$sonic_asic_type" == "mellanox" ]]; then
# Set governor to performance to speed up boot process.
# The governor is reset back to kernel default in warmboot-finalizer script.
BOOT_OPTIONS="${BOOT_OPTIONS} cpufreq.default_governor=performance"
fi
}
function check_docker_exec()
Expand Down

0 comments on commit 319f58d

Please sign in to comment.