Fix RK3588 NAS performance
This commit is contained in:
parent
35d7b325f8
commit
71bd6633c6
@ -558,9 +558,9 @@ CONFIG_CPU_FREQ_TIMES=y
|
||||
# CONFIG_CPU_FREQ_DEFAULT_GOV_PERFORMANCE is not set
|
||||
# CONFIG_CPU_FREQ_DEFAULT_GOV_POWERSAVE is not set
|
||||
# CONFIG_CPU_FREQ_DEFAULT_GOV_USERSPACE is not set
|
||||
# CONFIG_CPU_FREQ_DEFAULT_GOV_ONDEMAND is not set
|
||||
CONFIG_CPU_FREQ_DEFAULT_GOV_ONDEMAND=y
|
||||
# CONFIG_CPU_FREQ_DEFAULT_GOV_CONSERVATIVE is not set
|
||||
CONFIG_CPU_FREQ_DEFAULT_GOV_SCHEDUTIL=y
|
||||
# CONFIG_CPU_FREQ_DEFAULT_GOV_SCHEDUTIL is not set
|
||||
# CONFIG_CPU_FREQ_DEFAULT_GOV_INTERACTIVE is not set
|
||||
CONFIG_CPU_FREQ_GOV_PERFORMANCE=y
|
||||
CONFIG_CPU_FREQ_GOV_POWERSAVE=y
|
||||
|
||||
@ -69,42 +69,18 @@ prepare_board() {
|
||||
find /etc/logrotate.d/. -type f | xargs grep -H -c 'compress' | grep 0$ | cut -d':' -f1 | xargs -r -L1 sed -i '/{/ a compress'
|
||||
sed -i "s/#compress/compress/" /etc/logrotate.conf
|
||||
|
||||
# tweak ondemand cpufreq governor settings to increase cpufreq with IO load
|
||||
grep -q ondemand /etc/default/cpufrequtils
|
||||
if [ $? -eq 0 ]; then
|
||||
echo ondemand > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
|
||||
|
||||
case ${BOARDFAMILY} in
|
||||
station* | media | rockchip-rk3588)
|
||||
prefix="/sys/devices/system/cpu"
|
||||
CPUFreqPolicies=($(ls -d ${prefix}/cpufreq/policy? | sed 's/freq\/policy//'))
|
||||
if [ ${#CPUFreqPolicies[@]} -eq 1 -a -d "${prefix}/cpufreq" ]; then
|
||||
# if there's just a single cpufreq policy ondemand sysfs entries differ
|
||||
CPUFreqPolicies=${prefix}
|
||||
fi
|
||||
for i in "${CPUFreqPolicies[@]}"; do
|
||||
affected_cpu=$(tr -d -c '[:digit:]' <<< ${i})
|
||||
echo ondemand > ${prefix}/cpu${affected_cpu:-0}/cpufreq/scaling_governor
|
||||
echo 1 > ${i}/cpufreq/ondemand/io_is_busy
|
||||
echo 25 > ${i}/cpufreq/ondemand/up_threshold
|
||||
echo 10 > ${i}/cpufreq/ondemand/sampling_down_factor
|
||||
echo 200000 > ${i}/cpufreq/ondemand/sampling_rate
|
||||
done
|
||||
;;
|
||||
*)
|
||||
cd /sys/devices/system/cpu
|
||||
for i in cpufreq/ondemand cpu0/cpufreq/ondemand cpu4/cpufreq/ondemand; do
|
||||
if [ -d $i ]; then
|
||||
echo 1 > ${i}/io_is_busy
|
||||
echo 25 > ${i}/up_threshold
|
||||
echo 10 > ${i}/sampling_down_factor
|
||||
echo 200000 > ${i}/sampling_rate
|
||||
fi
|
||||
done
|
||||
;;
|
||||
esac
|
||||
|
||||
fi
|
||||
# Tweak ondemand cpufreq governor settings to increase cpufreq with IO load.
|
||||
# Don't check what Armbian wants to set, simply honor ondemand being used and
|
||||
# then tweak
|
||||
cd /sys/devices/system/cpu
|
||||
for i in cpufreq/ondemand cpu[0-9]/cpufreq/ondemand cpu[1-9][0-9]/cpufreq/ondemand; do
|
||||
if [ -d $i ]; then
|
||||
echo 1 > ${i}/io_is_busy
|
||||
echo 25 > ${i}/up_threshold
|
||||
echo 10 > ${i}/sampling_down_factor
|
||||
echo 200000 > ${i}/sampling_rate
|
||||
fi
|
||||
done
|
||||
|
||||
# IRQ distribution based on $BOARDFAMILY and/or $BOARD_NAME
|
||||
case ${BOARD} in
|
||||
|
||||
Loading…
Reference in New Issue
Block a user