How to enable the cores on the Colibri T30

When I call get_nprocs() on the Colibri T30, it returns that there is one core, instead of multiple cores.
In a prior product I had to execute an nvpmodel command to enable all of the cores but this command does not appear to be available. So, how do I enable more cores than just 1?

  1. What exact hardware and software versions of things are you talking about?
  2. Have you had a look at the following article on our developer website?

I have the Colibri T30 module mounted on the Colibri Evaluation Board. At boot it says: Angstrom v2016.12 - Kernel Colibri-T30_LXDE-Image 2.7b4 20171005

If I go to the bootloader prompt and enter “printenv defargs” I get: defargs=core_edp_mv=1300 usb_high_speed=1 max_cpus=4

When I run my program and call get_nprocs(), it returns 1.

When I run the “top” command, even when I press 1, it only ever shows cpu0.

I just ran the program again and called both get_nprocs_conf() and get_nprocs().

get_nprocs_conf() returns 4, get_nprocs() returns 1.

Hi @Roger_Florida

Thanks for you Input.
So what is Issue actually?
As described in the article referenced above, T30 has a hot-plugging feature, which allows enabling/disabling the cores of the CPU.

Could you try to run stress and check if all the cores become active?

Best regards,
Jaski

Sounds like a good suggestion which I tried but I don’t really know what options to enable and what to look for. I tried “stress -v -c 4” in one terminal window and “top” in another window. I can see %CPU at 99.9 but not sure what to look for to see the indication of core usage in either terminal window.

Roger

Usually if you run stress or any other application with heavy cpu load (like stress -c n with n >=2), then the other cores of the CPU become active. You can check this with the following command:

cat /sys/devices/system/cpu/cpu*/online

The cat command returned four 1’s which I presume is 4 cpus online.

However, the MTAPI code (which is standard code developed for the Multicore Association fails. At first, it failed because get_nprocs() was returning only 1 core. Then, when I forced it to call get_nprocs_conf() instead so that it would return 4, it fails when I try to create a thread on a core other than the first core.
The deadly combination is:
pthread_attr_setaffinity_np() which sets the attributes for a thread for multi-core.
then,
pthread_create() actually uses the attributes and returns 22=EINVAL where it indicates:
“cpuset specified a CPU that was outside the set supported by the kernel…”

This is the same code that was working on the iMX7 platform (once we set nvpmodel).

There must be someway to actually enable all of the cores. MTAPI works on the principal that all threads are mapped to cores and ready to operate at the beginning of the code to streamline the code so that threads are not started and stopped during operation. If we cannot do this then it defeats a major benefit of using MTAPI to control a multi-core platform.

Roger

If MTAPI doesn’t support hotpluggable cpus, then it’s probably not a good fit for T30. you can try disabling hotplug by changing:

CONFIG_TEGRA_AUTO_HOTPLUG=y

to

# CONFIG_TEGRA_AUTO_HOTPLUG is not set

in kernel .config and rebuilding it. This is however not a recommended configuration. It will increase power consumption and heat output as well as not being tested.

Okay. One last question on this. Does the WinCE OS for this platform work the same way? One option would be to run the application on Windows.

Dear @Roger_Florida
The WinCe implementation is completely different from the Linux one, therefore the behavior is not the same.
Regards, Andy