[Xiaomi Redmi 3 ROMs, Kernels, Recoveries, & Other ] azerador:
Guys, try this init.d script with kernel settings, for me it's optimal. Test and tell, maybe I can improve this more :confused:

View attachment msm8939_pt.zip

#!/system/bin/sh

# for Snapdragon 616 (msm8939v2):

# perf 800-1497 MHz (0-4), power 200-1209 MHz (4-4)

# other tweaks

# set GPU governor

echo "simple_ondemand" > /sys/devices/soc.0/1c00000.qcom,kgsl-3d0/devfreq/1c00000.qcom,kgsl-3d0/governor

# set I/O Scheduler

echo "row" > /sys/block/mmcblk0/queue/scheduler

echo 128 > /sys/block/mmcblk0/queue/read_ahead_kb

echo "row" > /sys/block/mmcblk1/queue/scheduler

#echo 2048 > /sys/block/mmcblk1/queue/read_ahead_kb

# set ZRAM

swapoff /dev/block/zram0

echo 1 > /sys/block/zram0/reset

echo 199229440 > /sys/block/zram0/disksize

mkswap /dev/block/zram0

swapon /dev/block/zram0

# Enable core control

insmod /system/lib/modules/core_ctl.ko

echo 1 > /sys/module/lpm_levels/lpm_workarounds/dynamic_clock_gating

echo 3 > /proc/sys/kernel/sched_window_stats_policy

echo 3 > /proc/sys/kernel/sched_ravg_hist_size

echo 20000000 > /proc/sys/kernel/sched_ravg_window

# HMP Task packing settings for 8939 V3.0

echo 20 > /proc/sys/kernel/sched_small_task

echo 30 > /proc/sys/kernel/sched_mostly_idle_load

echo 3 > /proc/sys/kernel/sched_mostly_idle_nr_run

echo 0 > /sys/devices/system/cpu/cpu0/sched_prefer_idle

echo 0 > /sys/devices/system/cpu/cpu1/sched_prefer_idle

echo 0 > /sys/devices/system/cpu/cpu2/sched_prefer_idle

echo 0 > /sys/devices/system/cpu/cpu3/sched_prefer_idle

echo 0 > /sys/devices/system/cpu/cpu4/sched_prefer_idle

echo 0 > /sys/devices/system/cpu/cpu5/sched_prefer_idle

echo 0 > /sys/devices/system/cpu/cpu6/sched_prefer_idle

echo 0 > /sys/devices/system/cpu/cpu7/sched_prefer_idle

# disable thermal core_control to update interactive gov settings

echo 0 > /sys/module/msm_thermal/core_control/enabled

# INTERACTIVE GOVERNOR SETTINGS

# enable governor for performance cluster

# available freq: 200000 345600 400000 533333 800000 960000 1113600 1344000 1459200 1497600

echo 1 > /sys/devices/system/cpu/cpu0/online

echo "interactive" > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor

echo "20000 1113600:40000 1344000:80000" > /sys/devices/system/cpu/cpu0/cpufreq/interactive/above_hispeed_delay

echo 99 > /sys/devices/system/cpu/cpu0/cpufreq/interactive/go_hispeed_load

echo 20000 > /sys/devices/system/cpu/cpu0/cpufreq/interactive/timer_rate

echo 1344000 > /sys/devices/system/cpu/cpu0/cpufreq/interactive/hispeed_freq

echo 0 > /sys/devices/system/cpu/cpu0/cpufreq/interactive/io_is_busy

echo 80000 > /sys/devices/system/cpu/cpu0/cpufreq/interactive/timer_slack

echo 0 > /sys/devices/system/cpu/cpu0/cpufreq/interactive/boostpulse_duration

echo 0 > /sys/devices/system/cpu/cpu0/cpufreq/interactive/boost

echo 40000 > /sys/devices/system/cpu/cpu0/cpufreq/interactive/min_sample_time

echo 0 > /sys/devices/system/cpu/cpu0/cpufreq/interactive/max_freq_hysteresis

echo "85 1344000:92 1459200:98 1497600:100 " > /sys/devices/system/cpu/cpu0/cpufreq/interactive/target_loads

# enable governor for powersave cluster

# available freq: 200000 249600 400000 499200 800000 998400 1113600 1209600

echo 1 > /sys/devices/system/cpu/cpu4/online

echo "interactive" > /sys/devices/system/cpu/cpu4/cpufreq/scaling_governor

echo "20000" > /sys/devices/system/cpu/cpu4/cpufreq/interactive/above_hispeed_delay

echo 65 > /sys/devices/system/cpu/cpu4/cpufreq/interactive/go_hispeed_load

echo 20000 > /sys/devices/system/cpu/cpu4/cpufreq/interactive/timer_rate

echo 800000 > /sys/devices/system/cpu/cpu4/cpufreq/interactive/hispeed_freq

echo 0 > /sys/devices/system/cpu/cpu4/cpufreq/interactive/io_is_busy

echo 80000 > /sys/devices/system/cpu/cpu4/cpufreq/interactive/timer_slack

echo 40000 > /sys/devices/system/cpu/cpu4/cpufreq/interactive/boostpulse_duration

echo 0 > /sys/devices/system/cpu/cpu4/cpufreq/interactive/boost

echo "80 800000:82 998400:90 1113600:96 1209600:100" > /sys/devices/system/cpu/cpu4/cpufreq/interactive/target_loads

echo 60000 > /sys/devices/system/cpu/cpu4/cpufreq/interactive/min_sample_time

echo 0 > /sys/devices/system/cpu/cpu4/cpufreq/interactive/max_freq_hysteresis

# 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/cpu2/online

#echo 1 > /sys/devices/system/cpu/cpu3/online

#echo 1 > /sys/devices/system/cpu/cpu5/online

#echo 1 > /sys/devices/system/cpu/cpu6/online

#echo 1 > /sys/devices/system/cpu/cpu7/online

# Bring up all cores online

chmod 644 /sys/devices/system/cpu/cpu4/cpufreq/scaling_min_freq

echo 200000 > /sys/devices/system/cpu/cpu4/cpufreq/scaling_min_freq

chmod 444 /sys/devices/system/cpu/cpu4/cpufreq/scaling_min_freq

chmod 644 /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq

echo 800000 > /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq

chmod 444 /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq

echo 1 > /sys/devices/system/cpu/cpu1/online

chmod 644 /sys/devices/system/cpu/cpu1/cpufreq/scaling_min_freq

echo 800000 > /sys/devices/system/cpu/cpu1/cpufreq/scaling_min_freq

chmod 444 /sys/devices/system/cpu/cpu1/cpufreq/scaling_min_freq

echo 1 > /sys/devices/system/cpu/cpu2/online

chmod 644 /sys/devices/system/cpu/cpu2/cpufreq/scaling_min_freq

echo 800000 > /sys/devices/system/cpu/cpu2/cpufreq/scaling_min_freq

chmod 444 /sys/devices/system/cpu/cpu2/cpufreq/scaling_min_freq

echo 1 > /sys/devices/system/cpu/cpu3/online

chmod 644 /sys/devices/system/cpu/cpu3/cpufreq/scaling_min_freq

echo 800000 > /sys/devices/system/cpu/cpu3/cpufreq/scaling_min_freq

chmod 444 /sys/devices/system/cpu/cpu3/cpufreq/scaling_min_freq

echo 1 > /sys/devices/system/cpu/cpu5/online

chmod 644 /sys/devices/system/cpu/cpu5/cpufreq/scaling_min_freq

echo 200000 > /sys/devices/system/cpu/cpu5/cpufreq/scaling_min_freq

chmod 444 /sys/devices/system/cpu/cpu5/cpufreq/scaling_min_freq

echo 1 > /sys/devices/system/cpu/cpu6/online

chmod 644 /sys/devices/system/cpu/cpu6/cpufreq/scaling_min_freq

echo 200000 > /sys/devices/system/cpu/cpu6/cpufreq/scaling_min_freq

chmod 444 /sys/devices/system/cpu/cpu6/cpufreq/scaling_min_freq

echo 1 > /sys/devices/system/cpu/cpu7/online

chmod 644 /sys/devices/system/cpu/cpu7/cpufreq/scaling_min_freq

echo 200000 > /sys/devices/system/cpu/cpu7/cpufreq/scaling_min_freq

chmod 444 /sys/devices/system/cpu/cpu7/cpufreq/scaling_min_freq

# Enable low power modes

echo 0 > /sys/module/lpm_levels/parameters/sleep_disabled

# HMP scheduler (big.Little cluster related) settings

echo 90 > /proc/sys/kernel/sched_upmigrate

echo 75 > /proc/sys/kernel/sched_downmigrate

# Enable sched guided freq control

echo 1 > /sys/devices/system/cpu/cpu0/cpufreq/interactive/use_sched_load

echo 1 > /sys/devices/system/cpu/cpu0/cpufreq/interactive/use_migration_notif

echo 1 > /sys/devices/system/cpu/cpu4/cpufreq/interactive/use_sched_load

echo 1 > /sys/devices/system/cpu/cpu4/cpufreq/interactive/use_migration_notif

echo 50000 > /proc/sys/kernel/sched_freq_inc_notify

echo 50000 > /proc/sys/kernel/sched_freq_dec_notify

# Big cluster idle

echo 0 > /sys/devices/system/cpu/cpu0/core_ctl/min_cpus

echo 60 85 95 95 > /sys/devices/system/cpu/cpu0/core_ctl/busy_up_thres

echo 20 50 75 75 > /sys/devices/system/cpu/cpu0/core_ctl/busy_down_thres

echo 120 > /sys/devices/system/cpu/cpu0/core_ctl/offline_delay_ms

Forgot to say, CM have no init.d support, you should run it with program (Universal Init.d or else).