Two cores disabled.

I’ve just updated my TX2 to Jetpack 3.0 and can only see four cores in System Monitor.

Also /proc/cpuinfo also shows four cores (not six).

Finally tegrastats shows two of the six cores are ‘off’. How can I enable these other two cores and should I need to be enabling cores?

Hi Ross, you can use nvpmodel to change the profile. If you want to do it manually, you can also set /sys/devices/system/cpu/cpu[0-5]/online to 1. Here’s an example:

At boot, Denver2 is offline for minimal power consumption:

nvidia@tegra-ubuntu:~$ ~/tegrastats
RAM 970/7854MB (lfb 1546x4MB) cpu [0%@2035,off,off,0%@2035,0%@2035,0%@2035]
RAM 971/7854MB (lfb 1546x4MB) cpu [0%@2035,off,off,1%@2035,0%@2035,0%@2035]
RAM 971/7854MB (lfb 1546x4MB) cpu [0%@2035,off,off,1%@2035,0%@2035,0%@2035]

Online the cores using sysfs:

nvidia@tegra-ubuntu:~$ sudo su
root@tegra-ubuntu:/home/nvidia# echo 1 > /sys/devices/system/cpu/cpu1/online
root@tegra-ubuntu:/home/nvidia# echo 1 > /sys/devices/system/cpu/cpu2/online

Confirm Denver2 cores are now online:

nvidia@tegra-ubuntu:~$ ~/tegrastats
RAM 973/7854MB (lfb 1545x4MB) cpu [0%@2035,0%@345,0%@345,0%@2035,0%@2035,0%@2035]
RAM 973/7854MB (lfb 1545x4MB) cpu [1%@2035,1%@345,1%@345,0%@2035,0%@2035,0%@2035]
RAM 973/7854MB (lfb 1545x4MB) cpu [0%@2035,0%@345,0%@345,0%@2035,0%@2035,1%@2035]

Maximize clock governor frequencies:

nvidia@tegra-ubuntu:~$ sudo ./jetson_clocks.sh
[sudo] password for nvidia:

nvidia@tegra-ubuntu:~$ ~/tegrastats
RAM 979/7854MB (lfb 1545x4MB) cpu [0%@2035,0%@2419,0%@2419,0%@2035,0%@2035,0%@2035]
RAM 979/7854MB (lfb 1545x4MB) cpu [1%@2035,0%@2419,0%@2419,0%@2035,0%@2035,0%@2035]
RAM 979/7854MB (lfb 1545x4MB) cpu [0%@2035,0%@2419,0%@2419,0%@2035,0%@2035,0%@2035]

You can look around the sources of ~/jetson_clocks.sh script or sysfs for additional tuning knobs to set.

That was the magic I needed. Time to play.

How did you get 2419 on the two Denver cores? When I run the same commands, I only get 2035 or the same as the ARM cores.

There are five profiles. You can view these and select the mode you want using the commands below:

nvpmodel -p --verbose # Lists all the modes (should be five in Jetpack 3.0)
nvpmodel -m 2 # Switch to power mode 2 MAXP all cores.

Hope that helps.

Thanks! So I’ve been playing with ‘nvpmodel’ and ‘jetson_clocks.sh’ this morning and have a better understanding of the different modes and configurations. To get the all-out max performance out of the TX2, it looks like sudo nvpmodel -m 0 followed by sudo ./jetson_clocks.sh gets me the following output with sudo ./tegrastats:

RAM 1784/7854MB (lfb 1245x4MB) cpu [0%@2018,0%@2034,0%@2035,0%@2022,0%@2018,0%@2022] EMC 0%@1866 APE 150 VDE 1203 GR3D 0%@1300
RAM 1784/7854MB (lfb 1245x4MB) cpu [0%@2004,0%@2040,0%@2036,0%@2014,0%@2018,0%@2019] EMC 0%@1866 APE 150 VDE 1203 GR3D 3%@1300
RAM 1784/7854MB (lfb 1245x4MB) cpu [1%@2032,0%@2048,0%@2048,0%@2033,0%@2035,0%@2032] EMC 0%@1866 APE 150 VDE 1203 GR3D 0%@1300

These numbers agree with the ones I see /etc/nvpmodel.conf.

So my first question is how did dusty_nv get @2419 on the Denver cores???

Next question pertains to sudo nvpmodel -m 4 or POWER_MODEL ID=4 NAME=MAXP_CORE_DENVER. I get the following output.

RAM 1780/7854MB (lfb 1245x4MB) cpu [0%@345,0%@1996,off,off,off,off] EMC 0%@1600 APE 150 VDE 1203 GR3D 0%@1122
RAM 1780/7854MB (lfb 1245x4MB) cpu [1%@346,0%@2041,off,off,off,off] EMC 0%@1600 APE 150 VDE 1203 GR3D 0%@1122

I expected this setting to max out Denver 2.0 in its entirety and shutoff all 4 A57 cores. Now my understanding, based on the /etc/nvpmodel.conf, is that one core of the A57 must be on at all times. And it I want to use only the Denver 2.0 for my task I need to run the following commands.

sudo nvpmodel -m 4
sudo echo 1 > /sys/devices/system/cpu/cpu2/online
sudo ./jetson_clocks.sh
taskset -c 1,2 myprogram

Is there a way to turn off all A57 cores and only use the Denver 2.0?

Pretty sure my board was pre-production and reported the different frequency. Also it appears that CPU0 cannot be offlined.

I will compile the info in this thread into a page on the wiki.

Related question to all this - is it possible to use remoteproc to launch different OS instances on one or more of the cores? Are there examples anywhere of this with the TX1/2?

why cannot we offline CPU0 ? does CPU0 have a specific job ?

Also I am wondering given above question.And Is there a way to dedicating denver cpu to specific job in order to get some sort of real time operating system characteristics.

I believe the IRQ aggregator probably goes to CPU0 (I’m not positive of the full arrangement of this, but you basically need one core assigned to handle interrupts…I wish I knew more about the aggregator topology). No aggregator feeding a core implies no hardware interrupts. You could instead power down other cores…if you need this specific core powered down I think you’re out of luck. If there is something you are trying to accomplish which causes you to want to control this specific core you might give a use-case to figure out a way around it.

The way I rationalize it is that since you turn off cores through Ubuntu, there’s a mechanism in place that will not allows you to turn off ALL six cores. And core 0 is the “parent” core. Now, why you can’t turn off the ARM and only use the Denver cores I’m not sure. Again, this is an educated guess. As far as dedicating a process to a Denver core… One way, while saving power, could be to turn off all cores but 0 (ARM) and 5 (Denver). Then use taskset to run your application on the Denver. Now this is not real-time but it does let you manage resources. A better way would be to use an RTOS like RedHawk for Jetson and shield a particular core.

Hi, I tried switching the CPUs online, but I am getting following write error.

root@tegra-ubuntu:/home/nvidia# cat  /sys/devices/system/cpu/cpu2/online
0
root@tegra-ubuntu:/home/nvidia# echo 1 >  /sys/devices/system/cpu/cpu2/online
bash: echo: write error: Invalid argument

any suggestions?

Which release is this (“head -n 1 /etc/nv_tegra_release”)?

This works for me, what do you get from:

ls -l /sys/devices/system/cpu/cpu2/online
cat /sys/devices/system/cpu/cpu2/online
which echo

If you monitor with “dmesg --follow” does anything show up there?

A strange thing is that ARM cores in TX2 have discontinuous ids. Which is ARM cores (0, 3, 4, 5) and Denver (1, 2). When Denver cores are disabled (default nvpmodel 3). The program cannot run in multiple thread that utilize all ARM cores. The main reason is the program can only find core 0 (ARM) but cannot find core 1 (Denver). It should be better to make them continuous for ARM cores. Some case may need balance between power consumption and performance.

I have the same issue as #12. When I do the dmesg --follow, I get the following errors:

psci: failed to boot CPU1 (-22)
CPU1: failed to boot: -22

CPU1 and CPU2 are the Denver cores and may not necessarily be running at all times. Can you give some more context about when you saw this, e.g., right after boot, after running a command, so on?

What do you see from:

sudo -s
egrep '.+' `find /sys -name online`
exit

You might want to try looking at which cores are online right after boot, and then again after running this command:

sudo nvpmodel -m 0

Here’s the output:

/sys/devices/system/cpu/cpu1/online:0
/sys/devices/system/cpu/cpu2/online:0
/sys/devices/system/cpu/cpu3/online:1
/sys/devices/system/cpu/cpu4/online:1
/sys/devices/system/cpu/cpu5/online:1
/sys/devices/system/cpu/online:0,3-5

I’ll try rebooting in a moment, but I’ve ran top,tegrastats,etc many times over the course of things and have never seen CPU 1 and 2 be online. About a week ago I flashed the board with the latest driver package, not sure of the behavior before the flash.

Ok, after a reboot I was able to set everything finally. Thanks for the help!

Note that you may need to run nvpmodel after a reboot. File “/etc/nvpmodel.conf” stores the setting which will be used after booting.