sched/signals: add support to partially or fully disable signals #17644
sched/signals: add support to partially or fully disable signals #17644acassis merged 19 commits intoapache:masterfrom
Conversation
|
@Fix-Point please help to review |
Add support to disable signals actions related struct Co-authored-by: guoshichao <guoshichao@xiaomi.com> Signed-off-by: Chengdong Wang <wangchengdong@lixiang.com>
Add support to disable signals actions related struct Co-authored-by: guoshichao <guoshichao@xiaomi.com> Signed-off-by: Chengdong Wang <wangchengdong@lixiang.com>
Add support to disable signals actions related struct Co-authored-by: guoshichao <guoshichao@xiaomi.com> Signed-off-by: Chengdong Wang <wangchengdong@lixiang.com>
Add support to disable signals actions related struct Co-authored-by: guoshichao <guoshichao@xiaomi.com> Signed-off-by: Chengdong Wang <wangchengdong@lixiang.com>
Add support to disable signals actions related struct Co-authored-by: guoshichao <guoshichao@xiaomi.com> Signed-off-by: Chengdong Wang <wangchengdong@lixiang.com>
Add support to disable signals actions related struct Co-authored-by: guoshichao <guoshichao@xiaomi.com> Signed-off-by: Chengdong Wang <wangchengdong@lixiang.com>
Add support to disable signals actions related struct Co-authored-by: guoshichao <guoshichao@xiaomi.com> Signed-off-by: Chengdong Wang <wangchengdong@lixiang.com>
Add support to disable signals actions related struct Co-authored-by: guoshichao <guoshichao@xiaomi.com> Signed-off-by: Chengdong Wang <wangchengdong@lixiang.com>
Add support to disable signals actions related struct Co-authored-by: guoshichao <guoshichao@xiaomi.com> Signed-off-by: Chengdong Wang <wangchengdong@lixiang.com>
Add support to disable signals actions related struct Co-authored-by: guoshichao <guoshichao@xiaomi.com> Signed-off-by: Chengdong Wang <wangchengdong@lixiang.com>
Add support to disable signals actions related struct Co-authored-by: guoshichao <guoshichao@xiaomi.com> Signed-off-by: Chengdong Wang <wangchengdong@lixiang.com>
Add support to disable signals actions related struct Co-authored-by: guoshichao <guoshichao@xiaomi.com> Signed-off-by: Chengdong Wang <wangchengdong@lixiang.com>
Add support to disable signals actions related struct Co-authored-by: guoshichao <guoshichao@xiaomi.com> Signed-off-by: Chengdong Wang <wangchengdong@lixiang.com>
Add support to disable signals actions related struct Co-authored-by: guoshichao <guoshichao@xiaomi.com> Signed-off-by: Chengdong Wang <wangchengdong@lixiang.com>
Add support to disable signals actions related struct Co-authored-by: guoshichao <guoshichao@xiaomi.com> Signed-off-by: Chengdong Wang <wangchengdong@lixiang.com>
I choose nucleo-f302r8:ihm07m1_b16 as an example: CONFIG_ENABLE_ALL_SIGNALS=y CONFIG_ENABLE_PARTIAL_SIGNALS=y: CONFIG_DISABLE_ALL_SIGNALS=y: |
@wangchdo need make libuv skip signal related function if signal is disabled. |
|
@xiaoxiang781216 @anchao @acassis CI is failing because of dependency on apache/nuttx-apps#3333 Shall we merge apache/nuttx-apps#3333 firstly and then restart the CI? |
yes, let's merge apache/nuttx-apps#3333 and restart again. |
|
but we need add CONFIG_ENABLE_ALL_SIGNALS to the related defconfig without wating apache/nuttx-apps#3333 |
OK, I added defconfig update |
|
@wangchdo I think you need to refresh these board profiles: |
Enable CONFIG_ENABLE_ALL_SIGNAL to fix build errors Signed-off-by: Chengdong Wang <wangchengdong@lixiang.com>
OK, refreshed |
Summary
Signals in NuttX serve two primary purposes:
Synchronization and wake-up
Signals can be used to block threads on specific signal sets and later wake them up by delivering the corresponding signals to those threads.
Asynchronous notification
Signals can also be used to register callback handlers for specific signals, allowing threads to asynchronously invoke those handlers when the signals are delivered.
The PR #17357 Introduced the ability to disable only the synchronization and wake-up functionality of signals, while retaining part of the signal infrastructure. This allows moderate memory savings and performance improvements.
The PR #17352 Introduced the ability to completely disable all signal functionality, providing more aggressive memory reduction and performance optimization.
This PR consolidates the above two efforts and introduces a unified mechanism that supports both:
Partial signal disablement: disabling only asynchronous notification while retaining synchronization and wake-up functionality.
Full signal disablement: disabling both synchronization / wake-up and asynchronous notification functionality.
This consolidation enables finer-grained control over signal usage, allowing system integrators to better balance functionality, memory footprint, and performance for different use cases.
Impact
Provide configuration to fully or partially disable signals, should have no impact to exist nuttx functions if
the configuration is not enabled
this PR depends on apache/nuttx-apps#3333 to fix build dependency issues when signals are partially or fully disabled.
Testing
Below tests depend on apache/nuttx-apps#3333
ostest passed on rv-virt:smp64 when CONFIG_ENABLE_PARTIAL_SIGNALS=y