tegrastats reports only 6 cpu cores.

Hi,
I am a little bit confused by my DRIVE AGX Development Platform (E3550-B03).

Recently I updated its software to newest DRIVE SDK 9.0, and I was surprised by the output of the tegrastats command:

nvidia@tegra-ubuntu:/usr/bin$ tegrastats
RAM 1185/24735MB (lfb 5721x4MB) CPU [0%,0%,1%,1%,0%,0%] GR3D_FREQ 0% AO@31.5C GPU@31C tj@40.5C AUX@30C CPU@31C Tdiode@30.5C

As you can see it shows only 6 CPU cores, and according to documentation on my board should have 8.

I was also trying to setup mode using nvpmodel command:

nvidia@tegra-ubuntu:~$ sudo nvpmodel -m 0
NVPM ERROR: Error opening /sys/devices/system/cpu/cpu0/cpufreq/scaling_available_frequencies: 2
NVPM ERROR: failed to read PARAM CPU_A57: ARG FREQ_TABLE: PATH /sys/devices/system/cpu/cpu0/cpufreq/scaling_available_frequencies
NVPM ERROR: Error opening /sys/devices/system/cpu/cpu1/cpufreq/scaling_available_frequencies: 2
NVPM ERROR: failed to read PARAM CPU_DENVER: ARG FREQ_TABLE: PATH /sys/devices/system/cpu/cpu1/cpufreq/scaling_available_frequencies
NVPM ERROR: Error opening /sys/devices/18000000.vgpu/devfreq/18000000.vgpu/available_frequencies: 2
NVPM ERROR: failed to read PARAM GPU: ARG FREQ_TABLE: PATH /sys/devices/18000000.vgpu/devfreq/18000000.vgpu/available_frequencies
NVPM ERROR: failed to set power mode!
NVPM ERROR: Failed to exec option requests!

Apparently it uses configuration located in /etc/nvpmodel/nvpmodel.conf:

nvidia@tegra-ubuntu:~$ cat /etc/nvpmodel/nvpmodel.conf
#
# Copyright (c) 2017, NVIDIA CORPORATION.  All rights reserved.
#
# NVIDIA CORPORATION and its licensors retain all intellectual property
# and proprietary rights in and to this software, related documentation
# and any modifications thereto.  Any use, reproduction, disclosure or
# distribution of this software and related documentation without an express
# license agreement from NVIDIA CORPORATION is strictly prohibited.
#
# FORMAT:
# < PARAM TYPE=PARAM_TYPE NAME=PARAM_NAME >
# ARG1_NAME ARG1_PATH_VAL
# ARG2_NAME ARG2_PATH_VAL
# ...
# This starts a section of PARAM definitions, in which each line
# has the syntax below:
# ARG_NAME ARG_PATH_VAL
# ARG_NAME is a macro name for argument value ARG_PATH_VAL.
# PARAM_TYPE can be FILE, or CLOCK.
#
# < POWER_MODEL ID=id_num NAME=mode_name >
# PARAM1_NAME ARG11_NAME ARG11_VAL
# PARAM1_NAME ARG12_NAME ARG12_VAL
# PARAM2_NAME ARG21_NAME ARG21_VAL
# ...
# This starts a section of POWER_MODEL configurations, followed by
# lines with parameter settings as the format below:
# PARAM_NAME ARG_NAME ARG_VAL
# PARAM_NAME and ARG_NAME are defined in PARAM definition sections.
# ARG_VAL is an integer for PARAM_TYPE of CLOCK, and -1 is taken
# as INT_MAX. ARG_VAL is a string for PARAM_TYPE of FILE.
# This file must contain at least one POWER_MODEL section.
#
# < PM_CONFIG DEFAULT=default_mode >
# This is a mandatory section to specify one of the defined power
# model as the default.

###########################
#                         #
# PARAM DEFINITIONS       #
#                         #
###########################

< PARAM TYPE=FILE NAME=CPU_ONLINE >
CORE_0 /sys/devices/system/cpu/cpu0/online
CORE_1 /sys/devices/system/cpu/cpu1/online
CORE_2 /sys/devices/system/cpu/cpu2/online
CORE_3 /sys/devices/system/cpu/cpu3/online
CORE_4 /sys/devices/system/cpu/cpu4/online
CORE_5 /sys/devices/system/cpu/cpu5/online

< PARAM TYPE=CLOCK NAME=CPU_A57 >
FREQ_TABLE /sys/devices/system/cpu/cpu0/cpufreq/scaling_available_frequencies
MAX_FREQ /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq
MIN_FREQ /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq

< PARAM TYPE=CLOCK NAME=CPU_DENVER >
FREQ_TABLE /sys/devices/system/cpu/cpu1/cpufreq/scaling_available_frequencies
MAX_FREQ /sys/devices/system/cpu/cpu1/cpufreq/scaling_max_freq
MIN_FREQ /sys/devices/system/cpu/cpu1/cpufreq/scaling_min_freq

< PARAM TYPE=CLOCK NAME=GPU >
FREQ_TABLE /sys/devices/18000000.vgpu/devfreq/18000000.vgpu/available_frequencies
MAX_FREQ /sys/devices/18000000.vgpu/devfreq/18000000.vgpu/max_freq
MIN_FREQ /sys/devices/18000000.vgpu/devfreq/18000000.vgpu/min_freq

###########################
#                         #
# POWER_MODEL DEFINITIONS #
#                         #
###########################

# MAXN is the NONE power model to release all constraints
< POWER_MODEL ID=0 NAME=MAXN >
CPU_ONLINE CORE_1 1
CPU_ONLINE CORE_2 1
CPU_ONLINE CORE_3 1
CPU_ONLINE CORE_4 1
CPU_ONLINE CORE_5 1
CPU_A57 MIN_FREQ 0
CPU_A57 MAX_FREQ 2035200
CPU_DENVER MIN_FREQ 0
CPU_DENVER MAX_FREQ 2035200
GPU MIN_FREQ 0
GPU MAX_FREQ 1300500000

< POWER_MODEL ID=1 NAME=MAXQ >
CPU_ONLINE CORE_1 0
CPU_ONLINE CORE_2 0
CPU_ONLINE CORE_3 1
CPU_ONLINE CORE_4 1
CPU_ONLINE CORE_5 1
CPU_A57 MIN_FREQ 0
CPU_A57 MAX_FREQ 1200000
GPU MIN_FREQ 0
GPU MAX_FREQ 850000000

< POWER_MODEL ID=2 NAME=MAXP_CORE_ALL >
CPU_ONLINE CORE_1 1
CPU_ONLINE CORE_2 1
CPU_ONLINE CORE_3 1
CPU_ONLINE CORE_4 1
CPU_ONLINE CORE_5 1
CPU_A57 MIN_FREQ 0
CPU_A57 MAX_FREQ 1400000
CPU_DENVER MIN_FREQ 0
CPU_DENVER MAX_FREQ 1400000
GPU MIN_FREQ 0
GPU MAX_FREQ 1120000000

< POWER_MODEL ID=3 NAME=MAXP_CORE_ARM >
CPU_ONLINE CORE_1 0
CPU_ONLINE CORE_2 0
CPU_ONLINE CORE_3 1
CPU_ONLINE CORE_4 1
CPU_ONLINE CORE_5 1
CPU_A57 MIN_FREQ 0
CPU_A57 MAX_FREQ 2000000
GPU MIN_FREQ 0
GPU MAX_FREQ 1120000000

< POWER_MODEL ID=4 NAME=MAXP_CORE_DENVER >
CPU_ONLINE CORE_1 1
CPU_ONLINE CORE_2 0
CPU_ONLINE CORE_3 0
CPU_ONLINE CORE_4 0
CPU_ONLINE CORE_5 0
CPU_A57 MIN_FREQ 0
CPU_A57 MAX_FREQ 345600
CPU_DENVER MIN_FREQ 0
CPU_DENVER MAX_FREQ 2035200
GPU MAX_FREQ 1120000000

# mandatory section to configure the default mode
< PM_CONFIG DEFAULT=3 >

which also seems to be not right.
Any thoughts?

Dear infoavwc6,

Thank you for your registration this topic.
We will look into this symptom and update.

Dear infoavwc6,

This is expected; the Hypervisor setup for 5.0.13.2/DRIVE Software 8.0 was 8.0 shared cores across all the VMs, where 5.1.0.2/DRIVE Software 9.0 and later have 6 dedicated cores for the guest OS, and the remaining two shared for the non-guest VMs. This is to give more predictable performance to the guest VM by eliminating any interference from the Foundation Service VMs.

This doesn’t seem to be well documented anywhere unfortunately; best picture from the docs to explain against is below.

https://docs.nvidia.com/drive/active/5.1.0.2L/nvvib_docs/index.html#page/DRIVE%2520Linux%2520HYP%2520PDK%2520Development%2520Guide%2FArchitecture%2Farchi_foundation.html%23

https://docs.nvidia.com/drive/active/5.1.0.2L/nvvib_docs/index.html#page/DRIVE%2520Linux%2520HYP%2520PDK%2520Development%2520Guide%2FUtilities%2FAppendixTegraStats.html%23

Running tegrastats

When you run tegrastats on Linux devices, it prints statistics to stdout.

Example Log Print
RAM 2669/7846MB (lfb 1065x4MB) CPU [100%@345,100%@2419,100%@2419,100%@344,11%@346,100%@345] EMC_FREQ 17%@1600 GR3D_FREQ 0%@114 APE 150 MTS fg 0% bg 0% PLL@43C thermal@42.8C MCPU@43C Tboard@40C AO@42.5C GPU@49C PMIC@100C BCPU@43C Tdiode@43.5C VDD_IN 5224/3423 VDD_CPU 844/712 VDD_GPU 360/361 VDD_SOC 884/664 VDD_WIFI -114/-91 VDD_DDR 240/240