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

boards: NuttX disable posix message queues #15271

Merged
merged 1 commit into from
Jul 17, 2020
Merged

Conversation

dagar
Copy link
Member

@dagar dagar commented Jul 7, 2020

Posix message queues are kind of interesting, but there's no current usage in PX4, and I'm not aware of them ever being used.

Saves ~ 0.7 kB of flash and somewhere between 1.2-1.7 kB of memory depending on the number of threads in the system.

@dagar dagar changed the title boards: disable MQ [WIP] boards: NuttX disable posix message queues Jul 7, 2020
@dagar dagar force-pushed the pr-nuttx_disable_mqueue branch 2 times, most recently from 8e92fa5 to 1a5df51 Compare July 7, 2020 02:02
@dagar dagar marked this pull request as ready for review July 7, 2020 02:35
@dagar dagar changed the title [WIP] boards: NuttX disable posix message queues boards: NuttX disable posix message queues Jul 7, 2020
@dagar dagar requested a review from davids5 July 7, 2020 18:14
@dagar dagar force-pushed the pr-nuttx_disable_mqueue branch from 1a5df51 to e51c0af Compare July 16, 2020 14:27
@dagar
Copy link
Member Author

dagar commented Jul 16, 2020

Unless there's any objection I'm going to merge this because we've hit the flash limit on px4_fmu-v2 again.

     VM SIZE    
 -------------- 
  [NEW]     +96    page_sizes.7124
   +33%     +52    [section .bss]
  [NEW]     +32    serial_dma_call.9319
  [NEW]     +22    format.7609
  [NEW]     +20    baudrates.10564
  [NEW]     +20    baudrates_to_try.9397
  [NEW]     +16    __FUNCTION__.8734
  [NEW]     +13    __FUNCTION__.7222
  [NEW]     +13    __FUNCTION__.8718
  [NEW]     +13    __FUNCTION__.8744
  [NEW]     +12    __FUNCTION__.8726
  [NEW]     +10    __FUNCTION__.8756
  [NEW]      +8    base_time.8762
  [NEW]      +8    channels_cache.9189
  [NEW]      +8    min_available.14210
  [NEW]      +5    log_level_table.8022
  [NEW]      +4    boards_manifest.8644
  [NEW]      +4    k.9174
  [NEW]      +4    last_count.8763
  [NEW]      +2    rxdummy.8627
  [NEW]      +2    txdummy.8628
  [NEW]      +1    initialized.7442
  [NEW]      +1    once.7358
  [ = ]       0    [Unmapped]
  [ = ]       0    [section .debug_abbrev]
  [ = ]       0    [section .debug_aranges]
  [ = ]       0    [section .debug_frame]
  [ = ]       0    [section .debug_info]
  [ = ]       0    [section .debug_line]
  [ = ]       0    [section .debug_loc]
  [ = ]       0    [section .debug_ranges]
  [ = ]       0    [section .debug_str]
  [ = ]       0    [section .strtab]
  [ = ]       0    [section .symtab]
  [ = ]       0    group_delwaiter
  [ = ]       0    param_import_internal(int, bool)
  [ = ]       0    pthread_release
  [ = ]       0    px4::logger::Logger::Logger(unsigned char, unsigned int, unsigned int, char const*, px4::logger::Logger::LogMode, bool)
  [ = ]       0    sched_setscheduler
  [ = ]       0    stat_recursive
  [DEL]      -1    initialized.7578
  [DEL]      -1    once.7494
  [DEL]      -2    rxdummy.8763
  [DEL]      -2    txdummy.8764
  [DEL]      -4    boards_manifest.8780
  -1.1%      -4    g_idletcb
  [DEL]      -4    k.9310
  [DEL]      -4    last_count.8899
  -1.3%      -4    load_mon::LoadMon::_stack_usage()
  -0.4%      -4    print_load_buffer
  -2.7%      -4    up_schedule_sigaction
  [DEL]      -5    log_level_table.8164
  -7.1%      -6    group_leave
 -25.0%      -6    nxtask_recover
 -22.2%      -8    CSWTCH.13
  [DEL]      -8    base_time.8898
  [DEL]      -8    channels_cache.9325
  [DEL]      -8    g_desalloc
  [DEL]      -8    g_desfree
  [DEL]      -8    g_msgfree
  [DEL]      -8    g_msgfreeirq
 -20.0%      -8    g_statenames
  [DEL]      -8    g_waitingformqnotempty
  [DEL]      -8    g_waitingformqnotfull
  [DEL]      -8    min_available.14352
  [DEL]     -10    __FUNCTION__.8894
  -8.1%     -10    inode_stat
  [DEL]     -12    __FUNCTION__.8864
  -3.0%     -12    ls_handler
  [DEL]     -13    __FUNCTION__.7358
  [DEL]     -13    __FUNCTION__.8856
  [DEL]     -13    __FUNCTION__.8882
  [DEL]     -16    __FUNCTION__.8872
 -20.0%     -16    g_tasklisttable
  [DEL]     -20    baudrates.10706
  [DEL]     -20    baudrates_to_try.9539
  [DEL]     -20    nxmq_release
  -4.6%     -20    nxsig_tcbdispatch
 -23.8%     -20    sched_releasetcb
  [DEL]     -22    format.7745
  [DEL]     -28    nxmq_free_msgq
  -0.0%     -32    [section .text]
  [DEL]     -32    serial_dma_call.9413
  [DEL]     -34    nxmq_recover
  [DEL]     -40    nxmq_close_group
 -10.1%     -44    nx_start
  [DEL]     -52    nxmq_alloc_desblock
  [DEL]     -52    nxmq_desclose_group
  [DEL]     -64    nxmq_wait_irq
  [DEL]     -68    mq_inode_release
  [DEL]     -68    nxmq_free_msg
  [DEL]     -96    page_sizes.7260
  [DEL]    -108    nxmq_initialize
  -0.1%    -728    TOTAL

@LorenzMeier
Copy link
Member

What about the failure you reported?

@dagar
Copy link
Member Author

dagar commented Jul 16, 2020

What about the failure you reported?

Where? I'm not sure what you're referring to.

@dagar dagar merged commit e3d31a8 into master Jul 17, 2020
@dagar dagar deleted the pr-nuttx_disable_mqueue branch July 17, 2020 21:00
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.

2 participants