[Xiaomi Mi Max ROMs, Kernels, Recoveries, & Other D] Zola III:
################################################################################

# helper functions to allow Android init like script

function write() {

echo -n $2 > $1

}

function copy() {

cat $1 > $2

}

function get-set-forall() {

for f in $1 ; do

cat $f

write $f $2

done

}

################################################################################

# Enable governor for LITTLE CPUs (perrf cluster)

write /sys/devices/system/cpu/cpu0/online 1

write /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor "interactive"

write /sys/devices/system/cpu/cpu0/cpufreq/interactive/above_hispeed_delay 40000

write /sys/devices/system/cpu/cpu0/cpufreq/interactive/go_hispeed_load 90

write /sys/devices/system/cpu/cpu0/cpufreq/interactive/timer_rate 20000

write /sys/devices/system/cpu/cpu0/cpufreq/interactive/hispeed_freq 1017600

write /sys/devices/system/cpu/cpu0/cpufreq/interactive/io_is_busy 1

write /sys/devices/system/cpu/cpu0/cpufreq/interactive/target_loads "80 400000:90 1017600:93 1190400:95"

###"78 400000:86 1017600:91 1382400:93"

###"50 691200:76 1017600:91 1382400:93"

###"53 400000:25 691200:45 806400:49 1017600:66 1190400:88 1305600:94 1382400:97 1401600:99"

write /sys/devices/system/cpu/cpu0/cpufreq/interactive/min_sample_time 20000

write /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq 400000

# note: this session needs also to be applied to core 2 (cpu2).

# Enable governor for Big CUSs (power cluster)

write /sys/devices/system/cpu/cpu4/online 1

write /sys/devices/system/cpu/cpu4/cpufreq/scaling_governor "interactive"

write /sys/devices/system/cpu/cpu4/cpufreq/interactive/above_hispeed_delay 40000

write /sys/devices/system/cpu/cpu4/cpufreq/interactive/go_hispeed_load 90

write /sys/devices/system/cpu/cpu4/cpufreq/interactive/timer_rate 20000

write /sys/devices/system/cpu/cpu4/cpufreq/interactive/hispeed_freq 400000

write /sys/devices/system/cpu/cpu4/cpufreq/interactive/io_is_busy 1

write /sys/devices/system/cpu/cpu4/cpufreq/interactive/target_loads "80 400000:90 1017600:93 1190400:95"

###"36 400000:20 883200:35 940800:51 998400:56 1056000:61 1113600:68 1190400:77 1248000:89 1305600:95 1382400:96 1612800:97 1747200:98 1804800:99"

write /sys/devices/system/cpu/cpu4/cpufreq/interactive/min_sample_time 20000

###write /sys/devices/system/cpu/cpu4/cpufreq/interactive/sampling_down_factor 20000

write /sys/devices/system/cpu/cpu4/cpufreq/scaling_min_freq 400000

write /sys/devices/system/cpu/cpu4/cpufreq/interactive/max_freq_hysteresis 60000

# note: this should be applied & to core 5 (cpu5) + side note in the comment

# Configure core_ctl

write /sys/devices/system/cpu/cpu0/core_ctl/not_preferred "1 0 1 0"

write /sys/devices/system/cpu/cpu0/core_ctl/busy_up_thres 90

write /sys/devices/system/cpu/cpu0/core_ctl/busy_down_thres 78

write /sys/devices/system/cpu/cpu0/core_ctl/min_cpus 2

write /sys/devices/system/cpu/cpu0/core_ctl/max_cpus 4

write /sys/devices/system/cpu/cpu4/core_ctl/not_preferred "1 1 0 0"

write /sys/devices/system/cpu/cpu4/core_ctl/min_cpus 2

write /sys/devices/system/cpu/cpu4/core_ctl/max_cpus 4

write /sys/devices/system/cpu/cpu4/core_ctl/busy_up_thres 90

write /sys/devices/system/cpu/cpu4/core_ctl/busy_down_thres 78

write /sys/devices/system/cpu/cpu4/core_ctl/offline_delay_ms 200

write /sys/devices/system/cpu/cpu4/core_ctl/task_thres 4

write /sys/devices/system/cpu/cpu4/core_ctl/is_big_cluster 1

# set cpu_boost parameters

write /sys/module/cpu_boost/parameters/input_boost_freq "0:1382400 1:0 2:0 3:0 4:0 5:0 6:0 7:0"

write /sys/module/cpu_boost/parameters/input_boost_ms 200

write /proc/sys/kernel/sched_upmigrate_min_nice 15

# set (super) packing parameters

write /sys/devices/system/cpu/cpu0/sched_mostly_idle_freq 400000

write /sys/devices/system/cpu/cpu4/sched_mostly_idle_freq 400000

On a S652 SoC it would be preferable that it's used core 6 instead core 5 so that other L2 block is used & with exclusive access same as it is done on core 2 but we can use it across the bord as S650 have only two big cores. This can boost PCB instruction output up to 30% & use around 6% more power (for a cache to work) it's as balanced as it culd be.

I leave someone to try it, no noobs as it isn't even written completely.

Once again to note as this is a intended to use IO is busy signaling mechanism same needs to be enabled on IO governor's side & I recommend it with deadline, other way it's misjudged.

By the way I hate scripts like this... Best regards.