Skip to content

Commit

Permalink
ZZMOOVE Parameters added into customconfig, profiles and cortex brain…
Browse files Browse the repository at this point in the history
… script!
  • Loading branch information
alucard24 authored and dorimanx committed Jul 5, 2013
1 parent b8d6b8a commit b7696db
Show file tree
Hide file tree
Showing 7 changed files with 230 additions and 0 deletions.
20 changes: 20 additions & 0 deletions res/customconfig/battery.profile
Expand Up @@ -55,6 +55,16 @@ hotplug_freq_fst=500000
hotplug_freq_snd=200000
up_load=65
down_load=30
sampling_down_max_mom=0
sampling_down_mom_sens=50
up_threshold_hp_fst=68
down_threshold_hp_fst=55
smooth_up=75
freq_limit=0
fast_scaling=0
early_demand=0
grad_up_threshold=50
disable_hotplug=0
scaling_governor_sleep=ondemand
up_threshold_sleep=80
up_threshold_at_min_freq_sleep=60
Expand All @@ -81,6 +91,16 @@ hotplug_freq_fst_sleep=500000
hotplug_freq_snd_sleep=200000
up_load_sleep=65
down_load_sleep=30
sampling_down_max_mom_sleep=0
sampling_down_mom_sens_sleep=50
up_threshold_hp_fst_sleep=68
down_threshold_hp_fst_sleep=55
smooth_up_sleep=100
freq_limit_sleep=0
fast_scaling_sleep=0
early_demand_sleep=0
grad_up_threshold_sleep=50
disable_hotplug_sleep=0
cortexbrain_read_ahead_kb=0
scheduler=bfq
sleep_scheduler=bfq
Expand Down
60 changes: 60 additions & 0 deletions res/customconfig/customconfig.xml
Expand Up @@ -186,6 +186,36 @@

</settingsPane>

<settingsPane description="ZZMOOVE Gov Configuration, see descriptions" name="ZZMOOVE GOV CONFIGURATON">

<seekBar description="Max sampling down factor which should be set by momentum (0 disable momentum, possible range from sampling_down_factor up to 100000. (Default: 0)" name="sampling_down_max_mom" action="generic_cortex /tmp/sampling_down_max_mom" unit="int" min="0" reversed="false" step="10" max="100000"/>

<seekBar description="How fast the sampling down factor should be switched (possible values from 1 to 500. (Default: 50)" name="sampling_down_mom_sens" action="generic_cortex /tmp/sampling_down_mom_sens" unit="int" min="1" reversed="false" step="10" max="500"/>

<seekBar description="Hotplug threshold for cpu1 (0 disable core1, possible range from down_threshold up to 100) (Default: 68%)" name="up_threshold_hp_fst" action="generic_cortex /tmp/up_threshold_hp_fst" unit="%" min="0" reversed="false" step="1" max="100"/>

<seekBar description="Hotplug threshold for cpu1 (possible range from 11 to under up_threshold). (Default: 55%)" name="down_threshold_hp_fst" action="generic_cortex /tmp/down_threshold_hp_fst" unit="%" min="0" reversed="false" step="1" max="100"/>

<seekBar description="This modification makes the governor use two lookup tables holding current, next and previous frequency to directly get a correct target frequency instead of calculating target frequencies with up_threshold and step_up percentage. The two scaling lookup tables used contain different scaling steps/frequencies to achieve faster upscaling on higher CPU load. (Default: 75%)" name="smooth_up" action="generic_cortex /tmp/smooth_up" unit="%" min="0" reversed="false" step="1" max="100"/>

<seekBar description="Limit frequency. (possible values 0 disable limit, 100000 kHz - 1600000 kHz) (Default: 0 kHz)" name="freq_limit" action="generic_cortex /tmp/freq_limit" unit="kHz" min="0" reversed="false" step="100000" max="1600000"/>

<seekBar description="1-4 number of scaling jumps only for upscaling, 5-8 equivalent to 1-4 for up and down scaling. (Default: 0)" name="fast_scaling" action="generic_cortex /tmp/fast_scaling" unit="int" min="0" reversed="false" step="1" max="8"/>

<spinner description="Switch to enable/disable early demand functionality (possible values 0 disable or 1 enable. (Default: Disabled)" name="early_demand" action="generic_cortex /tmp/early_demand">
<spinnerItem name="Disabled" value="0"/>
<spinnerItem name="Enabled" value="1"/>
</spinner>

<seekBar description="Scale up frequency if the load goes up in one step of grad up value. (Default: 50%)" name="grad_up_threshold" action="generic_cortex /tmp/grad_up_threshold" unit="%" min="11" reversed="false" step="1" max="100"/>

<spinner description="Switch to enable/disable hotplugging (possible values are any value above 0 to disable hotplugging and 0 to enable it. (Default: Enabled)" name="disable_hotplug" action="generic_cortex /tmp/disable_hotplug">
<spinnerItem name="Enabled" value="0"/>
<spinnerItem name="Disabled" value="1"/>
</spinner>

</settingsPane>

</settingsTab>

<settingsTab name="CPU-TUNING (SLEEP)">
Expand Down Expand Up @@ -265,6 +295,36 @@

</settingsPane>

<settingsPane description="ZZMOOVE Gov Configuration, see descriptions" name="ZZMOOVE GOV CONFIGURATON">

<seekBar description="Max sampling down factor which should be set by momentum (0 disable momentum, possible range from sampling_down_factor up to 100000. (Default: 0)" name="sampling_down_max_mom_sleep" action="generic_cortex /tmp/sampling_down_max_mom_sleep" unit="int" min="0" reversed="false" step="10" max="100000"/>

<seekBar description="How fast the sampling down factor should be switched (possible values from 1 to 500. (Default: 50)" name="sampling_down_mom_sens_sleep" action="generic_cortex /tmp/sampling_down_mom_sens_sleep" unit="int" min="1" reversed="false" step="10" max="500"/>

<seekBar description="Hotplug threshold for cpu1 (0 disable core1, possible range from down_threshold up to 100) (Default: 68%)" name="up_threshold_hp_fst_sleep" action="generic_cortex /tmp/up_threshold_hp_fst_sleep" unit="%" min="0" reversed="false" step="1" max="100"/>

<seekBar description="Hotplug threshold for cpu1 (possible range from 11 to under up_threshold). (Default: 55%)" name="down_threshold_hp_fst_sleep" action="generic_cortex /tmp/down_threshold_hp_fst_sleep" unit="%" min="0" reversed="false" step="1" max="100"/>

<seekBar description="This modification makes the governor use two lookup tables holding current, next and previous frequency to directly get a correct target frequency instead of calculating target frequencies with up_threshold and step_up percentage. The two scaling lookup tables used contain different scaling steps/frequencies to achieve faster upscaling on higher CPU load. (Default: 100%)" name="smooth_up_sleep" action="generic_cortex /tmp/smooth_up_sleep" unit="%" min="0" reversed="false" step="1" max="100"/>

<seekBar description="Limit frequency. (possible values 0 disable limit, 100000 kHz - 1600000 kHz) (Default: 0 kHz)" name="freq_limit_sleep" action="generic_cortex /tmp/freq_limit_sleep" unit="kHz" min="0" reversed="false" step="100000" max="1600000"/>

<seekBar description="1-4 number of scaling jumps only for upscaling, 5-8 equivalent to 1-4 for up and down scaling. (Default: 0)" name="fast_scaling_sleep" action="generic_cortex /tmp/fast_scaling_sleep" unit="int" min="0" reversed="false" step="1" max="8"/>

<spinner description="Switch to enable/disable early demand functionality (possible values 0 disable or 1 enable. (Default: Disabled)" name="early_demand_sleep" action="generic_cortex /tmp/early_demand_sleep">
<spinnerItem name="Disabled" value="0"/>
<spinnerItem name="Enabled" value="1"/>
</spinner>

<seekBar description="Scale up frequency if the load goes up in one step of grad up value. (Default: 50%)" name="grad_up_threshold_sleep" action="generic_cortex /tmp/grad_up_threshold_sleep" unit="%" min="11" reversed="false" step="1" max="100"/>

<spinner description="Switch to enable/disable hotplugging (possible values are any value above 0 to disable hotplugging and 0 to enable it. (Default: Enabled)" name="disable_hotplug_sleep" action="generic_cortex /tmp/disable_hotplug_sleep">
<spinnerItem name="Enabled" value="0"/>
<spinnerItem name="Disabled" value="1"/>
</spinner>

</settingsPane>

</settingsTab>

<settingsTab name="IO">
Expand Down
20 changes: 20 additions & 0 deletions res/customconfig/default.profile
Expand Up @@ -55,6 +55,16 @@ hotplug_freq_fst=500000
hotplug_freq_snd=200000
up_load=65
down_load=30
sampling_down_max_mom=0
sampling_down_mom_sens=50
up_threshold_hp_fst=68
down_threshold_hp_fst=55
smooth_up=75
freq_limit=0
fast_scaling=0
early_demand=0
grad_up_threshold=50
disable_hotplug=0
scaling_governor_sleep=ondemand
up_threshold_sleep=70
up_threshold_at_min_freq_sleep=70
Expand All @@ -81,6 +91,16 @@ hotplug_freq_fst_sleep=500000
hotplug_freq_snd_sleep=200000
up_load_sleep=65
down_load_sleep=30
sampling_down_max_mom_sleep=0
sampling_down_mom_sens_sleep=50
up_threshold_hp_fst_sleep=68
down_threshold_hp_fst_sleep=55
smooth_up_sleep=100
freq_limit_sleep=0
fast_scaling_sleep=0
early_demand_sleep=0
grad_up_threshold_sleep=50
disable_hotplug_sleep=0
cortexbrain_read_ahead_kb=0
scheduler=bfq
sleep_scheduler=bfq
Expand Down
20 changes: 20 additions & 0 deletions res/customconfig/extreme_battery.profile
Expand Up @@ -55,6 +55,16 @@ hotplug_freq_fst=500000
hotplug_freq_snd=200000
up_load=65
down_load=30
sampling_down_max_mom=0
sampling_down_mom_sens=50
up_threshold_hp_fst=68
down_threshold_hp_fst=55
smooth_up=75
freq_limit=0
fast_scaling=0
early_demand=0
grad_up_threshold=50
disable_hotplug=0
scaling_governor_sleep=ondemand
up_threshold_sleep=80
up_threshold_at_min_freq_sleep=60
Expand All @@ -81,6 +91,16 @@ hotplug_freq_fst_sleep=500000
hotplug_freq_snd_sleep=200000
up_load_sleep=65
down_load_sleep=30
sampling_down_max_mom_sleep=0
sampling_down_mom_sens_sleep=50
up_threshold_hp_fst_sleep=68
down_threshold_hp_fst_sleep=55
smooth_up_sleep=100
freq_limit_sleep=0
fast_scaling_sleep=0
early_demand_sleep=0
grad_up_threshold_sleep=50
disable_hotplug_sleep=0
cortexbrain_read_ahead_kb=0
scheduler=bfq
sleep_scheduler=bfq
Expand Down
20 changes: 20 additions & 0 deletions res/customconfig/extreme_performance.profile
Expand Up @@ -55,6 +55,16 @@ hotplug_freq_fst=500000
hotplug_freq_snd=200000
up_load=65
down_load=30
sampling_down_max_mom=0
sampling_down_mom_sens=50
up_threshold_hp_fst=68
down_threshold_hp_fst=55
smooth_up=75
freq_limit=0
fast_scaling=0
early_demand=0
grad_up_threshold=50
disable_hotplug=0
scaling_governor_sleep=HYPER
up_threshold_sleep=70
up_threshold_at_min_freq_sleep=70
Expand All @@ -81,6 +91,16 @@ hotplug_freq_fst_sleep=500000
hotplug_freq_snd_sleep=200000
up_load_sleep=65
down_load_sleep=30
sampling_down_max_mom_sleep=0
sampling_down_mom_sens_sleep=50
up_threshold_hp_fst_sleep=68
down_threshold_hp_fst_sleep=55
smooth_up_sleep=100
freq_limit_sleep=0
fast_scaling_sleep=0
early_demand_sleep=0
grad_up_threshold_sleep=50
disable_hotplug_sleep=0
cortexbrain_read_ahead_kb=0
scheduler=bfq
sleep_scheduler=bfq
Expand Down
20 changes: 20 additions & 0 deletions res/customconfig/performance.profile
Expand Up @@ -55,6 +55,16 @@ hotplug_freq_fst=500000
hotplug_freq_snd=200000
up_load=65
down_load=30
sampling_down_max_mom=0
sampling_down_mom_sens=50
up_threshold_hp_fst=68
down_threshold_hp_fst=55
smooth_up=75
freq_limit=0
fast_scaling=0
early_demand=0
grad_up_threshold=50
disable_hotplug=0
scaling_governor_sleep=ondemand
up_threshold_sleep=70
up_threshold_at_min_freq_sleep=70
Expand All @@ -81,6 +91,16 @@ hotplug_freq_fst_sleep=500000
hotplug_freq_snd_sleep=200000
up_load_sleep=65
down_load_sleep=30
sampling_down_max_mom_sleep=0
sampling_down_mom_sens_sleep=50
up_threshold_hp_fst_sleep=68
down_threshold_hp_fst_sleep=55
smooth_up_sleep=100
freq_limit_sleep=0
fast_scaling_sleep=0
early_demand_sleep=0
grad_up_threshold_sleep=50
disable_hotplug_sleep=0
cortexbrain_read_ahead_kb=0
scheduler=bfq
sleep_scheduler=bfq
Expand Down
70 changes: 70 additions & 0 deletions sbin/ext/cortexbrain-tune.sh
Expand Up @@ -461,6 +461,56 @@ CPU_GOV_TWEAKS()
freq_for_responsiveness_tmp=$freq_responsiveness_tmp;
fi;

local sampling_down_max_mom_tmp="/sys/devices/system/cpu/cpufreq/$SYSTEM_GOVERNOR/sampling_down_max_mom";
if [ ! -e $sampling_down_max_mom_tmp ]; then
sampling_down_max_mom_tmp="/dev/null";
fi;

local sampling_down_mom_sens_tmp="/sys/devices/system/cpu/cpufreq/$SYSTEM_GOVERNOR/sampling_down_mom_sens";
if [ ! -e $sampling_down_mom_sens_tmp ]; then
sampling_down_mom_sens_tmp="/dev/null";
fi;

local up_threshold_hp_fst_tmp="/sys/devices/system/cpu/cpufreq/$SYSTEM_GOVERNOR/up_threshold_hotplug1";
if [ ! -e $up_threshold_hp_fst_tmp ]; then
up_threshold_hp_fst_tmp="/dev/null";
fi;

local down_threshold_hp_fst_tmp="/sys/devices/system/cpu/cpufreq/$SYSTEM_GOVERNOR/down_threshold_hotplug1";
if [ ! -e $down_threshold_hp_fst_tmp ]; then
down_threshold_hp_fst_tmp="/dev/null";
fi;

local smooth_up_tmp="/sys/devices/system/cpu/cpufreq/$SYSTEM_GOVERNOR/smooth_up";
if [ ! -e $smooth_up_tmp ]; then
smooth_up_tmp="/dev/null";
fi;

local freq_limit_tmp="/sys/devices/system/cpu/cpufreq/$SYSTEM_GOVERNOR/freq_limit";
if [ ! -e $freq_limit_tmp ]; then
freq_limit_tmp="/dev/null";
fi;

local fast_scaling_tmp="/sys/devices/system/cpu/cpufreq/$SYSTEM_GOVERNOR/fast_scaling";
if [ ! -e $fast_scaling_tmp ]; then
fast_scaling_tmp="/dev/null";
fi;

local early_demand_tmp="/sys/devices/system/cpu/cpufreq/$SYSTEM_GOVERNOR/early_demand";
if [ ! -e $early_demand_tmp ]; then
early_demand_tmp="/dev/null";
fi;

local grad_up_threshold_tmp="/sys/devices/system/cpu/cpufreq/$SYSTEM_GOVERNOR/grad_up_threshold";
if [ ! -e $grad_up_threshold_tmp ]; then
grad_up_threshold_tmp="/dev/null";
fi;

local disable_hotplug_tmp="/sys/devices/system/cpu/cpufreq/$SYSTEM_GOVERNOR/disable_hotplug";
if [ ! -e $disable_hotplug_tmp ]; then
disable_hotplug_tmp="/dev/null";
fi;

# sleep-settings
if [ "$state" == "sleep" ]; then
echo "$sampling_rate_sleep" > $sampling_rate_tmp;
Expand Down Expand Up @@ -489,6 +539,16 @@ CPU_GOV_TWEAKS()
echo "$dec_cpu_load_sleep" > $dec_cpu_load_tmp;
echo "$freq_up_brake_at_min_freq_sleep" > $freq_up_brake_at_min_freq_tmp;
echo "$freq_up_brake_sleep" > $freq_up_brake_tmp;
echo "$sampling_down_max_mom_sleep" > $sampling_down_max_mom_tmp;
echo "$sampling_down_mom_sens_sleep" > $sampling_down_mom_sens_tmp;
echo "$up_threshold_hp_fst_sleep" > $up_threshold_hp_fst_tmp;
echo "$down_threshold_hp_fst_sleep" > $down_threshold_hp_fst_tmp;
echo "$smooth_up_sleep" > $smooth_up_tmp;
echo "$freq_limit_sleep" > $freq_limit_tmp;
echo "$fast_scaling_sleep" > $fast_scaling_tmp;
echo "$early_demand_sleep" > $early_demand_tmp;
echo "$grad_up_threshold_sleep" > $grad_up_threshold_tmp;
echo "$disable_hotplug_sleep" > $disable_hotplug_tmp;
# awake-settings
elif [ "$state" == "awake" ]; then
echo "$sampling_rate" > $sampling_rate_tmp;
Expand Down Expand Up @@ -517,6 +577,16 @@ CPU_GOV_TWEAKS()
echo "$dec_cpu_load" > $dec_cpu_load_tmp;
echo "$freq_up_brake_at_min_freq" > $freq_up_brake_at_min_freq_tmp;
echo "$freq_up_brake" > $freq_up_brake_tmp;
echo "$sampling_down_max_mom" > $sampling_down_max_mom_tmp;
echo "$sampling_down_mom_sens" > $sampling_down_mom_sens_tmp;
echo "$up_threshold_hp_fst" > $up_threshold_hp_fst_tmp;
echo "$down_threshold_hp_fst" > $down_threshold_hp_fst_tmp;
echo "$smooth_up" > $smooth_up_tmp;
echo "$freq_limit" > $freq_limit_tmp;
echo "$fast_scaling" > $fast_scaling_tmp;
echo "$early_demand" > $early_demand_tmp;
echo "$grad_up_threshold" > $grad_up_threshold_tmp;
echo "$disable_hotplug" > $disable_hotplug_tmp;
fi;

CPU_INTELLI_PLUG_TWEAKS;
Expand Down

0 comments on commit b7696db

Please sign in to comment.