Commit b2e4a698 authored by Alice Ryhl's avatar Alice Ryhl
Browse files

FROMLIST: mm: rust: add lock_vma_under_rcu



Currently, the binder driver always uses the mmap lock to make changes
to its vma. Because the mmap lock is global to the process, this can
involve significant contention. However, the kernel has a feature called
per-vma locks, which can significantly reduce contention. For example,
you can take a vma lock in parallel with an mmap write lock. This is
important because contention on the mmap lock has been a long-term
recurring challenge for the Binder driver.

This patch introduces support for using `lock_vma_under_rcu` from Rust.
The Rust Binder driver will be able to use this to reduce contention on
the mmap lock.

Acked-by: Lorenzo Stoakes <lorenzo.stoakes@oracle.com> (for mm bits)
Reviewed-by: default avatarJann Horn <jannh@google.com>
Signed-off-by: default avatarAlice Ryhl <aliceryhl@google.com>

Bug: 370906207
Link: https://lore.kernel.org/all/20250115-vma-v12-4-375099ae017a@google.com/


Change-Id: Ifb82ebf48a9d511818ab9b59d319e91d4a3d08e6
Signed-off-by: default avatarAlice Ryhl <aliceryhl@google.com>
parent 5fd689f0
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment