linux/rust/kernel
Alice Ryhl 3e6454177f 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 <benno.lossin@proton.me>
Reviewed-by: Martin Rodriguez Reboredo <yakoyoku@gmail.com>
Reviewed-by: Tiago Lam <tiagolam@gmail.com>
Reviewed-by: Boqun Feng <boqun.feng@gmail.com>
Signed-off-by: Alice Ryhl <aliceryhl@google.com>
Link: https://lore.kernel.org/r/20240108-rb-new-condvar-methods-v4-1-88e0c871cc05@google.com
Signed-off-by: Miguel Ojeda <ojeda@kernel.org>
2024-01-28 19:50:35 +01:00
..
init rust: init: update expanded macro explanation 2023-08-21 14:31:49 +02:00
net rust: net::phy add module_phy_driver macro 2023-12-15 09:35:50 +00:00
sync rust: sync: add CondVar::notify_sync 2024-01-28 19:50:35 +01:00
allocator.rs rust: bindings: rename const binding using sed 2023-12-14 20:14:01 +01:00
build_assert.rs rust: upgrade to Rust 1.68.2 2023-05-31 17:35:03 +02:00
error.rs rust: support srctree-relative links 2023-12-21 20:54:17 +01:00
init.rs rust: kernel: remove #[allow(clippy::new_ret_no_self)] 2023-10-05 21:16:13 +02:00
ioctl.rs rust: support srctree-relative links 2023-12-21 20:54:17 +01:00
kunit.rs rust: support srctree-relative links 2023-12-21 20:54:17 +01:00
lib.rs rust: upgrade to Rust 1.75.0 2024-01-22 15:18:05 +01:00
net.rs rust: core abstractions for network PHY drivers 2023-12-15 09:35:50 +00:00
prelude.rs rust: add derive macro for Zeroable 2023-08-21 14:31:48 +02:00
print.rs rust: support srctree-relative links 2023-12-21 20:54:17 +01:00
static_assert.rs rust: static_assert: add static_assert! macro 2022-12-04 01:59:16 +01:00
std_vendor.rs rust: upgrade to Rust 1.68.2 2023-05-31 17:35:03 +02:00
str.rs rust: kernel: str: Implement Debug for CString 2023-12-13 00:13:49 +01:00
sync.rs rust: sync: introduce CondVar 2023-04-22 01:46:45 +02:00
task.rs rust: support srctree-relative links 2023-12-21 20:54:17 +01:00
types.rs Rust changes for v6.6 2023-08-29 08:19:46 -07:00
workqueue.rs rust: support srctree-relative links 2023-12-21 20:54:17 +01:00