linux/rust/kernel/sync
Alice Ryhl e5e86df8b6 rust: poll: use kfree_rcu() for PollCondVar
Rust Binder currently uses PollCondVar, but it calls synchronize_rcu()
in the destructor, which we would like to avoid. Add a variation of
PollCondVar that kfree_rcu() instead.

One could avoid the `rcu` field and allocate the rcu_head on drop using
a fallback to synchronize_rcu() on ENOMEM. However, I'd prefer to avoid
the potential for synchronize_rcu(), and Binder will only use this for a
small fraction of processes, so even if it changes which kmalloc bucket
it falls into, the extra memory is not a problem.

Signed-off-by: Alice Ryhl <aliceryhl@google.com>
Reviewed-by: Boqun Feng <boqun@kernel.org>
Link: https://patch.msgid.link/20260707-upgrade-poll-v6-1-4b8fae7bf1d9@google.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2026-07-17 15:20:45 +02:00
..
arc rust: provide proper code documentation titles 2024-10-07 21:39:57 +02:00
atomic rust: make build_assert module the home of related macros 2026-06-10 09:07:13 +02:00
lock rust: sync: add #[must_use] to GlobalGuard and GlobalLock::try_lock 2026-06-04 22:22:33 +02:00
arc.rs rust: sync: add UniqueArc::as_ptr 2026-06-09 04:13:21 +02:00
aref.rs rust: aref: use the "kernel vertical" imports style 2026-06-10 09:07:13 +02:00
atomic.rs rust: sync: atomic: Update documentation for fetch_add() 2026-03-08 11:06:51 +01:00
barrier.rs rust: sync: Add memory barriers 2025-09-15 09:38:34 +02:00
completion.rs rust: sync: completion: Mark inline complete_all and wait_for_completion 2026-06-09 10:28:06 +02:00
condvar.rs Rust changes for v6.19 2025-12-03 14:16:49 -08:00
lock.rs rust: sync: Inline various lock related methods 2026-01-10 10:53:46 +08:00
locked_by.rs rust: make build_assert module the home of related macros 2026-06-10 09:07:13 +02:00
poll.rs rust: poll: use kfree_rcu() for PollCondVar 2026-07-17 15:20:45 +02:00
rcu.rs rust: sync: rcu: Mark Guard methods as inline 2025-05-16 09:00:54 -04:00
refcount.rs rust: make build_assert module the home of related macros 2026-06-10 09:07:13 +02:00
set_once.rs rust: sync: set_once: Implement Send and Sync 2026-01-09 19:01:40 +08:00