Merge "post_boot.sh: Interactive settings for 8916, 8936 and 8939"
This commit is contained in:
commit
1bb9316f93
|
@ -1,5 +1,5 @@
|
||||||
#!/system/bin/sh
|
#!/system/bin/sh
|
||||||
# Copyright (c) 2012-2014, The Linux Foundation. All rights reserved.
|
# Copyright (c) 2012-2013, The Linux Foundation. All rights reserved.
|
||||||
#
|
#
|
||||||
# Redistribution and use in source and binary forms, with or without
|
# Redistribution and use in source and binary forms, with or without
|
||||||
# modification, are permitted provided that the following conditions are met:
|
# modification, are permitted provided that the following conditions are met:
|
||||||
|
@ -456,13 +456,18 @@ esac
|
||||||
|
|
||||||
case "$target" in
|
case "$target" in
|
||||||
"msm8916")
|
"msm8916")
|
||||||
if [ -f /sys/devices/soc0/soc_id ]; then
|
|
||||||
|
if [ -f /sys/devices/soc0/soc_id ]; then
|
||||||
soc_id=`cat /sys/devices/soc0/soc_id`
|
soc_id=`cat /sys/devices/soc0/soc_id`
|
||||||
else
|
else
|
||||||
soc_id=`cat /sys/devices/system/soc/soc0/id`
|
soc_id=`cat /sys/devices/system/soc/soc0/id`
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Apply HMP Task packing for 8916, 8936 and 8939
|
# HMP scheduler settings for 8916, 8936, 8939
|
||||||
|
echo 2 > /proc/sys/kernel/sched_window_stats_policy
|
||||||
|
echo 3 > /proc/sys/kernel/sched_ravg_hist_size
|
||||||
|
|
||||||
|
# HMP Task packing settings for 8916, 8936, 8939
|
||||||
echo 30 > /proc/sys/kernel/sched_small_task
|
echo 30 > /proc/sys/kernel/sched_small_task
|
||||||
echo 50 > /proc/sys/kernel/sched_mostly_idle_load
|
echo 50 > /proc/sys/kernel/sched_mostly_idle_load
|
||||||
echo 10 > /proc/sys/kernel/sched_mostly_idle_nr_run
|
echo 10 > /proc/sys/kernel/sched_mostly_idle_nr_run
|
||||||
|
@ -470,56 +475,110 @@ case "$target" in
|
||||||
# Apply governor settings for 8916
|
# Apply governor settings for 8916
|
||||||
case "$soc_id" in
|
case "$soc_id" in
|
||||||
"206")
|
"206")
|
||||||
|
|
||||||
|
# disable thermal core_control to update scaling_min_freq
|
||||||
|
echo 0 > /sys/module/msm_thermal/core_control/enabled
|
||||||
|
echo 1 > /sys/devices/system/cpu/cpu0/online
|
||||||
echo "interactive" > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
|
echo "interactive" > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
|
||||||
|
echo 800000 > /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq
|
||||||
|
# enable thermal core_control now
|
||||||
|
echo 1 > /sys/module/msm_thermal/core_control/enabled
|
||||||
|
|
||||||
echo "25000 1094400:50000" > /sys/devices/system/cpu/cpufreq/interactive/above_hispeed_delay
|
echo "25000 1094400:50000" > /sys/devices/system/cpu/cpufreq/interactive/above_hispeed_delay
|
||||||
echo 90 > /sys/devices/system/cpu/cpufreq/interactive/go_hispeed_load
|
echo 90 > /sys/devices/system/cpu/cpufreq/interactive/go_hispeed_load
|
||||||
echo 25000 > /sys/devices/system/cpu/cpufreq/interactive/timer_rate
|
echo 25000 > /sys/devices/system/cpu/cpufreq/interactive/timer_rate
|
||||||
echo 998400 > /sys/devices/system/cpu/cpufreq/interactive/hispeed_freq
|
echo 998400 > /sys/devices/system/cpu/cpufreq/interactive/hispeed_freq
|
||||||
echo 0 > /sys/devices/system/cpu/cpufreq/interactive/io_is_busy
|
echo 0 > /sys/devices/system/cpu/cpufreq/interactive/io_is_busy
|
||||||
echo "85 998400:90 1094400:80" > /sys/devices/system/cpu/cpufreq/interactive/target_loads
|
echo "1 800000:85 998400:90 1094400:80" > /sys/devices/system/cpu/cpufreq/interactive/target_loads
|
||||||
echo 50000 > /sys/devices/system/cpu/cpufreq/interactive/min_sample_time
|
echo 50000 > /sys/devices/system/cpu/cpufreq/interactive/min_sample_time
|
||||||
echo 50000 > /sys/devices/system/cpu/cpufreq/interactive/sampling_down_factor
|
echo 50000 > /sys/devices/system/cpu/cpufreq/interactive/sampling_down_factor
|
||||||
|
|
||||||
|
# Bring up all cores online
|
||||||
|
echo 1 > /sys/devices/system/cpu/cpu1/online
|
||||||
|
echo 1 > /sys/devices/system/cpu/cpu2/online
|
||||||
|
echo 1 > /sys/devices/system/cpu/cpu3/online
|
||||||
|
echo 1 > /sys/devices/system/cpu/cpu4/online
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
# Apply governor settings for 8936
|
||||||
|
case "$soc_id" in
|
||||||
|
"233")
|
||||||
|
|
||||||
|
# disable thermal core_control to update scaling_min_freq, interactive gov
|
||||||
|
echo 0 > /sys/module/msm_thermal/core_control/enabled
|
||||||
|
echo 1 > /sys/devices/system/cpu/cpu0/online
|
||||||
|
echo "interactive" > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
|
||||||
echo 800000 > /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq
|
echo 800000 > /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq
|
||||||
|
# enable thermal core_control now
|
||||||
|
echo 1 > /sys/module/msm_thermal/core_control/enabled
|
||||||
|
|
||||||
|
echo "25000 1113600:50000" > /sys/devices/system/cpu/cpufreq/interactive/above_hispeed_delay
|
||||||
|
echo 90 > /sys/devices/system/cpu/cpufreq/interactive/go_hispeed_load
|
||||||
|
echo 25000 > /sys/devices/system/cpu/cpufreq/interactive/timer_rate
|
||||||
|
echo 960000 > /sys/devices/system/cpu/cpufreq/interactive/hispeed_freq
|
||||||
|
echo 0 > /sys/devices/system/cpu/cpufreq/interactive/io_is_busy
|
||||||
|
echo "1 800000:85 1113600:90 1267200:80" > /sys/devices/system/cpu/cpufreq/interactive/target_loads
|
||||||
|
echo 50000 > /sys/devices/system/cpu/cpufreq/interactive/min_sample_time
|
||||||
|
echo 50000 > /sys/devices/system/cpu/cpufreq/interactive/sampling_down_factor
|
||||||
|
|
||||||
|
# Bring up all cores online
|
||||||
|
echo 1 > /sys/devices/system/cpu/cpu1/online
|
||||||
|
echo 1 > /sys/devices/system/cpu/cpu2/online
|
||||||
|
echo 1 > /sys/devices/system/cpu/cpu3/online
|
||||||
|
echo 1 > /sys/devices/system/cpu/cpu4/online
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
# Apply governor settings for 8939
|
# Apply governor settings for 8939
|
||||||
case "$soc_id" in
|
case "$soc_id" in
|
||||||
"239" | "241" )
|
"239" | "241" )
|
||||||
for devfreq_gov in /sys/class/devfreq/qcom,cpubw*/governor
|
|
||||||
do
|
# disable thermal core_control to update interactive gov settings
|
||||||
echo "bw_hwmon" > $devfreq_gov
|
echo 0 > /sys/module/msm_thermal/core_control/enabled
|
||||||
done
|
|
||||||
# enable governor for perf cluster
|
# enable governor for perf cluster
|
||||||
|
echo 1 > /sys/devices/system/cpu/cpu0/online
|
||||||
echo "interactive" > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
|
echo "interactive" > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
|
||||||
echo "25000 800000:50000" > /sys/devices/system/cpu/cpu0/cpufreq/interactive/above_hispeed_delay
|
echo "25000 1113600:50000" > /sys/devices/system/cpu/cpu0/cpufreq/interactive/above_hispeed_delay
|
||||||
echo 90 > /sys/devices/system/cpu/cpu0/cpufreq/interactive/go_hispeed_load
|
echo 90 > /sys/devices/system/cpu/cpu0/cpufreq/interactive/go_hispeed_load
|
||||||
echo 25000 > /sys/devices/system/cpu/cpu0/cpufreq/interactive/timer_rate
|
echo 25000 > /sys/devices/system/cpu/cpu0/cpufreq/interactive/timer_rate
|
||||||
echo 800000 > /sys/devices/system/cpu/cpu0/cpufreq/interactive/hispeed_freq
|
echo 960000 > /sys/devices/system/cpu/cpu0/cpufreq/interactive/hispeed_freq
|
||||||
echo 0 > /sys/devices/system/cpu/cpu0/cpufreq/interactive/io_is_busy
|
echo 0 > /sys/devices/system/cpu/cpu0/cpufreq/interactive/io_is_busy
|
||||||
echo "85 800000:90" > /sys/devices/system/cpu/cpu0/cpufreq/interactive/target_loads
|
echo "1 800000:85 1113600:90 1267200:80" > /sys/devices/system/cpu/cpu0/cpufreq/interactive/target_loads
|
||||||
echo 50000 > /sys/devices/system/cpu/cpu0/cpufreq/interactive/min_sample_time
|
echo 50000 > /sys/devices/system/cpu/cpu0/cpufreq/interactive/min_sample_time
|
||||||
echo 50000 > /sys/devices/system/cpu/cpu0/cpufreq/interactive/sampling_down_factor
|
echo 50000 > /sys/devices/system/cpu/cpu0/cpufreq/interactive/sampling_down_factor
|
||||||
echo 400000 > /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq
|
echo 800000 > /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq
|
||||||
|
|
||||||
# enable governor for power cluster
|
# enable governor for power cluster
|
||||||
|
echo 1 > /sys/devices/system/cpu/cpu4/online
|
||||||
echo "interactive" > /sys/devices/system/cpu/cpu4/cpufreq/scaling_governor
|
echo "interactive" > /sys/devices/system/cpu/cpu4/cpufreq/scaling_governor
|
||||||
echo "25000 499200:50000" > /sys/devices/system/cpu/cpu4/cpufreq/interactive/above_hispeed_delay
|
echo "25000 800000:50000" > /sys/devices/system/cpu/cpu4/cpufreq/interactive/above_hispeed_delay
|
||||||
echo 90 > /sys/devices/system/cpu/cpu4/cpufreq/interactive/go_hispeed_load
|
echo 90 > /sys/devices/system/cpu/cpu4/cpufreq/interactive/go_hispeed_load
|
||||||
echo 25000 > /sys/devices/system/cpu/cpu4/cpufreq/interactive/timer_rate
|
echo 25000 > /sys/devices/system/cpu/cpu4/cpufreq/interactive/timer_rate
|
||||||
echo 499200 > /sys/devices/system/cpu/cpu4/cpufreq/interactive/hispeed_freq
|
echo 800000 > /sys/devices/system/cpu/cpu4/cpufreq/interactive/hispeed_freq
|
||||||
echo 0 > /sys/devices/system/cpu/cpu4/cpufreq/interactive/io_is_busy
|
echo 0 > /sys/devices/system/cpu/cpu4/cpufreq/interactive/io_is_busy
|
||||||
echo "85 499200:90" > /sys/devices/system/cpu/cpu4/cpufreq/interactive/target_loads
|
echo "1 499200:85 800000:90" > /sys/devices/system/cpu/cpu4/cpufreq/interactive/target_loads
|
||||||
echo 50000 > /sys/devices/system/cpu/cpu4/cpufreq/interactive/min_sample_time
|
echo 50000 > /sys/devices/system/cpu/cpu4/cpufreq/interactive/min_sample_time
|
||||||
echo 50000 > /sys/devices/system/cpu/cpu4/cpufreq/interactive/sampling_down_factor
|
echo 50000 > /sys/devices/system/cpu/cpu4/cpufreq/interactive/sampling_down_factor
|
||||||
echo 249600 > /sys/devices/system/cpu/cpu4/cpufreq/scaling_min_freq
|
echo 499200 > /sys/devices/system/cpu/cpu4/cpufreq/scaling_min_freq
|
||||||
|
|
||||||
|
# enable thermal core_control now
|
||||||
|
echo 1 > /sys/module/msm_thermal/core_control/enabled
|
||||||
|
|
||||||
|
# Bring up all cores online
|
||||||
echo 1 > /sys/devices/system/cpu/cpu1/online
|
echo 1 > /sys/devices/system/cpu/cpu1/online
|
||||||
echo 1 > /sys/devices/system/cpu/cpu2/online
|
echo 1 > /sys/devices/system/cpu/cpu2/online
|
||||||
echo 1 > /sys/devices/system/cpu/cpu3/online
|
echo 1 > /sys/devices/system/cpu/cpu3/online
|
||||||
echo 1 > /sys/devices/system/cpu/cpu4/online
|
echo 1 > /sys/devices/system/cpu/cpu4/online
|
||||||
echo 1 > /sys/devices/system/cpu/cpu5/online
|
echo 1 > /sys/devices/system/cpu/cpu5/online
|
||||||
echo 1 > /sys/devices/system/cpu/cpu6/online
|
echo 1 > /sys/devices/system/cpu/cpu6/online
|
||||||
echo 1 > /sys/devices/system/cpu/cpu7/online
|
echo 1 > /sys/devices/system/cpu/cpu7/online
|
||||||
;;
|
|
||||||
|
# HMP scheduler (big.Little cluster related) settings
|
||||||
|
echo 60 > /proc/sys/kernel/sched_upmigrate
|
||||||
|
echo 40 > /proc/sys/kernel/sched_downmigrate
|
||||||
|
;;
|
||||||
esac
|
esac
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
Loading…
Reference in New Issue