mirror of
https://github.com/PX4/PX4-Autopilot.git
synced 2026-12-01 05:32:58 +08:00
feat(boards/px4/fmu-v4): bound the procfs task table to 64
CONFIG_FS_PROCFS_MAX_TASKS sizes system_load.tasks[], the per-task reporting table behind top, /proc and the cpuload accounting. NuttX defaults it to 128 and this board never overrode it, so 128 slots at 24 B each are reserved for the life of the board. It runs 25 tasks, counted with ls /proc. Effect: system_load 3096 -> 1560 B, so 1536 B of static RAM returned to the heap arena. The second effect matters more on this board. Every NSH builtin needs a 4096 B task spawn, and before this the largest free block with a ground station attached was 3760 B, so no console command would run at all: param and top both failed with "command not found", which is ENOMEM in disguise. With this the largest block reaches 4416 B and the console works. 64 leaves 2.56x headroom over the live count, enough for the transient tasks a calibration or parameter save adds. If the limit were ever exceeded, top and procfs would list fewer tasks and a task's CPU time would go unaccounted; nothing else is affected.
This commit is contained in:
1 parent
f9e9a8eca3
commit
097d86e201
1 file changed
+1
@@ -98,6 +98,7 @@ CONFIG_FS_FATTIME=y
|
||||
CONFIG_FS_LARGEFILE=y
|
||||
CONFIG_FS_PROCFS=y
|
||||
CONFIG_FS_PROCFS_INCLUDE_PROGMEM=y
|
||||
CONFIG_FS_PROCFS_MAX_TASKS=64
|
||||
CONFIG_FS_PROCFS_REGISTER=y
|
||||
CONFIG_FS_ROMFS=y
|
||||
CONFIG_GRAN=y
|
||||
|
||||
Reference in new issue
Block a user