diff options
author | Alice Ryhl <[email protected]> | 2024-01-08 14:49:57 +0000 |
---|---|---|
committer | Miguel Ojeda <[email protected]> | 2024-01-28 19:50:35 +0100 |
commit | 3e6454177f3a76265cba4901d5caa4eb0c7b6447 (patch) | |
tree | 8ff1028729190eabf77b70a57d10459acfdf8c3f /rust/kernel/lib.rs | |
parent | 6b1b2326b2bc3d6a90ec04815130d59ae57f3bc1 (diff) |
rust: sync: add `CondVar::notify_sync`
Wake up another thread synchronously.
This method behaves like `notify_one`, except that it hints to the
scheduler that the current thread is about to go to sleep, so it should
schedule the target thread on the same CPU.
This is used by Rust Binder as a performance optimization. When sending
a transaction to a different process, we usually know which thread will
handle it, so we can schedule that thread for execution next on this
CPU for better cache locality.
Reviewed-by: Benno Lossin <[email protected]>
Reviewed-by: Martin Rodriguez Reboredo <[email protected]>
Reviewed-by: Tiago Lam <[email protected]>
Reviewed-by: Boqun Feng <[email protected]>
Signed-off-by: Alice Ryhl <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Miguel Ojeda <[email protected]>
Diffstat (limited to 'rust/kernel/lib.rs')
0 files changed, 0 insertions, 0 deletions