-
Notifications
You must be signed in to change notification settings - Fork 1.5k
sched/signals: add support to partially or fully disable signals #17644
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
base: master
Are you sure you want to change the base?
sched/signals: add support to partially or fully disable signals #17644
Conversation
|
@Fix-Point please help to review |
ec8c2f3 to
a16d9fd
Compare
Enable CONFIG_ENABLE_ALL_SIGNAL to fix build errors Signed-off-by: Chengdong Wang <[email protected]>
a16d9fd to
09f430e
Compare
|
Could you try testing on some real hardware? Also, did we decide that we're allowing signals to be disabled? I remember there was a big discussion about it. |
@linguini1 This patch just make signal function optional, I don't see any reason to not merge this pr. As I said before if you don't allow this patch merge, which mean you must remove ALL option from Kconfig which are required POSIX(e.g. thread, environment variable, file and even nsh) since these feature are required by POSIX spec. So, I don't know why do we need ask the vote in dev thread. |
|
@wangchdo please fix the comment in apache/nuttx-apps#3265, so we can merge both pr together. |
Don't worry, I am not opposed to this PR and I will not block it from merging. I was just curious what the resolution of that discussion was in case someone was able to fill me in. I personally support the optional disabling of POSIX interfaces if they are unused and can help save system resources. |
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#3265 to fix build dependency issues when signals are partially or fully disabled.
Testing
Below tests depend on apache/nuttx-apps#3265
ostest passed on rv-virt:smp64 when CONFIG_ENABLE_PARTIAL_SIGNALS=y