Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NuttX boards reduce CONFIG_NFILE_DESCRIPTORS 54 -> 20 #12646

Merged
merged 2 commits into from
Aug 8, 2019
Merged

Conversation

dagar
Copy link
Member

@dagar dagar commented Aug 6, 2019

Waiting on #12123.

Once logger is updated we can safely decrease the maximum number of file descriptors which will free up a considerable amount of ram (~ 10 kB).

 PID COMMAND                   CPU(ms) CPU(%)  USED/STACK PRIO(BASE) STATE FD
   0 Idle Task                  217510 42.700   288/ 1024   0 (  0)  READY  3
   1 hpwork                       4050  0.800   740/ 1780 249 (249)  w:sig  4
   2 lpwork                        557  1.700   976/ 1780  50 ( 50)  w:sig  8
   3 init                         1670  0.000  1864/ 2844 100 (100)  w:sem  3
   4 wq:manager                      4  0.000   824/ 1172 244 (244)  w:sem  7
  15 dataman                       150  0.300   744/ 1180  90 ( 90)  w:sem  4
  18 wq:lp_default                 277  0.000   740/ 1500 205 (205)  w:sem  7
  20 wq:I2C1                      2566  0.600   776/ 1244 248 (248)  w:sem  7
  25 wq:hp_default                1282  0.200   708/ 1500 243 (243)  w:sem  7
 125 wq:I2C2                     10755  2.200   648/ 1244 247 (247)  w:sem  7
 134 wq:SPI2                     96200 19.000   820/ 1396 253 (253)  PEND   7
 157 sensors                     17425  3.700  1456/ 1964 238 (238)  w:sem 10
 159 commander                    6112  1.100  1680/ 3212 140 (140)  w:sig  6
 160 commander_low_prio             15  0.000   568/ 2996  50 ( 50)  w:sem  6
 190 gps                          1563  0.300  1072/ 1516 209 (209)  w:sem  4
 214 mavlink_if0                 10469  2.100  1784/ 2484 100 (100)  w:sig  4
 215 mavlink_rcv_if0              3066  0.600  1520/ 2836 175 (175)  w:sem  4
 231 fmu                         14763  2.900   968/ 1324 241 (241)  w:sem  8
 290 ekf2                        66577 11.200  4536/ 6572 239 (239)  w:sem  4
 292 mc_att_control              16152  3.100  1000/ 1660 240 (240)  w:sem  4
 296 mc_pos_control               7730  0.300  1224/ 1860 239 (239)  w:sem 11
 300 navigator                    1541  0.300  1232/ 1764 105 (105)  READY  4
 316 log_writer_file              3315  0.800   592/ 1164  60 ( 60)  w:sem  4
 314 logger                      14055  3.299  3072/ 3644 234 (234)  RUN    4

Processes: 24 total, 4 running, 20 sleeping, max FDs: 20
CPU usage: 54.50% tasks, 2.80% sched, 42.70% idle
DMA Memory: 5120 total, 1536 used 1536 peak
Uptime: 511.210s total, 217.511s idle

The sensors module and FlightTasks still need to be moved to the updated uORB::Subscription (or uORB::SubscriptionBlocking #12371). After that's done we can decrease CONFIG_NFILE_DESCRIPTORS again to 10 or so.

@dagar
Copy link
Member Author

dagar commented Aug 6, 2019

@RomanBapst this should help alleviate memory issues on F4 boards.

@dagar dagar changed the title [DO NOT MERGE] NuttX boards reduce CONFIG_NFILE_DESCRIPTORS 54 -> 20 NuttX boards reduce CONFIG_NFILE_DESCRIPTORS 54 -> 20 Aug 7, 2019
@dagar dagar marked this pull request as ready for review August 7, 2019 15:02
@dagar dagar requested review from julianoes and bkueng August 7, 2019 15:08
@dagar dagar merged commit 0955fd2 into master Aug 8, 2019
@dagar dagar deleted the pr-nuttx_FDs branch August 8, 2019 01:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant