RK3399 - big.LITTLE core choice optimization
#1
The A72 and A53 core are each (according to Rockchip) optimized for, respectively, high-performance and low power.
How does our system (linux kernel maybe?) choose which processes to put into which core?

For example, if I'm running a single thread process that occupies 100% of one single core, I would like the system to choose the high-performance core in order to complete the task faster, rather than choosing the low power core to save power.

Do we (end users) have any control over this? Should we?
#2
If you're running a new enough kernel, the scheduler should be big.LITTLE aware and should generally do the right thing. I've been perfectly happy with the 5.7 kernel and it's behavior.

On a normal Linux kernel, CPUs 0-3 are the little cores, CPUs 4-5 are the big cores. You should generally see a CPU bound task eventually migrate over to CPU 4 or 5 for the most part.

If you want to toggle cores online/offline, I've got a handful of little utility scripts I wrote that make it easier: https://github.com/syonyk/pinebookpro

But after playing around for a while, I just let the kernel do it's thing.

However, if you really, really want to force a task to run only on the big cores, taskset should do it for you. Just pin it to cores 4 and 5 (the big cores).

Code:
taskset -c 4,5 [your task]

More trouble than it's worth, though. The modern schedulers really do generally get the job done properly.
#3
Thanks for that very clear answer.
-Luc

(06-29-2020, 08:54 AM)Syonyk Wrote: If you're running a new enough kernel, the scheduler should be big.LITTLE aware and should generally do the right thing.  I've been perfectly happy with the 5.7 kernel and it's behavior.

On a normal Linux kernel, CPUs 0-3 are the little cores, CPUs 4-5 are the big cores.  You should generally see a CPU bound task eventually migrate over to CPU 4 or 5 for the most part.

If you want to toggle cores online/offline, I've got a handful of little utility scripts I wrote that make it easier: https://github.com/syonyk/pinebookpro

But after playing around for a while, I just let the kernel do it's thing.

However, if you really, really want to force a task to run only on the big cores, taskset should do it for you.  Just pin it to cores 4 and 5 (the big cores).

Code:
taskset -c 4,5 [your task]

More trouble than it's worth, though.  The modern schedulers really do generally get the job done properly.
#4
we do have control as above, but i have never found it necessary. the scheduler does its thing.


Possibly Related Threads…
Thread Author Replies Views Last Post
  Memory clock speed: 800MHz vs 1600MHz? (NM, RK3399 won't run >800MHz DDR) Syonyk 4 2,874 06-26-2020, 07:22 PM
Last Post: Syonyk
  Rockchip RK3399 PCIe lanes only 2.5GTb/s? Arwen 2 2,968 08-25-2019, 05:51 AM
Last Post: Arwen

Forum Jump:


Users browsing this thread: 1 Guest(s)