summaryrefslogtreecommitdiff
path: root/drivers/android/binder/node.rs
diff options
context:
space:
mode:
authorAlice Ryhl <aliceryhl@google.com>2026-07-07 10:43:13 +0000
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2026-07-17 15:21:01 +0200
commitdbb17c9ea7567c6ecefe47104cfcc255b91e4089 (patch)
treec1c6e3b79380c5d1aac3341835f8b502885617a6 /drivers/android/binder/node.rs
parente5e86df8b666152bc99fab4be0906b92a271964d (diff)
rust_binder: move (e)poll wait queue to Process
Most processes do not use Rust Binder with epoll, so avoid paying the synchronize_rcu() cost in drop for those that don't need it. For those that do, we also manage to replace synchronize_rcu() with kfree_rcu(), though we introduce an extra allocation. In case the last ref to an Arc<Thread> is dropped outside of deferred_release(), this also ensures that synchronize_rcu() is not called in destructor of Arc<Thread> in other places. Theoretically that could lead to jank by making other syscalls slow, which would be problematic. Signed-off-by: Alice Ryhl <aliceryhl@google.com> Reviewed-by: Boqun Feng <boqun@kernel.org> Link: https://patch.msgid.link/20260707-upgrade-poll-v6-2-4b8fae7bf1d9@google.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/android/binder/node.rs')
-rw-r--r--drivers/android/binder/node.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/android/binder/node.rs b/drivers/android/binder/node.rs
index c73cdf82100f..b74ef32b0d94 100644
--- a/drivers/android/binder/node.rs
+++ b/drivers/android/binder/node.rs
@@ -538,7 +538,7 @@ impl Node {
inner.oneway_todo.push_back(transaction);
} else {
inner.has_oneway_transaction = true;
- guard.push_work(transaction)?;
+ guard.push_work(&self.owner, transaction)?;
}
Ok(())
}
@@ -570,7 +570,7 @@ impl Node {
let transaction = inner.oneway_todo.pop_front();
inner.has_oneway_transaction = transaction.is_some();
if let Some(transaction) = transaction {
- match guard.push_work(transaction) {
+ match guard.push_work(&self.owner, transaction) {
Ok(()) => {}
Err((_err, work)) => {
// Process is dead.