-
Notifications
You must be signed in to change notification settings - Fork 217
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
Add semaphore speed test #240
Comments
Imported from trac issue 217. Created by jphickey on 2019-05-29T14:27:29, last modified: 2019-07-26T15:13:27 |
Trac comment by jphickey on 2019-05-29 14:47:50: Ready for CCB review: commit [changeset:afd25dc] branch The impetus of this was just to see if the "posix-ng" implementation was substantially worse than the original "posix" implementation due to its additional error checking and function calls. As it turns out, the NG is substantially faster, because it does not need to change signal masks. In the original POSIX, most of the actual time in the semaphore give/take call is in the "rt_sigprocmask" system call, related to changing the signal mask. The posix-ng implementation does not need to do this, because it manages signals differently. Therefore NG is about 60-70% faster. The information gleaned from this exercise was valuable, in particular the ability to run this in conjunction with profiling tools to determine areas for optimization. Instead of keeping this as a one time test, it is probably a good idea to include this as an additional test within the OSAL. |
Trac comment by jhageman on 2019-05-30 11:54:30: Note traced using strace, either -c -p on child tasks or with -f. NG is entirely using the "futex" syscall, whereas old posix is about 40% futex and 60% rt_sigprocmask. Tagged for CCB review. |
Trac comment by jhageman on 2019-06-05 12:46:08: CCB 6/5/19 - code reviewed and approved, recommend addition of license and copyright info in comment block |
Trac comment by jhageman on 2019-06-13 08:58:04: Recommended comment block (lifted from osapi-time.c): {{{
*/ Exact duplication simplifies release updates. |
Trac comment by jhageman on 2019-07-03 13:39:20: Moved 4.2.2 tickets planned to close to 4.3.0 |
Trac comment by jphickey on 2019-07-08 22:24:46: Merged into ic-2019-07-08 (along with header change as requested) |
Trac comment by jhageman on 2019-07-10 13:23:34: CCB 07/10/2019 - Approved for merge to dev |
Trac comment by jphickey on 2019-07-11 11:40:01: Merged to development branch |
Trac comment by jhageman on 2019-07-26 15:13:27: Milestone renamed |
During discussions of the NG architecture, a recurring concern was regarding the additional function calls and possible increase in overhead related to this.
Rather than act on assumptions, it is better to actually benchmark the code in question to determine if optimizations are necessary, and if so, where those optimizations should be done.
The text was updated successfully, but these errors were encountered: