3. Minimum kernel configuration
follow below steps if latency is to be measured with minimum kernel configuration:
config file (config_kernel_min)(defconfig) to project-spec/meta-user/recipes-kernel/linux/files/defconfig
Rename file as defconfig
Add below line in project-spec/meta-user/recipes-kernel/linux/linux-xlnx_%.bbappend file:
SRC_URI_append = " file://deconfig"
xsdb% con
6. Measure Power values
Use readpower command from systestPower Advantage tool to measure power for each mode.
[systest] # readpower
7.values.
[[code]]
=7. All on (PS + PL)PL)=
Run below command to load all APU from Linux terminal on board
root@plnx_aarch64:~# fulload() { dd if=/dev/zero of=/dev/null | dd if=/dev/zero of=/dev/null | dd if=/dev/zero of=/dev/null | dd if=/dev/zero of=/dev/null & };fulload; read;
Run "readpower" command from systest. ThisUse Power Advantage tool to measure power values. That will give on (PS+PL)
8.
=8. PS all ON
8.1ON=
===8.1 Turn off PLPL===
Run below command from Linux terminal on board to power off PL (force power down unused PU).
root@plnx_aarch64:~# echo request_wakeup 8 1 0 1 > /sys/kernel/debug/zynqmp_pm/power
root@plnx_aarch64:~# echo force_powerdown 8 > /sys/kernel/debug/zynqmp_pm/power
root@plnx_aarch64:~# time echo release_node 69 > /sys/kernel/debug/zynqmp_pm/power
8.2===8.2 Turn ON PLPL===
Run below command from Linux terminal on board to power off PL (force power down unused PU).
root@plnx_aarch64:~# echo request_wakeup 8 1 0 1 > /sys/kernel/debug/zynqmp_pm/power
root@plnx_aarch64:~# echo force_powerdown 8 > /sys/kernel/debug/zynqmp_pm/power
root@plnx_aarch64:~# time echo request_node 69 > /sys/kernel/debug/zynqmp_pm/power
9.=9. 3 APUs on/off
9.1on/off=
===9.1 Power OFF 3 APUsAPUs===
Run below command from Linux terminal on board to power off 3 APUs.
root@plnx_aarch64:~# time echo 0 > /sys/devices/system/cpu/cpu1/online
root@plnx_aarch64:~# time echo 0 > /sys/devices/system/cpu/cpu2/online
root@plnx_aarch64:~# time echo 0 > /sys/devices/system/cpu/cpu3/online
9.2===9.2 Power ON 3 APUsAPUs===
Run below command from Linux terminal on board to power off 3 APUs.
root@plnx_aarch64:~# time echo 1 > /sys/devices/system/cpu/cpu1/online
root@plnx_aarch64:~# time echo 1 > /sys/devices/system/cpu/cpu2/online
root@plnx_aarch64:~# time echo 1 > /sys/devices/system/cpu/cpu3/online
10.=10. Frequency scaling (min freuquency)freuquency)=
Run following command to get available frequencies.
root@plnx_aarch64:~# cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_available_frequencies
10.1===10.1 Set minimum frequencyfrequency===
Run following command to set minimum frequency
root@plnx_aarch64:~# time echo <min freq. from above command> > /sys/devices/system/cpu/cpu0/cpufreq/scaling_setspeed
10.2===10.2 Set maximum frequencyfrequency===
Run following command to set maximum frequency
root@plnx_aarch64:~# time echo <max freq. from above command> > /sys/devices/system/cpu/cpu0/cpufreq/scaling_setspeed
11.=11. Suspend to and FPD offoff=
Run following command from Linux terminal to suspend Linux(with FPD on):
root@plnx_aarch64:~# echo 0 > /sys/module/printk/parameters/console_suspend
RPU0: Resuming APU.
On console, you should able to see suspend/wakeup latency of APU from RPU print message.
Note:**Note:** Above loop for latency.
12.
=12. R5 Sleep and Deep-Sleep modemode=
Once above measurements are done, RPU puts FPD in off state and goes to idle mode (wfi state) for 10 seconds.
To measure power with R5 sleep mode, run "readpower" command from systest in these 10 seconds.
RPU0: Running in Split mode
After 10 seconds timer will generate interrupt and Resumes RPU. Then RPU resumes APU. This state is same as 3 APU off with minimum frequency.
Note:**Note:"time" command from time command.
13.command.**
=13. Steps to dimmer mode table
Performtable=
# Perform steps 1 RPU application
Perform
# Perform step 7 load APU
run
# run"readpower" command on mode.
Perform
# Perform step 8.1 off PL.
run
# run"readpower" command all ON.
Perform
# Perform step 9.1 3 APUs.
run
# run"readpower" command off) mode.
Perform
# Perform step 10.1 scaling(min frequency)
run
# run"readpower" command minimum frequency.
Perform
# Perform step 11 sleep mode.
14.
=14. Steps to dimmer mode table
Steptable=
# Step 11 and dimmer table.
Perform
# Perform 10.2 to frequency) .
Perform
# Perform 9.2 to all APUs.
Perform
# Perform 8.2 to on PL.
15.
=15. Example loglog=
RPU0: Request Suspend Latency in useconds of Node NODE_APU_0: Min: 4456, Max: 5301, Avg: 4774
RPU0: FPD off Latency in useconds of Node NODE_APU_0: Min: 74, Max: 75, Avg: 74
RPU0: APU0 Wakeup Latency in useconds of Node NODE_APU_0: Min: 9083, Max: 9092, Avg: 9088
RPU0: Wakeup Latency in useconds of Node NODE_APU_0: Min: 15163, Max: 121539, Avg: 48056
code
Here,
RPU0: Request Suspend Latency in useconds of Node NODE_APU_0: Latency for power state transition from "3 APU off (min frequency)" to "Suspend to RAM".