[Xiaomi Mi Max Guides, News, & Discussion] ioy:
This is my Init.d script I presently use, I've cumulated here your previous draft proposals and hints, please forgive me for its deficiencies and help to improve it:

#!/system/bin/sh
#

sleep 3;

################################# 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 96
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:87 1017600:95 1190400:99"
#1305600

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

# 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
###interactive/above_hispeed_delay 40000
write /sys/devices/system/cpu/cpu4/cpufreq/interactive/go_hispeed_load 96
write /sys/devices/system/cpu/cpu4/cpufreq/interactive/timer_rate 20000
write /sys/devices/system/cpu/cpu4/cpufreq/interactive/hispeed_freq 1017600
write /sys/devices/system/cpu/cpu4/cpufreq/interactive/io_is_busy 1
write /sys/devices/system/cpu/cpu4/cpufreq/interactive/target_loads "87 400000:90 1017600:95 1382400:99"

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

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

# Configure core_ctl
write /sys/devices/system/cpu/cpu0/core_ctl/not_preferred "1 0 0 0"
write /sys/devices/system/cpu/cpu0/core_ctl/busy_up_thres 90
write /sys/devices/system/cpu/cpu0/core_ctl/busy_down_thres 80
write /sys/devices/system/cpu/cpu0/core_ctl/min_cpus 1
write /sys/devices/system/cpu/cpu0/core_ctl/max_cpus 4

write /sys/devices/system/cpu/cpu4/core_ctl/not_preferred "1 0 0 0"
write /sys/devices/system/cpu/cpu4/core_ctl/min_cpus 1
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 80

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:1190400 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

################################
# IO
echo 'deadline' > /sys/block/mmcblk0/queue/scheduler

# GPU
echo '133333333' > /sys/class/kgsl/kgsl-3d0/devfreq/min_freq
echo '20' > /sys/module/adreno_idler/parameters/adreno_idler_downdifferential
echo 'Y' > /sys/module/adreno_idler/parameters/adreno_idler_active
echo '550000000' > /sys/class/kgsl/kgsl-3d0/max_gpuclk
echo 'simple_ondemand' > /sys/class/kgsl/kgsl-3d0/devfreq/governor
echo '20' > /sys/module/adreno_idler/parameters/adreno_idler_idlewait

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

Please forgive me its imperfection, treat it as a draft. Please review it. Thank you very much!

HELIUM, LOCKED bootloader, [ROM][UNOFFICIAL][7.1.1][HYDROGEN/HELIUM]LineageOS 14.1 r.03-27-2017 by*nijel8