lede/target/linux/ipq806x/base-files/etc/init.d/cpu_freq
2022-04-03 19:12:12 +08:00

22 lines
592 B
Bash
Executable File

#!/bin/sh /etc/rc.common
START=15
boot() {
local governor
governor=$(cat /sys/devices/system/cpu/cpufreq/policy0/scaling_governor)
if [ "$governor" = "ondemand" ]; then
# Effective only with ondemand
echo 10 > /sys/devices/system/cpu/cpufreq/ondemand/sampling_down_factor
echo 50 > /sys/devices/system/cpu/cpufreq/ondemand/up_threshold
fi
echo 1000000 > /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq
echo 1000000 > /sys/devices/system/cpu/cpu1/cpufreq/scaling_min_freq
sysctl -w vm.min_free_kbytes=65536
sysctl -w net.netfilter.nf_conntrack_max=65535
}