-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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/sched: semaphore and mqueue task list optimize #6987
Conversation
c294a74
to
f941cab
Compare
let rebase the patch |
f941cab
to
9b130ce
Compare
@pkarashchenko please review the change where conflict with your priority inheritance change. |
@pkarashchenko the break is fixed here apache/nuttx-apps#1321 |
This approach goes in conflict with #6318 |
Yeah, seems it becomes even easier with this change. I just need to pick the first waiter with priority inheritance enabled from each holder list and get the maximum priority among waiters. And execution time will be improved tremendously in such case as we switch search complexity from O(2) to O(1). |
@xiaoxiang781216 let's better move |
@zyfeier please rebase the patch to the last master. |
6a339ca
to
acf4eb2
Compare
acf4eb2
to
22ff8a4
Compare
LGTM. |
@xiaoxiang781216 @zyfeier |
Sure. |
@zyfeier
However, I can not see the config in the commits. |
CONFIG_TASK_LIST_OPTIMIZE has been removed,i'll update the PR comment. |
@masayuki2009 how about you test result? |
@xiaoxiang781216 |
Thanks very much to verify the change. |
Summary
Semaphore and mqueue task list optimize:
depends on #7185
Impact
Code Size:
Before:
After:
Performance:
20 semaphore and 20 threads with different priorities.
sem_post -> sem_wait (cycle count):
before:
8179
after:
6988
Testing
sabre-6quad:nsh