A regular Android system is trying to be conservative. Therefore, if you create a new thread and start some heavy calculations, the Linux kernel first runs on one core and increases its base speed. As soon as the kernel is “busy” over a certain threshold for a while, only then does the kernel launch another kernel.
The same is true in a different direction: as soon as the system calms down, it will slowly turn off the cores and reduce the frequency.
From a developer's point of view, you cannot influence this on “normal” Android. Android does not have an API to wake up a certain number of cores or set a specific core frequency.
If you can switch to an embedded Android, you will have more options, as a regular Linux kernel has options for influencing the main frequencies and the number of active kernels. This is done through the "governors." There are several options in a regular Linux kernel. On this issue, you are interested in tuning a performance controller that will keep you awake at the highest frequency.
The Linux kernel interface is located in the / sys file system. I am going to show the adb shell commands here and leave it to you to turn it into Java, read and write commands.
cd /sys/devices/system/cpu
In this directory you will find virtual files indicating how many cores are present in the system:
cat possible
should give the answer 0-3 in your Tegra 3 case. The kernel does not know that if only one core works, it secretly goes to the spare low-power core. There are also directories cpu0 cpu1 cpu2 cpu3. Depending on the kernel version, they can only appear if the kernel is activated. Each of the cpu directories contains a cpufreq directory, where you can interact with the cpufreq subsystem . It should contain a scaling_available_governors file that shows which cpu controllers are available. You can only do this on the root system:
echo "performance" >cpu0/cpufreq/scaling_governor
Set a regulator that will maintain the core at the highest frequency. On an undisturbed system, you will receive a "resolved" error message.
To show the impact of this behavior, Vector Fabrics created a test application that runs the inpainting algorithm on OpenCV in parallel. The application measures both serial and parallel performance up to 4 cores. Even with the parallel operation of the version twice, the measurements change due to the launch of the cores. See for yourself (download the form in the application store): http://www.vectorfabrics.com/products/case-study/opencv_inpaint