Android was not made for embedded system. It was designed for Mobile phones. You will find many instances where things will not be working as expected, if you are working to make android work for embedded system.
One of the issue was this cpu killing each other to save battery.
<7>[ 154.890391] [rfkill]: rfkill set power 1 <5>[ 158.611398] CPU1: shutdown <6>[ 158.611431] [hotplug]: cpu(0) try to kill cpu(1) <6>[ 158.611495] [hotplug]: cpu1 is killed! . <7>[ 161.110704] CPU1: Booted secondary processor <7>[ 162.610842] CPU3: Booted secondary processor <5>[ 163.611427] CPU1: shutdown <6>[ 163.611454] [hotplug]: cpu(2) try to kill cpu(1) <6>[ 163.612531] [hotplug]: cpu1 is killed! .
If you do
then you will see that some cores are killed not online
Above will give you which cores are online at this moment.
I saw some process named auto_cpu_hotplu but I was not able to kill that process.
Fix was very simple though
echo 0 > /sys/kernel/autohotplug/enable
For highest performance you can issue below commands also
echo performance > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor echo 1 > /sys/devices/system/cpu/cpu0/online echo performance > /sys/devices/system/cpu/cpu1/cpufreq/scaling_governor echo 1 > /sys/devices/system/cpu/cpu1/online echo 1 > /sys/devices/system/cpu/cpu2/online echo 1 > /sys/devices/system/cpu/cpu3/online