-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Before, the dispatch function iterated over the events, calling the callbacks as it removed the events from the queue. Now the dispatch function dequeues all pending events before dispatching callbacks. This removes the need for a break event, allows better cache coherency, and results in a better organization of the dispatch function. The only downsides are a longer startup in dispatch and increased jitter, although the latter could be fixed by adding fabricated unlock points during the linked-list traversal. Notable performance impact (make prof): equeue_dispatch_prof: 466 cycles (+25%) equeue_alloc_many_prof: 79 cycles (-12%) equeue_post_many_prof: 7681 cycles (+33%) equeue_post_future_many_prof: 7612 cycles (+35%) equeue_dispatch_many_prof: 8353 cycles (+65%) It's interesting to note there is a decrease in performance for the alloc_many test, this may just be because moving the equeue members around caused the slab info to cross a cache boundary. The alloc_many tests is already very fast (~3* the time for mutex lock).
- Loading branch information
Showing
2 changed files
with
92 additions
and
47 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters