How to use ARMv8 Processor rev 0 in TX2?

I’m using python for multi-core development.
I know TX2 has one CPU with 6 cores,but when I use multiprocessing package in python,core2 and core3 don’t work as I check in System Monitor.While other cpus are up to 100%.
Here is my python code:
import multiprocessing
def calc():
a=1
while True:
a=a
def func1(x):
calc()
if name == “main”:
pool = multiprocessing.Pool(processes=6)
pool.apply_async(func1, (1, ))
pool.apply_async(func1, (2, ))
pool.apply_async(func1, (3, ))
pool.apply_async(func1, (4, ))
pool.apply_async(func1, (5, ))
pool.apply_async(func1, (6, ))
pool.close()
pool.join()
Here is the system monitor picture:

This is intentional behavior, but is easily reverted. Basically, there was an intent that those two cores be reserved for processes manually scheduled via:
taskset <core> <app> &

If you look at “cat /proc/cmdline”, then you’ll see this argument is being passed to the kernel:
isolcpus=1-2

This argument can be removed, and then the scheduler will use those cores without special instruction. FYI, most kernel arguments, if repeated, use the last version of that kernel argument. So if you add this to the end of the kernel command line, then isolcpus is effectively removed:
isolcpus=

The typical way of doing this is via “/boot/extlinux/extlinux.conf”. The key/value pair “APPEND” is one long line, and if you add a space and the above “isolcpus=” to the end of “APPEND”, and reboot, you should no longer find “isolcpus=1-2” in “cat /proc/cmdline”. This, in turn, means normal scheduling of those cores (the first core is CPU0).

It is also possible that this is introduced in the device tree’s “chosen->bootargs”, but updating device tree is typically not as easy. See:
cat /proc/device-tree/chosen/bootargs

Note that cores 1 and 2 might have slightly higher latency.

1 Like