Difference between revisions of "Jetson/AGX Xavier Performance Governor"

From eLinux.org
Jump to: navigation, search
 
Line 32: Line 32:
 
RAM 1763/15827MB (lfb 3332x4MB) CPU [0%@1190,0%@1190,0%@1190,0%@1190,0%@1190,0%@1190,0%@1190,0%@1190] EMC_FREQ 0%@2133 GR3D_FREQ 0%@1377 APE 150 MTS fg 0% bg 0% AO@41.5C GPU@43C Tboard@42C Tdiode@44.75C AUX@41.5C CPU@43C thermal@42.6C PMIC@100C GPU 1065/1065 CPU 456/456 SOC 2435/2435 CV 0/0 VDDRQ 0/0 SYS5V 2224/2224</pre>
 
RAM 1763/15827MB (lfb 3332x4MB) CPU [0%@1190,0%@1190,0%@1190,0%@1190,0%@1190,0%@1190,0%@1190,0%@1190] EMC_FREQ 0%@2133 GR3D_FREQ 0%@1377 APE 150 MTS fg 0% bg 0% AO@41.5C GPU@43C Tboard@42C Tdiode@44.75C AUX@41.5C CPU@43C thermal@42.6C PMIC@100C GPU 1065/1065 CPU 456/456 SOC 2435/2435 CV 0/0 VDDRQ 0/0 SYS5V 2224/2224</pre>
 
== Emulate thermal throttle ==
 
== Emulate thermal throttle ==
TODO
+
 
 +
Run below command can emulate thermal throttle
 +
 
 +
==== Use pid_thermal_gov thermal governor ====
 +
  # echo pid_thermal_gov > /sys/class/thermal/thermal_zone1/policy
 +
==== Emulate high temperature ====
 +
  # echo 97000 > /sys/class/thermal/thermal_zone1/emul_temp
 +
==== Check GPU frequency ====
 +
<pre style="margin-left:30px; color:#B0B0B0; background-color:#111111; white-space:pre-wrap;">
 +
root@jetson-0422418042089:~# /home/nvidia/tegrastats
 +
RAM 1742/15827MB (lfb 3367x4MB) CPU [13%@1183,0%@1183,0%@1190,0%@1190,0%@1190,0%@1190,0%@1184,0%@1185] EMC_FREQ 0%@2133 GR3D_FREQ 0%@828 APE 150 MTS fg 0% bg 1% AO@46.5C GPU@97C Tboard@47C Tdiode@49.75C AUX@46.5C CPU@47.5C thermal@46.95C PMIC@100C GPU 609/609 CPU 608/608 SOC 2587/2587 CV 0/0 VDDRQ 0/0 SYS5V 2224/2224</pre>
 +
==== Emulate low temperature ====
 +
  # echo 40000 > /sys/class/thermal/thermal_zone1/emul_temp
 +
==== Check GPU frequency ====
 +
<pre style="margin-left:30px; color:#B0B0B0; background-color:#111111; white-space:pre-wrap;">
 +
root@jetson-0422418042089:~# /home/nvidia/tegrastats
 +
RAM 1751/15827MB (lfb 3346x4MB) CPU [0%@1184,0%@1185,0%@1190,0%@1190,0%@1190,0%@1190,0%@1185,0%@1184] EMC_FREQ 0%@2133 GR3D_FREQ 0%@1377 APE 150 MTS fg 0% bg 0% AO@47C GPU@40C Tboard@47C Tdiode@50C AUX@47C CPU@48C thermal@47.4C PMIC@100C GPU 1065/1065 CPU 456/456 SOC 2435/2435 CV 0/0 VDDRQ 0/0 SYS5V 2224/2224</pre>

Latest revision as of 02:40, 10 October 2018

In power non-sensitive case, using performance governor can help to run GPU at highest frequency by default and still be able to be thermal throttled. jetson_clocks.sh can set GPU frequency to highest by setting minimum frequency the same as maximum frequency, but in this case, GPU frequency cannot be throttled when temperature is high.

Re-config kernel

Run below command on board to check if CONFIG_DEVFREQ_GOV_PERFORMANCE is set or not. If not, please set CONFIG_DEVFREQ_GOV_PERFORMANCE=y and update the kernel

 $ zcat /proc/config.gz | grep CONFIG_DEVFREQ_GOV_PERFORMANCE

Keep GPU alive

Run below command on board as root to keep GPU alive (not suspend)

 # echo 0 > /sys/devices/17000000.gv11b/railgate_enable

Enable performance governor for GPU

Run below command on board to check all available governors for GPU

 $ cat /sys/class/devfreq/17000000.gv11b/available_governors
nvidia@jetson-0422418042089:~$ cat /sys/class/devfreq/17000000.gv11b/available_governors
nvhost_podgov userspace performance simple_ondemand

To enable performance governor, run below command on board as root

 # echo performance > /sys/class/devfreq/17000000.gv11b/governor

Check GPU frequency

With performance governor enabled, GPU should run at highest frequency by default, run below command on board as root to check GPU frequency

 # /home/nvidia/tegrastats
root@jetson-0422418042089:~# /home/nvidia/tegrastats
RAM 1763/15827MB (lfb 3332x4MB) CPU [0%@1190,0%@1190,0%@1190,0%@1190,0%@1190,0%@1190,0%@1190,0%@1190] EMC_FREQ 0%@2133 GR3D_FREQ 0%@1377 APE 150 MTS fg 0% bg 0% AO@41.5C GPU@43C Tboard@42C Tdiode@44.75C AUX@41.5C CPU@43C thermal@42.6C PMIC@100C GPU 1065/1065 CPU 456/456 SOC 2435/2435 CV 0/0 VDDRQ 0/0 SYS5V 2224/2224

Emulate thermal throttle

Run below command can emulate thermal throttle

Use pid_thermal_gov thermal governor

 # echo pid_thermal_gov > /sys/class/thermal/thermal_zone1/policy

Emulate high temperature

 # echo 97000 > /sys/class/thermal/thermal_zone1/emul_temp

Check GPU frequency

root@jetson-0422418042089:~# /home/nvidia/tegrastats
RAM 1742/15827MB (lfb 3367x4MB) CPU [13%@1183,0%@1183,0%@1190,0%@1190,0%@1190,0%@1190,0%@1184,0%@1185] EMC_FREQ 0%@2133 GR3D_FREQ 0%@828 APE 150 MTS fg 0% bg 1% AO@46.5C GPU@97C Tboard@47C Tdiode@49.75C AUX@46.5C CPU@47.5C thermal@46.95C PMIC@100C GPU 609/609 CPU 608/608 SOC 2587/2587 CV 0/0 VDDRQ 0/0 SYS5V 2224/2224

Emulate low temperature

 # echo 40000 > /sys/class/thermal/thermal_zone1/emul_temp

Check GPU frequency

root@jetson-0422418042089:~# /home/nvidia/tegrastats
RAM 1751/15827MB (lfb 3346x4MB) CPU [0%@1184,0%@1185,0%@1190,0%@1190,0%@1190,0%@1190,0%@1185,0%@1184] EMC_FREQ 0%@2133 GR3D_FREQ 0%@1377 APE 150 MTS fg 0% bg 0% AO@47C GPU@40C Tboard@47C Tdiode@50C AUX@47C CPU@48C thermal@47.4C PMIC@100C GPU 1065/1065 CPU 456/456 SOC 2435/2435 CV 0/0 VDDRQ 0/0 SYS5V 2224/2224