Move ondemand tweaks to armhwinfo
This commit is contained in:
parent
d39a3f1468
commit
f43516b0ba
@ -87,6 +87,20 @@ prepare_board() {
|
||||
-e "s/^\s\+delaycompress/\t# delaycompress/" "${ConfigFile}"
|
||||
done
|
||||
|
||||
# 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
|
||||
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
|
||||
fi
|
||||
done
|
||||
fi
|
||||
|
||||
# IRQ distribution based on $HARDWARE and/or $BOARD, probably some sort of user feedback (leds)
|
||||
case ${HARDWARE} in
|
||||
Freescale) # i.MX6 boards, send Ethernet to cpu3, MMC to cpu1/cpu2 (when available)
|
||||
@ -228,6 +242,16 @@ prepare_board() {
|
||||
echo 8 >/proc/irq/$i/smp_affinity
|
||||
done
|
||||
;;
|
||||
rock64) # GPU on cpu1, USB3 on cpu2, Ethernet on cpu3
|
||||
for i in $(awk -F':' '/Mali/{print $1}' </proc/interrupts | sed 's/\ //g'); do
|
||||
echo 2 >/proc/irq/$i/smp_affinity
|
||||
done
|
||||
echo 4 >/proc/irq/$(awk -F":" "/xhci/ {print \$1}" </proc/interrupts | sed 's/\ //g')/smp_affinity
|
||||
echo 8 >/proc/irq/$(awk -F":" "/eth0/ {print \$1}" </proc/interrupts | sed 's/\ //g')/smp_affinity
|
||||
echo 7 >/sys/class/net/eth0/queues/rx-0/rps_cpus
|
||||
echo 32768 >/proc/sys/net/core/rps_sock_flow_entries
|
||||
echo 32768 >/sys/class/net/eth0/queues/rx-0/rps_flow_cnt
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
esac
|
||||
|
||||
@ -134,18 +134,7 @@ InstallOpenMediaVault() {
|
||||
. /usr/share/openmediavault/scripts/helper-functions
|
||||
SMB_Options="min receivefile size = 16384\nwrite cache size = 524288\ngetwd cache = yes\nsocket options = TCP_NODELAY IPTOS_LOWDELAY"
|
||||
xmlstarlet ed -L -u "/config/services/smb/extraoptions" -v "$(echo -e "${SMB_Options}")" ${OMV_CONFIG_FILE}
|
||||
grep -q ondemand /etc/default/cpufrequtils && sed -i '/^exit\ 0/i \
|
||||
echo ondemand >/sys/devices/system/cpu/cpu0/cpufreq/scaling_governor \
|
||||
sleep 0.1 \
|
||||
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 \
|
||||
fi \
|
||||
done \
|
||||
' /etc/rc.local
|
||||
|
||||
# Special treatment for ODROID-XU4 (and later Amlogic S912, RK3399 and other big.LITTLE
|
||||
# based devices). Move all NAS daemons to the big cores
|
||||
if [ "${BOARD}" = "odroidxu4" ]; then
|
||||
|
||||
Loading…
Reference in New Issue
Block a user