-
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
time: add alternative timer for better multicore scalability #7467
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
Merged
Merged
Changes from all commits
Commits
Show all changes
136 commits
Select commit
Hold shift + click to select a range
20a1daf
add macro `cfg_rt_and_time` and `cfg_rt_or_time`
ADD-SP 3e65b07
impl `wheel::Entry`
ADD-SP 7618162
remove global timer wheel
ADD-SP 4b0a866
add local timer wheel to the current_thread scheduler
ADD-SP 78d433f
add local timer wheel to the multi_thread scheduler
ADD-SP 4727a56
remove `tokio/src/runtime/time/entry.rs`
ADD-SP d7f9c72
impl `tokio/src/runtime/time/timer.rs`
ADD-SP 161ca91
adapt the impl of `tokio::time::sleep`
ADD-SP 09b27cf
adapt the impl of `tokio::time::interval`
ADD-SP 58a13e3
let current_thread scheduler process timers
ADD-SP 8407dd6
let multi_thread scheduler process timers
ADD-SP 89e132f
remove the `InsertError`
ADD-SP 9b336b1
fix `tokio-util/tests/time_delay_queue.rs`
ADD-SP cf7211a
fix unused import `wake_list::WakeList`
ADD-SP 8ac5933
re-enable loom tests for timers
ADD-SP ca49b99
fix race conditions while operating on `EntryHandle`
ADD-SP fb027a6
cross-thread cancellation queue
ADD-SP 9e294d5
drop all items while dropping the cancellation queue
ADD-SP abffd46
switch back to general intrusive node based MPSC
ADD-SP ccd0ae8
relax the memory ordering
ADD-SP f91caf7
switch to `Mutex` version of cancellation queue
ADD-SP 88292d8
avoid `noalias` and `drop_in_place`
ADD-SP bb932b0
remove legacy works in `spellcheck.dic`
ADD-SP 4b15736
reuse the existing intrusice list implementation
ADD-SP e89259e
fix docstring issue caused by renaming `Entry::cancel_pointer` to `En…
ADD-SP 5eee490
reuse existing intrusive list impl using a ZST
ADD-SP 6626ad0
chore(spellcheck.dic): add 'ZST'
ADD-SP 65276ac
fix memory leakage of cancellation queue
ADD-SP e4b1e68
remove useless `unsafe impl Send for Entry`
ADD-SP 009d158
clarify the meaning of `STATE_BUSY_REGISTERING`
ADD-SP c1e0522
merge: sync changes from the base branch
ADD-SP 0f3c9ec
eliminate atomic state by `Mutex<State>` of `Entry`
ADD-SP 6b8eed5
fixup! eliminate atomic state by `Mutex<State>` of `Entry`
ADD-SP 6bb207d
reduce lock contention while drainning the remote timers
ADD-SP 0e9a7e1
merge: sync changes from the base branch
ADD-SP 93ebb38
merge: sync changes from the base branch
ADD-SP 6a4f048
merge: sync changes from the base branch
ADD-SP 2385b3d
improve the cache locality while checking the shutdown flag
ADD-SP 782bcba
merge: sync changes from the base branch
ADD-SP 2fcfb4b
remove unnecessary `PhantomData` in cancellation queue
ADD-SP 9657e6d
fix rustfmt reports
ADD-SP 1fff994
merge: sync changes from the base branch
ADD-SP c208c3a
ci: fix spellcheck.dic
ADD-SP fda223d
merge: sync changes from the base branch
ADD-SP 070ddd6
merge: sync changes from the base branch
ADD-SP 102e2d2
merge: sync changes from the base branch
ADD-SP 5d17c33
merge: sync changes from the base branch
ADD-SP a17bdde
merge: sync changes from the base branch
ADD-SP 40cc384
improve the ergonomic of `Handle::with_wheel()`
ADD-SP 36e71a0
merge: sync changes from the base branch
ADD-SP a5c384d
merge: sync changes from the base branch
ADD-SP ebd1df1
merge: sync changes from the base branch
ADD-SP 029da48
merge: sync changes from the base branch
ADD-SP 81e57c9
simplify `tokio/src/runtime/time/timer.rs`
ADD-SP 9b5a90c
fixup! eliminate atomic state by `Mutex<State>` of `Entry`
ADD-SP 4862ef7
push timer tasks into local queue instead of global queue
ADD-SP 89f5968
merge: sync changes from the base branch
ADD-SP b3c14ea
fixup! simplify `tokio/src/runtime/time/timer.rs`
ADD-SP 2aafc92
fixup! push timer tasks into local queue instead of global queue
ADD-SP aec80f9
fix `spellcheck.dic`
ADD-SP 8bb88bc
fixup! push timer tasks into local queue instead of global queue
ADD-SP 0b086ec
fixup! push timer tasks into local queue instead of global queue
ADD-SP 35be1b9
fixup! push timer tasks into local queue instead of global queue
ADD-SP 348fc25
merge: sync changes from the base branch
ADD-SP d00f247
fixup! eliminate atomic state by `Mutex<State>` of `Entry`
ADD-SP c5eeb3d
fixup! eliminate atomic state by `Mutex<State>` of `Entry`
ADD-SP 5215089
cleanup the `Context::park_internal`
ADD-SP f595efa
merge: sync changes from the base branch
ADD-SP 57cd244
fix two bugs causes freqently park/unpark
ADD-SP 9d7b03d
merge: sync changes from the base branch
ADD-SP 88cd24b
fixup! fix two bugs causes freqently park/unpark
ADD-SP 99a084f
fix `spellcheck.dic`
ADD-SP 980c977
wake up the defer task correctly in the current thread runtime
ADD-SP 5d6cf22
merge: sync changes from the base branch
ADD-SP ea37b23
cancel the timer locally if possible
ADD-SP 9bf117d
merge: sync changes from the base branch
ADD-SP df81bbd
fixup! cancel the timer locally if possible
ADD-SP 88d3596
fixup! cancel the timer locally if possible
ADD-SP ef78794
merge: sync changes from the base branch
ADD-SP d8b47b9
small refactor of cancellation code path
ADD-SP 9cddfda
merge: sync changes from the base branch
ADD-SP 63a93c2
bump the wasm memory limit for doc-tests
ADD-SP aa413dd
fix potenial mem leak when dropping timer
ADD-SP 5e5312a
runtime: improve style by reducing indent level
ADD-SP 1c59461
merge: sync changes from the base branch
ADD-SP 94d40e3
fix memory leak when draining the cancel queue
ADD-SP a5c3026
merge: sync changes from the base branch
ADD-SP 17922c2
remove debugging code
ADD-SP c47aa24
fix unused import error
ADD-SP 47f4036
remove debug print
5b53771
fix heap-use-after-free issue
ADD-SP 47e04e8
remove legacy comments of `Wheel::insert()`
ADD-SP fca1e42
merge: sync changes from the base branch
ADD-SP 15b0563
handle the spurious wakeup of condvar in multi-thread runtime
ADD-SP d9ff6b8
merge: sync changes from the base branch
ADD-SP 22a3771
merge: sync changes from the base branch
ADD-SP a6a0a85
merge: sync changes from the base branch
ADD-SP ba627cf
merge: sync changes from the base branch
ADD-SP 89b71f3
merge: sync changes from the base branch
ADD-SP 522252f
merge: sync changes from the base branch
ADD-SP e3102f7
fix reports of `unsafe_op_in_unsafe_fn`
ADD-SP 4082cba
merge: sync changes from the base branch
ADD-SP 36bf961
merge: sync changes from the base branch
ADD-SP cde17cd
unlock the mutex before droping the waker
ADD-SP 9a4d439
don't cancel the timer locally due to `block_in_place` migrates the `…
ADD-SP d4959a8
fix incorrect comment of `TransitionToRegistered`
ADD-SP bc243b8
eliminate `Option<Context2>` in `Core`
ADD-SP ccdd80b
merge: sync changes from the base branch
ADD-SP 0bd9db2
remove useless `Send` and `Sync` impl
ADD-SP 7e824dc
fixup! eliminate `Option<Context2>` in `Core`
ADD-SP 38b49ba
fix error reports of `cargo hack`
ADD-SP e45109f
simplify the `PrivState`
ADD-SP bedf058
fixup! simplify the `PrivState`
ADD-SP 1a82da1
fixup! simplify the `PrivState`
ADD-SP 4b31afa
fixup! simplify the `PrivState`
ADD-SP 058e4f3
fixup! simplify the `PrivState`
ADD-SP 133b962
fixup! simplify the `PrivState`
ADD-SP bcf92c4
fixup! simplify the `PrivState`
ADD-SP ed80712
fixup! simplify the `PrivState`
ADD-SP 91d759f
fixup! simplify the `PrivState`
ADD-SP 59a0d91
fixup! simplify the `PrivState`
ADD-SP f2d5868
fixup! simplify the `PrivState`
ADD-SP f17b43f
fixup! simplify the `PrivState`
ADD-SP aebf2b3
add safety comments in `entry.rs`
ADD-SP 6f5735e
tolerate spurious wakeup
ADD-SP 0215b54
move the `crate::runtime::scheduler::util` out of the `cfg_rt_and_tim…
ADD-SP ef4c37f
improve the test coverage of timer cancellation
ADD-SP b72f924
fixup! improve the test coverage of timer cancellation
ADD-SP c1a8676
revert spurious changes
ADD-SP b63057c
isolate two kinds of timer implementations
ADD-SP cdf6994
merge: sync changes from the base branch
ADD-SP e4ed82c
fix rustfmt reports
ADD-SP 91eb3e1
revert `tokio-util/tests/time_delay_queue.rs` as it is using the exis…
ADD-SP 4465bab
improve the test coverage
ADD-SP 804f799
fixup! improve the test coverage
ADD-SP f611539
improve style
ADD-SP File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Note
tokio/tokio-util/src/io/sync_bridge.rs
Line 91 in d060401