aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/android/binder_alloc.h
diff options
context:
space:
mode:
authorCarlos Llamas <[email protected]>2024-12-10 14:30:58 +0000
committerGreg Kroah-Hartman <[email protected]>2024-12-24 08:35:23 +0000
commitd1716b4b78fb392a5514c8863e8ba287cc4580c2 (patch)
tree55fc9b15ad67c348338cab830a0455d28d53d94f /drivers/android/binder_alloc.h
parentRevert "binder: switch alloc->mutex to spinlock_t" (diff)
downloadkernel-d1716b4b78fb392a5514c8863e8ba287cc4580c2.tar.gz
kernel-d1716b4b78fb392a5514c8863e8ba287cc4580c2.zip
binder: concurrent page installation
Allow multiple callers to install pages simultaneously by switching the mmap_sem from write-mode to read-mode. Races to the same PTE are handled using get_user_pages_remote() to retrieve the already installed page. This method significantly reduces contention in the mmap semaphore. To ensure safety, vma_lookup() is used (instead of alloc->vma) to avoid operating on an isolated VMA. In addition, zap_page_range_single() is called under the alloc->mutex to avoid racing with the shrinker. Many thanks to Barry Song who posted a similar approach [1]. Link: https://lore.kernel.org/all/[email protected]/ [1] Cc: David Hildenbrand <[email protected]> Cc: Barry Song <[email protected]> Cc: Suren Baghdasaryan <[email protected]> Cc: Liam R. Howlett <[email protected]> Reviewed-by: Suren Baghdasaryan <[email protected]> Signed-off-by: Carlos Llamas <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
Diffstat (limited to 'drivers/android/binder_alloc.h')
0 files changed, 0 insertions, 0 deletions