PX4 / PX4-Autopilot

PX4 Autopilot Software
https://px4.io
BSD 3-Clause "New" or "Revised" License
8.53k stars 13.51k forks source link

NuttX review scheduling note (cpuload) performance #11693

Closed dagar closed 5 years ago

dagar commented 5 years ago

From profiling on STM32F7 we see that our NuttX scheduling note functions and hrt_absolute_time (used by nearly everything in PX4 including cpuload) are quite hot. https://github.com/PX4/Firmware/blob/1d5309060a7b26366f8aa0973fc078593c04a47e/src/lib/systemlib/cpuload.c#L107

We should consider using ram functions (CONFIG_ARCH_RAMFUNCS) as well as simpler cpuload calculations that aren't a burden on every single scheduler operation.

dagar commented 5 years ago

https://nuttx.org/doku.php?id=wiki:nxinternal:cpuload-oneshot

stale[bot] commented 5 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

dagar commented 5 years ago

I'll come back to this once profiling on hardware. Either with https://github.com/orbcode/orbuculum or a J-Trace.